Repository navigation
Conversation
4b8ed1c to
c34e788
Compare
|
|
a681b72 to
8af40b8
Compare
96ffdb2 to
3a6799e
Compare
3a6799e to
65e2f5a
Compare
65e2f5a to
36ac2dd
Compare
Document the "Squash and merge" button as the way to merge pull requests. The merge script is still available. Before the merge, the "PR Title" status of the Boring Cyborg app is a required status check on main: the pull request title must start with "GH-XXX" or "MINOR: ". The required check rejects direct pushes to main, so the release guide tells release managers to bump versions with a pull request. After the merge, a workflow for pushes to main assigns the issue to the pull request author if it isn't assigned, sets its milestone, closes it and comments which pull request resolved it.
34ba758 to
7c60120
Compare
The "PR Title" check no longer accepts "WIP: GH-XXX" titles. They passed the required check but the "Dev PR merged" workflow ignored them, so the issue stayed open after the merge. dev/release/post-10-bump-versions.sh no longer pushes to main or creates the dev tag by default because the push is rejected by the required check.
There was a problem hiding this comment.
We will stop having the signed-off-by trailer on the git commit messages. This will stop working right?
arrow/dev/release/post-04-website.sh
Lines 78 to 82 in dd7dfc6
| required_status_checks: | ||
| # Don't require branches to be up to date before merging. | ||
| strict: false | ||
| # The title check ("verifyTitles") of the Boring Cyborg app | ||
| # in .github/boring-cyborg.yml. The merge button is disabled | ||
| # while the pull request title doesn't start with "GH-XXX" | ||
| # or "MINOR: ". | ||
| contexts: | ||
| - PR Title |
There was a problem hiding this comment.
I think this is too restrictive and eventually there will be a time where this fails (cyborg-app is down) we have to push an expedited thing... I am sure we can't foresee it now but will happen and I'd rather not have this as a required status check. Removing this allows us to remove the changes on release bump scripts etcetera.
There was a problem hiding this comment.
I agree boring-cyborg glitching occasionally is likely and not having this button will be annoying.
However gating the merge button here guarantees bad titles don't get merged. How problematic are bad titles for us? Should we have somesort of post merge change?
There was a problem hiding this comment.
I expect committers to do a quick check same as linter CI etc. I don't think is worst than linting failing or breaking other CI jobs tbh
There was a problem hiding this comment.
We could have post merge script push a message into the PR about bad title or even amend the commit?
| pull_request=$( | ||
| gh api "repos/${GH_REPO}/commits/${COMMIT}/pulls" \ | ||
| --jq "map(select(.merge_commit_sha == \"${COMMIT}\"))[0] // empty") | ||
| if [ -z "${pull_request}" ]; then | ||
| echo "${COMMIT} isn't the merge commit of a pull request." | ||
| exit 0 | ||
| fi | ||
| title=$(jq -r .title <<< "${pull_request}") | ||
| if [[ ! "${title}" =~ ^GH-([0-9]+) ]]; then | ||
| echo "No GitHub issue in the title: ${title}" | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
we can extract it from the commit message instead of playing with the PR, feels more natural and we avoid http requests to GH API here.
There was a problem hiding this comment.
Changed. There's still some gh use for the milestone, but title etc comes form the commit message now.
Address review comments: * The "PR Title" status isn't a required status check of main. The Boring Cyborg app may be down when we need to merge. * Direct pushes to main work again, so the changes of dev/release/post-10-bump-versions.sh and the "Bump versions" step of the release guide are reverted. * The "Dev PR merged" workflow reads the issue and the pull request from the title of the pushed commit, "GH-XXX: ... (#YYY)", instead of asking GitHub for the pull request of the commit. The milestone of the pull request isn't used anymore. * dev/release/post-04-website.sh asks GitHub who merged the pull requests for "Patch Committers". Commits merged with the merge button don't have "Signed-off-by:" trailers.
Yes, singed-off-by and authored-by will no longer be written. We could amend commits after merge, but I'd avoid that. |
0d158a5 to
fab6257
Compare
| # Count the pull requests of the commits in ${git_range} by who merged | ||
| # them. We ask GitHub because commits merged with the merge button | ||
| # don't have "Signed-off-by:" trailers. | ||
| list_committers() { |
|
On the community meeting, it was mentioned that the top description is actually no longer up to date:
However, personally I think it is simpler to just rely on github's auto-closing of issues based on a "closes #.." (or equivalent). IMO it is simpler (for the maintainer, because that is in general how github works, and you don't have to know all details of our custom workflows) and avoids having additional custom workflow logic (it also allows the maintainer for whatever reason to not close the issue by merging the PR, or if we in the future want to use this practice more) |
|
And while we are touching the merge workflow, is there appetite in discussing what the commit message should be?
Would we be fine with just using the title (any co-authored-by lines as needed)? |
dev/release/post-04-website.sh published a partial count if one of the GitHub requests failed. Also document that the script needs an authenticated gh.
Address review comments: rely on GitHub closing the issue from a closing keyword in the pull request description. * The Boring Cyborg app writes "Closes #XXX" to the "GitHub Issue:" line of a pull request to main. It leaves "Refs #XXX" alone: that is for a partial fix, which keeps the issue open. * The "Dev PR merged" workflow doesn't close the issue or comment on it anymore. It only assigns the issue and sets its milestone, and only if GitHub closed the issue. It doesn't need the "(#YYY)" suffix of the commit title anymore.
Changed to use "closes #" 5619a5b. I like it's the github way of doing thing, but not sure either way. |
Why would we not store a long message and keep git as the canonical history record (even if sometimes wildly wrong). It's possible to reduce verbosity of |
Rationale for this change
Committers need a personal access token and
dev/merge_arrow_pr.pyto merge a pull request. With this change they can use the "Squash and merge" button instead.What changes are included in this PR?
.github/boring-cyborg.yml: for a pull request tomain, the Boring Cyborg app writesCloses #XXXto theGitHub Issue:line of the description, so GitHub closes the issue on merge. It leavesRefs #XXXon that line alone: that keeps the issue open for a partial fix. The "PR Title" status no longer acceptsWIP: GH-XXXtitles. It doesn't block the merge..github/workflows/dev_pr_merged.yml(new): does the rest of the issue update of the merge script. On a push tomainwith aGH-XXX: ...commit title, if GitHub closed the issue, it assigns the issue to the commit author if nobody is assigned and sets the next major release as the milestone if the issue has none.dev/release/post-04-website.sh: "Patch Committers" is counted from who merged each pull request on GitHub. Button merges don't have theSigned-off-by:trailers it used.Are these changes tested?
CI passes, but it doesn't run the new workflow: that can only run once this is on
main. Locally, I ran the workflow step against apache/arrow with the writes printed instead of executed, checked the new patterns of the Boring Cyborg configuration against sample titles and descriptions, and compared the new committer count for 25.0.0..26.0.0 with the old one (395 merges, 390 from the trailers).Are there any user-facing changes?
No.
Was AI used for this PR?
PR code and description written by:
Reviewed before submission by: