pan3793 opened a new pull request, #3823:
URL: https://github.com/apache/celeborn/pull/3823

   ### What changes were proposed in this pull request?
   
   Port three `merge_pr.py` improvements from Spark's `merge_spark_pr.py`:
   
   1. Post a "Merge Summary" comment on the PR after the merge, recording every 
branch the
      change landed on and a link to the resulting commit. `cherry_pick` now 
returns the
      `(ref, hash)` pair it pushed so backports are included, and the comment 
is posted from
      a `finally` block, so a cancelled cherry-pick does not drop what already 
landed. The
      backport path (PR already merged) posts a summary too. Without 
`GITHUB_OAUTH_KEY` the
      summary is printed to the console and the POST is skipped.
   
   2. Close the PR through the API when it is still open after the push. 
`Closes #N` only
      auto-closes the PR when the commit lands on the default branch, so merges 
into
      `branch-x.y` leave it open.
   
   3. Polish the interactive prompts: capitalize `N` in the `(y/n)` prompts, 
since all of
      them treat any input other than `y` as no, and add the missing space 
after `":"` in
      the JIRA assignee prompt.
   
   The comment looks like:
   
   > **Merge Summary:**
   > - merged into main https://github.com/apache/celeborn/commit/cd44172a
   > - merged into branch-0.6 https://github.com/apache/celeborn/commit/abcd1234
   >
   > *Posted by `merge_pr.py`*
   
   ### Why are the changes needed?
   
   A merged PR currently records nothing about where the change landed: the 
commit is
   reachable only by searching for the `Closes #N` footer, and backport targets 
are not
   visible from the PR page at all. Backport PRs against `branch-x.y` also stay 
open after
   being merged and have to be closed by hand.
   
   ### Does this PR resolve a correctness bug?
   
   - [ ] Yes
   
   ### Does this PR introduce _any_ user-facing change?
   
   - [ ] Yes
   
   ### How was this patch tested?
   
   Manually: `python3 -m py_compile dev/merge_pr.py` and the module doctests 
pass, and the
   merge summary rendering was smoke-tested locally with and without 
`GITHUB_OAUTH_KEY`.
   The GitHub API calls will be exercised by the next real merge.
   


-- 
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]

Reply via email to