wangzhigang1999 commented on PR #7654:
URL: https://github.com/apache/kyuubi/pull/7654#issuecomment-5420269381

   The referenced-event fallback does not recognize merge messages generated by 
this script
   
   `_MERGE_FOOTER_RE` requires `Authored-by` or `Lead-authored-by` to appear 
immediately after the `Closes #<pr> from ...` paragraph. However, `merge_pr` 
inserts the linked issue and original commit summaries between those paragraphs.
   
   This does not affect the first merge of a new PR or backports completed in 
the same script run. It affects a later invocation that uses an already-merged 
PR number to continue backporting.
   
   I reproduced this with the existing release-branch PR 
[[#7116](https://github.com/apache/kyuubi/pull/7116)](https://github.com/apache/kyuubi/pull/7116),
 which was merged into `branch-1.10` as commit 
[[7c6d5658](https://github.com/apache/kyuubi/commit/7c6d5658298447ba440cd424d232b4d062573a69)](https://github.com/apache/kyuubi/commit/7c6d5658298447ba440cd424d232b4d062573a69).
 Its relevant events are:
   
   ```text
   referenced  7c6d5658298447ba440cd424d232b4d062573a69
   closed      commit_id=None
   ```
   
   The merge message contains:
   
   ```text
   Closes #7116 from turboFei/fix_conflicts.
   
   Closes #7101
   
   f25f487e8 [Wang, Fei] [KYUUBI #7101][1.10][FOLLOWUP] Fix code broken
   
   Authored-by: Wang, Fei <[email protected]>
   ```
   
   Running the code from this PR against those events gives:
   
   ```python
   find_merge_commit(7116, events)
   # (None, None)
   ```
   
   Since the `closed` event has no commit ID, `find_merge_commit` must use the 
referenced commit. The regex rejects its message, so a later invocation fails 
to recognize that PR #7116 has already landed and continues through the normal 
merge path instead of the backport path.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to