Skip to content

Commit

Permalink
Integrate with the team repo (#267)
Browse files Browse the repository at this point in the history
* initialize dotenv during tests to pick up env vars

* disable scraping if the envvar is omitted

* put the team configuration behind a rwlock

* switch from raw hyper to reqwest

* allow loading teams from an URL updated every 5 minutes

* import users into the database when missing

* fix wrong github access token on ci
  • Loading branch information
pietroalbini authored and Centril committed Mar 31, 2019
1 parent e8ddcfc commit 586e101
Show file tree
Hide file tree
Showing 14 changed files with 765 additions and 329 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ addons:
install:
- export RUST_LOG=debug,hyper=info,rustc=error,cargo=error,jobserver=error
- export GITHUB_WEBHOOK_SECRETS=none
- export GITHUB_ACCESS_TOKEN=none
- export GITHUB_ACCESS_TOKEN=
- export GITHUB_SCRAPE_INTERVAL=6000
- export GITHUB_USER_AGENT=none-agent-with-left-beef
- export POST_COMMENTS=false
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Note that you can configure the Rocket web server using environment variables li
* `GITHUB_USER_AGENT`: the UA string to send to GitHub (they request that you send your GitHub username or the app name you registered for the client ID)
* `GITHUB_WEBHOOK_SECRETS`: a comma-delimited string of the secrets used for any ingestion webhooks. The webhook handler will attempt to validate any POST'd webhook against each secret until it either finds a matching one or runs out.
* `RUST_LOG`: the logging configuration for [env_logger](https://crates.io/crates/env_logger). If you're unfamiliar, you can read about it in the documentation linked on crates.io. If it's not defined, logging will default to `info!()` and above.
* `GITHUB_SCRAPE_INTERVAL`: time (in minutes) to wait in between GitHub scrapes
* `GITHUB_SCRAPE_INTERVAL`: time (in minutes) to wait in between GitHub scrapes (scraping is disabled if this environment variable is omitted)
* `POST_COMMENTS`: whether to post RFC bot comments on issues -- either `true` or `false`. Be very careful setting to true when testing -- it will post comments using whatever account is associated with the GitHub API key you provide.

## Database
Expand Down
Loading

0 comments on commit 586e101

Please sign in to comment.