Skip to content

Commit 0fbd2c5

Browse files
authored
Merge pull request #571 from rylev/update-bors-instructions
Update the instructions on setting up bors
2 parents ae221c1 + dd3e568 commit 0fbd2c5

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

src/infra/docs/bors.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,42 @@ There are multiple steps needed to add a repository to our Bors instance:
5151
Make sure to replace `[ALL, OTHER, JOBS]` with a list of all the jobs you
5252
want to gate on.
5353

54-
3. Add the repository name to the `permissions!` macro in the [team
54+
These jobs need to run on specific branches (`auto` and `try`) so it's necessary
55+
to add those branches to the list of branches tested by the CI provider. For GitHub
56+
Actions that looks like this:
57+
58+
```yaml
59+
on:
60+
push:
61+
branches: [
62+
auto, # Added for bors
63+
try # Added for bors
64+
]
65+
```
66+
67+
3. Add the repository name to the bors permissions array in the [team
5568
repository][team-permissions.rs], and grant the `bors.REPOSITORY.review`
56-
permission to the right people.
69+
permission to the right teams or people. You can see an example of adding
70+
bors permissions to a team [here][bors-permission].
5771

58-
3. Add the repository to the `repositories` map in [the Terraform configuration
72+
4. Add the repository to the `repositories` map in [the Terraform configuration
5973
file][tf-repos]. This will create a webhook and inject its secret key in the
6074
bors execution environment.
6175

62-
4. Add the repository to the [Bors configuration][bors-config], taking
63-
inspiration from other repositories.
76+
5. Add the repository to the [Bors configuration][bors-config], taking
77+
inspiration from other repositories. Note that the environment variables used
78+
in that config will be set automatically as long as you completed step 3 above.
79+
80+
6. Give it a test by commenting `@bors ping` in any PR. If you get a response back,
81+
you can then try to approve the PR with `@bors r+`.
6482

6583
[@bors]: https://github.com/bors
6684
[Homu]: https://github.com/rust-lang/homu
6785
[bors-config]: https://github.com/rust-lang/homu/blob/master/cfg.production.toml
6886
[bors.rust-lang.org]: https://bors.rust-lang.org
6987
[ecs]: ./ecs-service.md
7088
[rust-lang/homu]: https://github.com/rust-lang/homu
71-
[team-permissions.rs]: https://github.com/rust-lang/team/blob/master/src/permissions.rs
89+
[team-permissions.rs]: https://github.com/rust-lang/team/blob/52b4370214e1c8eabe483f3a26f22733d94b326f/config.toml#L18-L37
90+
[bors-permission]: https://github.com/rust-lang/team/blob/a1532ec2b08c9d40c0a2c7643ffe72de9671e265/teams/wg-compiler-performance.toml#L25-L26
7291
[tf-repos]: https://github.com/rust-lang/simpleinfra/blob/master/terraform/bors/_config.auto.tfvars
7392
[tf]: https://github.com/rust-lang/simpleinfra/tree/master/terraform/bors/

0 commit comments

Comments
 (0)