Skip to content

TintPoint/BeforeSetup

Repository files navigation

BeforeSetup

Note: BeforeSetup is still under development and many things are subject to change.

Getting Started

Supported Platforms

macOS

Installation

You can use BeforeSetup as a command line tool that you run manually, or as part of some other toolchain.

> mint install tintpoint/beforesetup

Manually

You can download the binary file here, rename it to beforesetup, and copy it to /usr/local/bin/.

Usage

You need to create a GitHub Personal Access Token with repo:status permission, which allows BeforeSetup to access your repositories.

Then you need to have a config file stored somewhere on your computer following the YAML standard. For example:

repositoryTopics:
  - topic:
      name: github
  - topic:
      name: configuration-management
  - topic:
      name: swift
  - topic:
      name: validation
codeOfConduct:
  name: Contributor Covenant
description: Validate Your GitHub Repository Settings
hasIssuesEnabled: true
hasWikiEnabled: false
homepageUrl: https://www.tintpoint.com
isArchived: false
isPrivate: false
licenseInfo:
  name: MIT License
mergeCommitAllowed: true
rebaseMergeAllowed: true
squashMergeAllowed: true
url: https://github.com/TintPoint/BeforeSetup

Finally you can just type:

> beforesetup --token <GitHubToken> --repo <Owner>/<Name> --config <FilePath>

The output will look like this:

☑ repositoryTopics: 4 items
  ☑ topic:
    ☑ name: "github"
  ☑ topic:
    ☑ name: "configuration-management"
  ☑ topic:
    ☑ name: "swift"
  ☑ topic:
    ☑ name: "validation"
☑ codeOfConduct:
  ☑ name: "Contributor Covenant"
☑ description: "Validate Your GitHub Repository Settings"
☑ hasIssuesEnabled: "true"
☑ hasWikiEnabled: "false"
☑ homepageUrl: "https://www.tintpoint.com"
☑ isArchived: "false"
☑ isPrivate: "false"
☑ licenseInfo:
  ☑ name: "MIT License"
☑ mergeCommitAllowed: "true"
☑ rebaseMergeAllowed: "true"
☑ squashMergeAllowed: "true"
☑ url: "https://github.com/TintPoint/BeforeSetup"

TintPoint/BeforeSetup passed all checks.

If you have any question, use:

> beforesetup --help

Development

Requirements

Swift 4+

Setup Dependencies

Make sure you have the latest version of Xcode and Yarn installed.

> yarn global add apollo
> apollo schema:download --endpoint="https://api.github.com/graphql" --header="Authorization: Bearer <token>"
> apollo codegen:generate "Sources/BeforeSetup/GraphQL/API.swift" --schema="schema.json"