Skip to content

GH-55475: [Dev] Use merge button instead of merge script - #55484

Open
rok wants to merge 1 commit into
apache:mainfrom
rok:gh-55475-merge-button
Open

rok wants to merge 1 commit into
apache:mainfrom
rok:gh-55475-merge-button

Conversation

@rok

@rok rok commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Rationale for this change

Committers need a personal access token and dev/merge_arrow_pr.py to merge. This lets them use the "Squash and merge" button instead, like apache/arrow-rs does. The merge script is kept for now and isn't changed.

What changes are included in this PR?

  • Before the merge: a new required "Merge check" job (pull_request) blocks the merge unless the title is GH-XXX: [Component] Title or MINOR: [Component] Title and the issue GH-XXX is open and assigned. GH-XXX in the title is the only link to the issue that is needed.
  • After the merge: a new "Dev PR merged" workflow (push to main) sets the milestone of the issue (the milestone of the pull request if it has one, otherwise the same default as the merge script), closes it, comments "Issue resolved by pull request XXX" and removes the awaiting ... labels from the pull request.
  • Commit message: the pull request title and description as is (.asf.yaml, matches the current settings).
  • Release: "Patch Committers" are counted by who merged the pull request via the GitHub API instead of Signed-off-by: trailers. post-10-bump-versions.sh can't push to main directly anymore because of the required check: it pushes a branch for a MINOR: [Release] ... pull request, and the .dev tag is created by a second run after the pull request is merged.
  • Docs: describe the merge button.

Only pull requests to main are covered.

Things to discuss

  • Release: the version bump is a pull request now, so the changelog and version commits are squashed into one commit and the release manager has to run the script again for the .dev tag.
  • Partial fixes: the issue is always closed on merge, so a pull request that covers only a part of an issue can't keep it open.
  • Commit message format: no Authored-by:/Signed-off-by: trailers for button merges (GitHub adds Co-authored-by:), and the description isn't cleaned unless the committer does it in the merge dialog.
  • Strictness: 9 of the last 400 commits on main would be rejected by the title rule alone. The check doesn't run again when the issue changes, so re-run it or edit the pull request after e.g. assigning the issue.
  • pull_request: the check runs the workflow of the pull request, so a pull request can change the check itself. It needs approval to run for first-time contributors.
  • Merge script: it still works, but the issue may get the "Issue resolved by pull request XXX" comment twice if the script and the new workflow comment at the same time.

Are these changes tested?

Only locally: the JavaScript logic with a fake GitHub client and the mergers script against the last 120 commits. "Merge check" runs on this pull request. The "Dev PR merged" workflow and the required check can only run once this is on main. The changed push and tag steps of post-10-bump-versions.sh have not been run.

Are there any user-facing changes?

No.

Was AI used for this PR?

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

@rok rok changed the title GH-55475: [Dev] Use merge button instead of merge script WIP: GH-55475: [Dev] Use merge button instead of merge script Nov 10, 2026
@rok rok changed the title WIP: GH-55475: [Dev] Use merge button instead of merge script WIP: GH-55475: [Dev] Merge pull requests with a comment instead of the merge script Nov 10, 2026
@rok rok changed the title WIP: GH-55475: [Dev] Merge pull requests with a comment instead of the merge script WIP: GH-55475: [Dev] Use merge button instead of merge script Nov 10, 2026
@rok
rok force-pushed the gh-55475-merge-button branch from 4b8ed1c to c34e788 Compare November 10, 2026 21:02
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #55475 has been automatically assigned in GitHub to PR creator.

@rok
rok force-pushed the gh-55475-merge-button branch 5 times, most recently from a681b72 to 8af40b8 Compare November 10, 2026 22:43
@rok rok changed the title WIP: GH-55475: [Dev] Use merge button instead of merge script GH-55475: [Dev] Use merge button instead of merge script Nov 10, 2026
@rok
rok force-pushed the gh-55475-merge-button branch 2 times, most recently from 96ffdb2 to 3a6799e Compare November 10, 2026 23:14
@rok
rok marked this pull request as ready for review November 10, 2026 23:24
Copilot AI balanced review requested due to automatic review settings November 10, 2026 23:24

This comment was marked as outdated.

Write down the squash merge button configuration and count mergers
for the release announcement with the GitHub API instead of
Signed-off-by trailers. The merge script is still available.

Before the merge, a required "Merge check" status check on main only
passes when the pull request title is "GH-XXX: [Component] Title" or
"MINOR: [Component] Title" and the issue GH-XXX is open and assigned.

The required check rejects direct pushes to main, so
post-10-bump-versions.sh pushes a branch for a pull request instead
and tags the merged commit in a second run.

After the merge, a workflow for pushes to main sets the milestone of
the issue, closes it, comments which pull request resolved it and
removes the
"awaiting ..." labels from the pull request.
@rok
rok force-pushed the gh-55475-merge-button branch from 3a6799e to 65e2f5a Compare November 10, 2026 23:41
Copilot AI balanced review requested due to automatic review settings November 10, 2026 23:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The documented major-release review command leaves tagging enabled, causing a normal first run to fail while looking for an already-merged bump PR.

2 open issues

Review effort: Balanced

Comment on lines +632 to +633
and merge it. You can run the script with ``BUMP_PUSH=0`` to review the
commits before you push them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants