-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Bors configuration and documentation #686
Conversation
bors try |
tryConfiguration problembors.toml: syntax error |
bors try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
tryBuild succeeded |
bors try |
It would appear that the "short form" referenced here for setting the committer is seen as "invalid syntax," but the "long form" worked. Open question for @CodeMonkeyLeet and @johnkord: The default user/email is |
bors try just testing how it makes that commit |
tryNot awaiting review |
bors try foo |
tryNot awaiting review |
bors try foo |
tryNot awaiting review |
bors try |
tryNot awaiting review |
bors try |
tryNot awaiting review |
Did I break it? Closing and re-opening... |
bors try |
tryNot awaiting review |
Sorry for the spam; deleted the trying branch, trying again. bors try |
Woohoo webhook worked. Sad thing is all this worked in my fork since I was setting it up "fresh" but transferring it turned out to be more work than I expected. |
tryBuild succeeded |
This commit updates the "DOs" and "Merging Pull Requests" for the new Bors workflow. It also adds a rule to ensure commit authorship is correct, as this appears to be an ongoing problem. Some other formatting inconsistencies were fixed.
@johnkord @CodeMonkeyLeet are you guys happy with the configuration (especially the Bors bot name and email)? |
bors try |
@johnkord Ah so apparently that's expected; I thought it linked to the bot if it was the default, but I tried in the |
tryBuild succeeded |
@@ -65,12 +65,12 @@ Please do: | |||
* **DO** tag any users that should know about and/or review the change. | |||
* **DO** ensure each commit successfully builds on all platforms and passes all | |||
unit tests. | |||
* **DO** rebase and squash unnecessary commits before opening the PR, so that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really necessary? If PRs get squash merged anyway what's the point? When a PR is created I normally don't look at the commits but just at the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRs won't get squashed any more. If you want to squash it, do it manually. It is totally up to the author how they want to represent their work.
This isn't to pick on anyone (I didn't even look at the authorship), but history like this is not very useful:
6778b20fc clang break
cd153edbe clang build errors
c8f11599c Clang build breaks
b05bd8cc5 clang break
4aaccb61c fix clang build break
3114f89d7 fix clang build break
6e781d01f fix clang error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@letmaik You okay with that?
Draft of instruction email to be sent after this is merged: The Bors bot is now ready to go online. What this means for you is that existing pull requests should either rebase on top of master, or merge master into your branch. Moving forward, in order to merge a finished PR (and to trigger CI for a PR), the commands More information on the Bors bot command reference is here: https://bors.tech/documentation/ To ensure your branch can use Bors, check that you have the file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly doc comments suggestions
docs/Contributing.md
Outdated
_only_ approved mechanism of merging code to `master`. When a PR is ready to be | ||
merged, a maintainer will comment on it with `bors r+`. Bors will automatically | ||
apply the PR's commits to a staging branch, run the test suite, and if | ||
everything passes, pushes the commits (and a merge commit) to `master`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify the sentence structure, probably clearer to enumerate:
Bors will automatically:
1. Apply the commits from the PR to a staging branch based on `master`.
1. Trigger the code integration (CI) system to build and test the staging branch.
1. Push the commits and a merge commit to `master` only if everything passes.
docs/Contributing.md
Outdated
apply the PR's commits to a staging branch, run the test suite, and if | ||
everything passes, pushes the commits (and a merge commit) to `master`. | ||
|
||
At first glance this may appear to be no different then allowing the CI system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar: "different from" (or if you accept colloquial usage, "different than")
docs/Contributing.md
Outdated
everything passes, pushes the commits (and a merge commit) to `master`. | ||
|
||
At first glance this may appear to be no different then allowing the CI system | ||
to test the PR, and then merging with "the big green button." However, allowing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest simplifying the paragraph to:
We require the use of Bors because it prevents a race condition that can result from manual merges: two conflicting PRs may both pass CI testing independently while neither is in
master
, only to break the branch once both are merged. Bors synchronizes the CI testing of PRs and ensures that passing PRs are immediately merged, so that the state ofmaster
always reflects the state tested and passed by CI.
docs/Contributing.md
Outdated
|
||
| Syntax | Description | ||
|--------|------------ | ||
| bors r+ | Run the test suite, and push to master if it passes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: remove the comma, it's not a serial (oxford) comma since the "and" is a conjunction. Word flags it.
docs/Contributing.md
Outdated
|--------|------------ | ||
| bors r+ | Run the test suite, and push to master if it passes. | ||
| bors r- | Cancel a pending r+. | ||
| bors try | Run the test suite without pushing (trigger CI). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider simplifying to just "Run the CI tests but do not merge on success."
docs/Contributing.md
Outdated
| bors try | Run the test suite without pushing (trigger CI). | ||
| bors delegate+ | Allow the pull request author to r+. | ||
| bors delegate=[list] | Allow the listed users to r+. | ||
| bors ping | Will respond if Bors is up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency in use of direct, active voice: "Check if Bors is responsive. It will comment with pong if it is."
docs/Contributing.md
Outdated
@@ -153,10 +186,10 @@ You can read more about [Contribution License Agreements (CLA)]( | |||
http://en.wikipedia.org/wiki/Contributor_License_Agreement) on Wikipedia. | |||
|
|||
You don't have to do this up-front. You can simply clone, fork, and submit your | |||
pull-request as usual. When your pull-request is created, it is classified by a | |||
Pull Request as usual. When your Pull Request is created, it is classified by a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should standardize on how GitHub refers to these as simply "pull request" (it's also referred to as such elsewhere in this doc), unhyphenated and uncapitalized (it's not treated as a proper noun).
docs/Contributing.md
Outdated
: | ||
Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)), | ||
and use the present tense and imperative mood when describing your changes. This | ||
is akin to the commit "giving a command" to the code base, and is used by the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is a little confusing. It sounds like it should be combined with the previous clause you added … did you mean:
Write your descriptions as imperatives in the active voice, as if you are telling Git what you want it to do to the code base.
docs/Contributing.md
Outdated
@@ -143,6 +163,19 @@ Also do your best to factor commits appropriately, not too large with unrelated | |||
things in the same commit, and not too small with the same small change applied | |||
_n_ times in _n_ different commits. | |||
|
|||
Please ensure the correct name and email are set in the commit. See [initial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest presenting direct information before links in general:
Ensure that the correct author name and email are set for the commit. For example, before commiting, ensure that Git is configured with your user name and email:
...
For more details, see [initial setup for Git](https://git-scm.com/...
docs/Contributing.md
Outdated
``` | ||
|
||
We _will not_ accept commits with incorrect authorship. To fix the authorship of | ||
commits in a feature branch, use `git rebase`, choose to `edit` the offending |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multi-line instructions are probably best captured as lists:
If you have existing commits with incorrect author information, you can fix them as follows:
git rebase
your working branch- Choose to
edit
the commits with incorrect authorship
- For each edit,
git commit --amend --reset-author
Thanks @CodeMonkeyLeet. I also pushed the table's changes upstream bors-ng/bors-ng.github.io#54 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
bors r+ |
Build succeeded |
Woo-hoo everything worked according to plan. |
@letmaik Yes... that is to say, as the author of the PR, it's what I wanted: three clean commits for (1) the If a PR has half a dozen commits that should be squashed, it's a trivial ask that the dev do That said, here's the relevant issue if you want to help implement it bors-ng/bors-ng#194 |
No description provided.