Skip to content

Commit ec866a8

Browse files
authored
Rollup merge of rust-lang#150308 - Kobzol:bors-conf, r=marcoieni
Update bors configuration Updates the configuration of bors to bring it up to speed with homu, in preparation for rust-lang/infra-team#168. Mirrors configuration from homu's [configuration file](https://github.com/rust-lang/homu/blob/master/cfg.production.toml#L46). This PR also enables reporting of merge conflicts, so that we can test this part of bors on `rust-lang/rust`. The merge conflict reports will be duplicated (until/unless we disable it in homu), but that hopefully shouldn't be such a big deal. r? `@marcoieni`
2 parents ae3a020 + bbf4ec3 commit ec866a8

File tree

3 files changed

+46
-4
lines changed

3 files changed

+46
-4
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
- try
1616
- try-perf
1717
- automation/bors/try
18+
- automation/bors/auto
1819
pull_request:
1920
branches:
2021
- "**"
@@ -56,7 +57,7 @@ jobs:
5657
- name: Test citool
5758
# Only test citool on the auto branch, to reduce latency of the calculate matrix job
5859
# on PR/try builds.
59-
if: ${{ github.ref == 'refs/heads/auto' }}
60+
if: ${{ github.ref == 'refs/heads/auto' || github.ref == 'refs/heads/automation/bors/auto' }}
6061
run: |
6162
cd src/ci/citool
6263
CARGO_INCREMENTAL=0 cargo test
@@ -79,7 +80,7 @@ jobs:
7980
# access the environment.
8081
#
8182
# We only enable the environment for the rust-lang/rust repository, so that CI works on forks.
82-
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try' || github.ref == 'refs/heads/auto')) && 'bors') || '' }}
83+
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try' || github.ref == 'refs/heads/auto' || github.ref == 'refs/heads/automation/bors/auto')) && 'bors') || '' }}
8384
env:
8485
CI_JOB_NAME: ${{ matrix.name }}
8586
CI_JOB_DOC_URL: ${{ matrix.doc_url }}
@@ -313,7 +314,7 @@ jobs:
313314
needs: [ calculate_matrix, job ]
314315
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
315316
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
316-
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try' || github.ref == 'refs/heads/auto')) && 'bors') || '' }}
317+
environment: ${{ ((github.repository == 'rust-lang/rust' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf' || github.ref == 'refs/heads/automation/bors/try' || github.ref == 'refs/heads/auto' || github.ref == 'refs/heads/automation/bors/auto')) && 'bors') || '' }}
317318
steps:
318319
- name: checkout the source code
319320
uses: actions/checkout@v5

rust-bors.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,42 @@ labels_blocking_approval = [
2525
"S-waiting-on-t-rustdoc-frontend",
2626
"S-waiting-on-t-clippy"
2727
]
28+
29+
# If CI runs quicker than this duration, consider it to be a failure
30+
min_ci_time = 600
31+
32+
[labels]
33+
approved = [
34+
"+S-waiting-on-bors",
35+
"-S-blocked",
36+
"-S-waiting-on-author",
37+
"-S-waiting-on-crater",
38+
"-S-waiting-on-review",
39+
"-S-waiting-on-team"
40+
]
41+
unapproved = [
42+
"+S-waiting-on-author",
43+
"-S-blocked",
44+
"-S-waiting-on-bors",
45+
"-S-waiting-on-crater",
46+
"-S-waiting-on-review",
47+
"-S-waiting-on-team"
48+
]
49+
try_failed = [
50+
"+S-waiting-on-author",
51+
"-S-waiting-on-review",
52+
"-S-waiting-on-crater"
53+
]
54+
auto_build_succeeded = ["+merged-by-bors"]
55+
auto_build_failed = [
56+
"+S-waiting-on-review",
57+
"-S-blocked",
58+
"-S-waiting-on-bors",
59+
"-S-waiting-on-author",
60+
"-S-waiting-on-crater",
61+
"-S-waiting-on-team"
62+
]
63+
64+
# Flip this two once new bors is used for actual merges on this repository
65+
merge_queue_enabled = false
66+
report_merge_conflicts = true

src/ci/citool/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ impl GitHubContext {
4646
let patterns = if !patterns.is_empty() { Some(patterns) } else { None };
4747
Some(RunType::TryJob { job_patterns: patterns })
4848
}
49-
("push", "refs/heads/auto") => Some(RunType::AutoJob),
49+
("push", "refs/heads/auto" | "refs/heads/automation/bors/auto") => {
50+
Some(RunType::AutoJob)
51+
}
5052
("push", "refs/heads/main") => Some(RunType::MainJob),
5153
_ => None,
5254
}

0 commit comments

Comments
 (0)