|
5 | 5 |
|
6 | 6 | > A CLI Tool to automate the creation of github repositories |
7 | 7 |
|
8 | | -This is a simple, CLI tool that helps you to create github repositories. |
| 8 | +This is a simple, CLI tool that helps you to create github repositories. |
9 | 9 | It adds all required integrations, teams, webhooks, etc.. all based on a configuration file that you define. |
10 | 10 |
|
11 | 11 | ## Installation |
12 | 12 |
|
13 | 13 | You can get the binary and play with it in your own environment (or even deploy it wherever you like it). |
14 | 14 | Just go the [releases](https://github.com/hellofresh/github-cli/releases) and download the latest one for your platform. |
15 | 15 |
|
16 | | -Just place the binary in your $PATH and you are good to go. |
| 16 | +Move the downloaded binary to any place that's in your `$PATH`, usually you would add it to the local bin: |
| 17 | + |
| 18 | +``` |
| 19 | +$ mv ~/Downloads/github-cli /usr/local/bin/github-cli |
| 20 | +$ chmod +x /usr/local/bin/github-cli |
| 21 | +``` |
17 | 22 |
|
18 | 23 | ## Getting Started |
19 | 24 |
|
20 | | -After you have *github-cli* up and running we can create our first repository. |
21 | | -First of all we have to create a configuration file that will customize how our repositories will be created. You can have a look on our [example](.github.sample.toml). |
22 | | -This file can be placed on the same folder as your binary is, or in your home directory and it should be named `.github.toml` (You can also use it as `yaml` or `json`). |
| 25 | +After you have _github-cli_ up and running we can create our first repository. |
| 26 | +First of all we have to create a configuration file that will customise how our repositories will be created. You can have a look at our [example](./.github.sample.toml) and copy it. |
| 27 | + |
| 28 | +You will need to fill in the following values to be able to create a repo: |
| 29 | + |
| 30 | +### Zappr `zappr` |
| 31 | + |
| 32 | +For Zappr you will need a Zappr URL and a Zappr token, the URL is the base URL of your zappr configuration and the token can be found when you login into the UI and copy the value of any request going out the same domain. The cookies that you need are http-only so you can't access them through JS. Just look for a request with the `Cookie:` header and then copy the value. |
| 33 | + |
| 34 | +### GitHub `github` |
| 35 | + |
| 36 | +GitHub needs a [token](https://github.com/settings/tokens/new) with repo access. You can add additional collaborators and/or teams, the teams are defined by ID and the ID can be found with this simple cURL: |
| 37 | + |
| 38 | +``` |
| 39 | +$ curl -s -i -X GET -u TOKEN:x-oauth-basic -d '' https://api.github.com/orgs/hellofresh/teams | grep -A1 "TEAM_NAME" |
| 40 | +``` |
| 41 | + |
| 42 | +Check out descriptions on the other config values in the [sample file](./.github.sample.toml). |
| 43 | + |
| 44 | +### GitHub Test Org `githubtestorg` |
| 45 | + |
| 46 | +This is used for creating GitHub tests. This just needs a GitHub token with repo access. |
| 47 | + |
| 48 | +### Finalising the file |
| 49 | + |
| 50 | +You can either write this file to be next to the binary or add it to `~/.github.toml`, we recommend the latter! |
23 | 51 |
|
24 | 52 | ## Usage |
25 | 53 |
|
26 | 54 | ``` |
27 | 55 | github-cli [command] [--flags] |
28 | | -``` |
| 56 | +``` |
29 | 57 |
|
30 | 58 | ### Commands |
31 | 59 |
|
32 | | -| Command | Description | |
33 | | -|--------------------------|--------------------------------------| |
34 | | -| `github-cli repo create [--flags]` | Creates a new github repository | |
35 | | -| `github-cli repo delete [--flags]` | Deletes a github repository | |
36 | | -| `github-cli hiring send [--flags]` | Creates a new hellofresh hiring test | |
| 60 | +| Command | Description | |
| 61 | +| ------------------------------------ | ------------------------------------------------ | |
| 62 | +| `github-cli repo create [--flags]` | Creates a new github repository | |
| 63 | +| `github-cli repo delete [--flags]` | Deletes a github repository | |
| 64 | +| `github-cli hiring send [--flags]` | Creates a new hellofresh hiring test | |
37 | 65 | | `github-cli hiring unseat [--flags]` | Removes external collaborators from repositories | |
38 | | -| `github-cli update ` | Check for new versions of github-cli | |
39 | | -| `github-cli version` | Prints the version information | |
| 66 | +| `github-cli update` | Check for new versions of github-cli | |
| 67 | +| `github-cli version` | Prints the version information | |
40 | 68 |
|
41 | 69 | ## Contributing |
42 | 70 |
|
43 | 71 | To start contributing, please check [CONTRIBUTING](CONTRIBUTING.md). |
44 | 72 |
|
45 | 73 | ## Documentation |
46 | 74 |
|
47 | | -* Phanes Docs: https://godoc.org/github.com/hellofresh/github-cli |
| 75 | +- Phanes Docs: https://godoc.org/github.com/hellofresh/github-cli |
0 commit comments