Github merge script (zk-merge-pr.py) is a nice tool which does a lot of housekeeping tasks when merging a PR including fixing the commit message or closing the Jira. Merging on the Github UI is also possible, but could lead to mistakes like leaving the commit message without the Jira id.
Unfortunately when the script merges the PR it does that without Github and leaving the PR in 'Closed' rather than 'Merged'. This is misleading. Let's improve the script to use Github API for merging PRs and possibly disable merging on the Github UI.
A few enhancements to the script by the Spark team since we ported it. Might be useful to backport some of these too:
SPARK-44972 Eagerly check if the token is valid to align with the behavior of username/password auth SPARK-45008 Improve branch suggestion for backporting SPARK-45031 Choose the right merge code path and merge hash for reopened PRs SPARK-45007 fix merged pull requests resolution SPARK-44813 The JIRA Python misses our assignee when it searches user again SPARK-44944 Auto grant contributor role to first-time contributors SPARK-44875 commentor to commenter in merge script SPARK-44760 Index Out Of Bound for JIRA resolution in merge_spark_pr SPARK-44802 Token based ASF JIRA authentication