Skip to content

Commit 7102c4f

Browse files
Enhance readme and config example
1 parent a4836fe commit 7102c4f

File tree

2 files changed

+27
-16
lines changed

2 files changed

+27
-16
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,14 @@ Options :
3535
* *projects* : an array of Github repository's names (optional, default get all repositories),
3636
* *org* : an array of Github organizations,
3737
* *apiUrl* : url of your Github API (optional, default is `https://api.github.com`),
38-
* *token* : authorization token for API calls (optional, it can increase API rate limit).
3938
* *descendingOrder* : allow to change ordering of pull requests (optional, default is `true`).
39+
* *token* : authorization token for API calls (optional, it can allow access to more repos and increase API rate limit) NB: if a token is set, OAuth will be ignored for the team
40+
* *oauthAppClientId* : clientId of the OAuth app the team depends on (optional)
41+
* **githubOAuth** : OAuth config (optional)
42+
* *gatekeeperBaseUrl* : url to [Gatekeeper](https://github.com/M6Web/gatekeeper) (see OAuth section)
43+
* *apps* : list of the apps you use to auth
44+
* *url* : base url of GitHub (should be https://github.com or the base url of your GitHub enterprise)
45+
* *clientId* : clientId of the app
4046

4147
## Run the server
4248

@@ -54,6 +60,7 @@ To use GTR with GitHub OAuth you must :
5460
* Register a new application on GitHub (in Settings > Applications)
5561
* Install [Gatekeeper](https://github.com/M6Web/gatekeeper) and launch it
5662
* Set your "gatekeeperBaseUrl" and type in your app data (clientId and GitHub URL) in config/config.json (example in config.json.dist)
63+
* Don't forget to link the OAuth app to the teams thanks to the oauthAppClientId property
5764

5865
Then, you should see the Auth button in the upper-right corner of the app !
5966

@@ -89,7 +96,7 @@ $ cp Vagrantfile.dist Vagrantfile
8996

9097
```shell
9198
$ vagrant up
92-
$ vagrant provision # because of npm issue on the first vagrant up
99+
$ vagrant provision # because of npm issue on the first vagrant up
93100
$ vagrant ssh
94101
$ cd /vagrant
95102
```

config/config.json.dist

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
11
{
22
"config": {
3+
"refreshInterval": 90,
4+
"teams": {
5+
"teamWithStaticToken": {
6+
"members": ["username1", "username2", "username3"],
7+
"projects": ["repo1", "repo2"],
8+
"orgs": ["orgname1", "orgname2"],
9+
"token": "apiToken",
10+
"descendingOrder": true
11+
},
12+
"teamWithOAuth": {
13+
"members": ["username4", "username2", "username5"],
14+
"orgs": ["orgname2", "orgname4"],
15+
"apiUrl": "https://github.enterprise.fr/api/v3",
16+
"oauthAppClientId":"c13n71D"
17+
}
18+
},
319
"githubOAuth": {
420
"gatekeeperBaseUrl": "http://localhost:9999",
521
"apps": [
622
{
723
"url": "https://github.enterprise.fr",
8-
"clientId":""
24+
"clientId":"c13n71D"
925
},
1026
{
1127
"url": "https://github.com",
12-
"clientId":""
28+
"clientId":"t0k3n5"
1329
}
1430
]
15-
},
16-
"refreshInterval": 90,
17-
"teams": {
18-
"myTeam": {
19-
"members": ["username1", "username2", "username3"],
20-
"projects": ["repo1", "repo2"],
21-
"orgs": ["orgname1", "orgname2"],
22-
"apiUrl": "https://api.github.com",
23-
"token": "apiToken",
24-
"descendingOrder": true,
25-
"oauthAppClientId":""
26-
}
2731
}
2832
}
2933
}

0 commit comments

Comments
 (0)