File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change
1
+ # You can get this value from https://github.com/settings/tokens.
1
2
# if `GITHUB_TOKEN` is not set here, the token can also be stored in `~/.gitconfig`
2
3
GITHUB_TOKEN = MUST_BE_CONFIGURED
3
4
DATABASE_URL = MUST_BE_CONFIGURED
5
+ # If this variable is uncommented set to 1, the DB migrations will be skipped.
6
+ # SKIP_DB_MIGRATIONS=0
7
+ # If this variable is uncommented and set to 1, it will skip the workqueue
8
+ # load (which takes ~10-15 seconds).
9
+ # SKIP_WORKQUEUE=0
10
+
4
11
GITHUB_WEBHOOK_SECRET = MUST_BE_CONFIGURED
5
12
# for logging, refer to this document: https://rust-lang-nursery.github.io/rust-cookbook/development_tools/debugging/config_log.html
6
13
# `RUSTC_LOG` is not required to run the application, but it makes local development easier
Original file line number Diff line number Diff line change @@ -27,6 +27,15 @@ To compile the Triagebot you need OpenSSL development library to be installed (e
27
27
28
28
Run ` cargo build ` to compile the triagebot.
29
29
30
+ ## Quick start
31
+
32
+ For local development/debugging for the log pages, do the following steps:
33
+
34
+ 1 . Run ` cp .env.sample .env `
35
+ 2 . Change value of ` SKIP_DB_MIGRATIONS ` to ` 1 ` .
36
+ 3 . Run ` cargo run --bin triagebot `
37
+ 4 . Go to this URL: < http://localhost:8000/gha-logs/rust-lang/rust/46814678314 >
38
+
30
39
## Running triagebot
31
40
32
41
It is possible to run triagebot yourself, and test changes against your own repository.
Original file line number Diff line number Diff line change @@ -316,9 +316,11 @@ async fn run_server(addr: SocketAddr) -> anyhow::Result<()> {
316
316
// and the old instance potentially runs on an newer database schema.
317
317
let db_url = std:: env:: var ( "DATABASE_URL" ) . expect ( "needs DATABASE_URL" ) ;
318
318
let pool = db:: ClientPool :: new ( db_url. clone ( ) ) ;
319
- db:: run_migrations ( & mut * pool. get ( ) . await )
320
- . await
321
- . context ( "database migrations" ) ?;
319
+ if !std:: env:: var ( "SKIP_DB_MIGRATIONS" ) . is_ok_and ( |value| value == "1" ) {
320
+ db:: run_migrations ( & mut * pool. get ( ) . await )
321
+ . await
322
+ . context ( "database migrations" ) ?;
323
+ }
322
324
323
325
let ctx = Arc :: new ( Context {
324
326
username : std:: env:: var ( "TRIAGEBOT_USERNAME" ) . or_else ( |err| match err {
You can’t perform that action at this time.
0 commit comments