Skip to content

Commit

Permalink
Enhance readme and config example
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineReneleau committed Aug 13, 2015
1 parent a4836fe commit 7102c4f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ Options :
* *projects* : an array of Github repository's names (optional, default get all repositories),
* *org* : an array of Github organizations,
* *apiUrl* : url of your Github API (optional, default is `https://api.github.com`),
* *token* : authorization token for API calls (optional, it can increase API rate limit).
* *descendingOrder* : allow to change ordering of pull requests (optional, default is `true`).
* *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
* *oauthAppClientId* : clientId of the OAuth app the team depends on (optional)
* **githubOAuth** : OAuth config (optional)
* *gatekeeperBaseUrl* : url to [Gatekeeper](https://github.com/M6Web/gatekeeper) (see OAuth section)
* *apps* : list of the apps you use to auth
* *url* : base url of GitHub (should be https://github.com or the base url of your GitHub enterprise)
* *clientId* : clientId of the app

## Run the server

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

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

Expand Down Expand Up @@ -89,7 +96,7 @@ $ cp Vagrantfile.dist Vagrantfile

```shell
$ vagrant up
$ vagrant provision # because of npm issue on the first vagrant up
$ vagrant provision # because of npm issue on the first vagrant up
$ vagrant ssh
$ cd /vagrant
```
Expand Down
32 changes: 18 additions & 14 deletions config/config.json.dist
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
{
"config": {
"refreshInterval": 90,
"teams": {
"teamWithStaticToken": {
"members": ["username1", "username2", "username3"],
"projects": ["repo1", "repo2"],
"orgs": ["orgname1", "orgname2"],
"token": "apiToken",
"descendingOrder": true
},
"teamWithOAuth": {
"members": ["username4", "username2", "username5"],
"orgs": ["orgname2", "orgname4"],
"apiUrl": "https://github.enterprise.fr/api/v3",
"oauthAppClientId":"c13n71D"
}
},
"githubOAuth": {
"gatekeeperBaseUrl": "http://localhost:9999",
"apps": [
{
"url": "https://github.enterprise.fr",
"clientId":""
"clientId":"c13n71D"
},
{
"url": "https://github.com",
"clientId":""
"clientId":"t0k3n5"
}
]
},
"refreshInterval": 90,
"teams": {
"myTeam": {
"members": ["username1", "username2", "username3"],
"projects": ["repo1", "repo2"],
"orgs": ["orgname1", "orgname2"],
"apiUrl": "https://api.github.com",
"token": "apiToken",
"descendingOrder": true,
"oauthAppClientId":""
}
}
}
}

0 comments on commit 7102c4f

Please sign in to comment.