Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

Commit 89e7070

Browse files
Merge pull request #15 from hellofresh/feature/improve-docs
Improve docs
2 parents b7c0a5d + 176034e commit 89e7070

File tree

2 files changed

+54
-30
lines changed

2 files changed

+54
-30
lines changed

.github.sample.toml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
# Where your public ssh key that is registered on Github is. By default it
1+
# Where your public ssh key that is registered on Github is. By default it
22
# looks in your ssh folder for a file called `id_rsa`
33
# PublicKeyPath = ~/.ssh/id_rsa
44

5-
[pullapprove]
6-
# Defines the pull approve organization
7-
Token=""
8-
# Defines the pull approve filename
9-
filename="./.pullapprove.yml"
10-
# Defines the pull approve branch
11-
protectedBranchName="master"
12-
135
# Zappr Config
146
[zappr]
157
# Defines the url for Zappr. Comment it out to load it from ZAPPR_URL environment variable
@@ -20,16 +12,19 @@
2012

2113
[github]
2214
# Defines the github organization
23-
Organization="yourOrg"
15+
Organization="hellofresh"
2416

2517
# Defines the github token
18+
# Create a new one here: https://github.com/settings/tokens/new with `repo` access
2619
Token=""
2720

2821
# Defines permission specifies the permission to grant the team on this repository.
29-
# Possible values are:
30-
# pull - team members can pull, but not push to or administer this repository
31-
# push - team members can pull and push, but not administer this repository
32-
# admin - team members can pull, push and administer this repository
22+
# Possible values are:
23+
# pull - team members can pull, but not push to or administer this repository
24+
# push - team members can pull and push, but not administer this repository
25+
# admin - team members can pull, push and administer this repository
26+
27+
# To get a team ID: curl -s -i -X GET -u TOKEN:x-oauth-basic -d '' https://api.github.com/orgs/hellofresh/teams | grep -A1 "TEAM_NAME"
3328
Teams=[
3429
#Example
3530
{ID=1234, Permission='pull'},
@@ -43,7 +38,8 @@
4338

4439
# Adds a set of labels when creating the repo
4540
Labels=[
46-
{Name='custom', Color='ad974f'},
41+
{Name="Please CR", Color="c2e0c6"},
42+
{Name="Do not merge", Color="b60205"},
4743
]
4844

4945
# Removes the default github's labels
@@ -55,7 +51,7 @@
5551
]
5652

5753
# Defines branch protections
58-
Protections={master=["code-review/pullapprove"]}
54+
Protections={master=["zappr"]}
5955

6056
[githubtestorg]
6157
# Defines the github test organization

README.md

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,71 @@
55

66
> A CLI Tool to automate the creation of github repositories
77
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.
99
It adds all required integrations, teams, webhooks, etc.. all based on a configuration file that you define.
1010

1111
## Installation
1212

1313
You can get the binary and play with it in your own environment (or even deploy it wherever you like it).
1414
Just go the [releases](https://github.com/hellofresh/github-cli/releases) and download the latest one for your platform.
1515

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+
```
1722

1823
## Getting Started
1924

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!
2351

2452
## Usage
2553

2654
```
2755
github-cli [command] [--flags]
28-
```
56+
```
2957

3058
### Commands
3159

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 |
3765
| `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 |
4068

4169
## Contributing
4270

4371
To start contributing, please check [CONTRIBUTING](CONTRIBUTING.md).
4472

4573
## Documentation
4674

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

Comments
 (0)