rok opened a new pull request, #55484:
URL: https://github.com/apache/arrow/pull/55484
### Rationale for this change
Committers have to use `dev/merge_arrow_pr.py` with a personal access token
to merge pull requests. The "Squash and merge" button can be used instead if
the bookkeeping the script does is automated.
### What changes are included in this PR?
* `.github/workflows/dev_pr_merged.yml` and
`.github/workflows/dev_pr/merged.js`: a new workflow that runs when a pull
request is merged. It does what the merge script does after the merge:
* Sets the milestone of the issue: the next major release for `main` (same
logic as `get_candidate_fix_version()` in the merge script) and `X.Y.Z` for
`maint-X.Y.Z`. An already assigned milestone is kept.
* Closes the issue with the same comment as the merge script, unless
GitHub closes it because of `Closes: #XXX` in the description.
* Removes the `awaiting ...` labels from the pull request.
* `.asf.yaml`: write down the merge button configuration. This matches the
current repository settings (squash only, pull request title and description as
the commit message).
* `dev/release/utils-list-mergers.sh` and `dev/release/post-04-website.sh`:
count "Patch Committers" for the release announcement by `mergedBy` of the pull
requests via the GitHub API instead of `Signed-off-by:` trailers, which the
merge button doesn't add. The pull request is detected by the `(#XXX)` suffix
of the commit title, so it works for commits cherry-picked to maintenance
branches and for commits merged with either the button or the script.
* `dev/README.md`, `docs/source/developers/overview.rst` and
`docs/source/developers/release.rst`: describe the merge button. The merge
script is kept as an alternative.
Sanity checks on the title are not changed: `dev_pr.yml` already converts
pull requests with an invalid title to draft, which can't be merged.
Open points:
* Commit message: the button doesn't add
`Authored-by:`/`Lead-authored-by:`/`Signed-off-by:` trailers (GitHub adds
`Co-authored-by:` by itself), and it doesn't strip HTML comments, `@mentions`
and CI directives like `[skip ci]` from the description. The committer has to
clean the message in the merge dialog.
* Merge script: the new workflow also runs for pull requests merged with the
script and is likely to close the issue first. Then the script fails with
"already has status 'closed'" after the merge. We need to remove the issue
update from the script or retire the script.
* Milestone: there is no prompt anymore. A milestone has to be fixed by hand
if the default isn't right.
* The names in "Patch Committers" are GitHub profile names (or logins)
instead of `git config user.name`.
### Are these changes tested?
Partially, by hand:
* `utils-list-mergers.sh` for the last 120 commits on `main`: the result
matches `git shortlog -sn --group=trailer:signed-off-by` plus the pull requests
that were already merged with the button.
* `detectFixVersion()` in `merged.js` with the cases of
`dev/test_merge_arrow_pr.py`.
The workflow itself has not been run. `pull_request_target` workflows run
from `main`, so it can only be tried in a fork or after the merge.
### Are there any user-facing changes?
No. This only changes the workflow of committers.
### Was AI used for this PR?
**PR code and description written by:**
- [ ] Human
- [x] AI
**Reviewed before submission by:**
- [ ] Human
- [ ] AI
- [x] Not reviewed
* GitHub Issue: #55475
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]