Skip to content

Commit

Permalink
Add support for bors-ng github bot
Browse files Browse the repository at this point in the history
Enforce the "not rocket science" rule.

bors modifies the usual github CI workflow in a subtle but important
way:

With regular github, the CI test (eg: travis-ci) needs to pass before
the Merge button goes green - but the PR might be against a stale
version of master, and the test *does not have to pass against
master+PR*.  There is a github option to enforce this too, but it puts
the work on the user and requires them to rebase against HEAD before
the merge button will go green.

After the PR has been "approved" (*), bors rebases the PR and runs the
CI bot (travis) *again* against master+PR, and only merges if that
passes.  Iow, "approve-for-merge" is separated from "actually-merge".

Subtle, but important :P

See https://graydon.livejournal.com/186550.html for the blog version
of the above.

(*) bors approval is indicated with a `bors r+` github comment.  See
https://bors.tech/documentation/ for other bot commands.
  • Loading branch information
anguslees committed May 9, 2018
1 parent c643314 commit b5ffb75
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ branches:
- master - master
# release tags # release tags
- /^v\d+\.\d+\.\d+.*/ - /^v\d+\.\d+\.\d+.*/
# for bors (in particular: don't build "staging.tmp")
- staging
- trying


notifications: notifications:
email: email:
Expand Down
10 changes: 10 additions & 0 deletions bors.toml
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,10 @@
status = [
"continuous-integration/travis-ci/push"
]

pr_status = [
"continuous-integration/travis-ci/pr"
]

required_approvals = 1
delete_merged_branches = true

0 comments on commit b5ffb75

Please sign in to comment.