Skip to content

[INFRA] Improve pull request merge tool - #7654

Open
pan3793 wants to merge 8 commits into
apache:masterfrom
pan3793:merge-pr-script
Open

[INFRA] Improve pull request merge tool#7654
pan3793 wants to merge 8 commits into
apache:masterfrom
pan3793:merge-pr-script

Conversation

@pan3793

@pan3793 pan3793 commented Aug 24, 2026

Copy link
Copy Markdown
Member

Why are the changes needed?

This ports several useful improvements from Spark's merge tool, adapted to Kyuubi's GitHub-only workflow. It makes merges and backports safer, more traceable, and less error-prone for committers.

  • Suggest backport branches in descending release order, such as branch-1.12, then branch-1.11, and skip branches already picked.
  • Post a merge summary comment listing every branch and full commit link where the change landed.
  • Normalize confirmation prompts to (y/N).
  • Detect already-merged PRs more robustly, including reopened PRs and merges referenced by commits.
  • Explicitly close PRs merged into non-default branches when GitHub does not auto-close them.
  • Validate PR numbers, yes/no answers, and backport branch names before proceeding.
  • Derive lead and co-authors from GitHub-linked commits, defaulting the lead author to the PR author.
  • Apply Black formatting to the merge script.

How was this patch tested?

  • python3 -m py_compile dev/merge_kyuubi_pr.py
  • python3 -m doctest dev/merge_kyuubi_pr.py
  • black --check dev/merge_kyuubi_pr.py
  • git diff --check

Was this patch assisted by generative AI tooling?

Assisted-by: Codex:GLM 5.3

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.

1 participant