Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7a58f5eb34143bdfd4d55e060ad267479645637a
      
https://github.com/WebKit/WebKit/commit/7a58f5eb34143bdfd4d55e060ad267479645637a
  Author: Ryan Haddad <[email protected]>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/revert.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py
    M 
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py

  Log Message:
  -----------
  [webkitscmpy] Two revert requests with the same reason but different commits 
posted the same PR with only the description updated
https://bugs.webkit.org/show_bug.cgi?id=321686
rdar://184832018

Reviewed by Aakash Jain.

`git-webkit revert` named its development branch and the summary of the 
Bugzilla using the
revert reason. For the case described in webkit.org/b/321686, this caused the 
second revert
to force-push over the first and update the pull request instead of opening a 
new one.

To avoid this, include the reverted commit identifier in the branch name so it 
becomes something
like eng/revert-318045-main-<reason>. Also stop automation from silently 
re-using a closed pull-request.
The "associated with a closed pull-request, create a new one?" prompt was gated 
on `not args.defaults`,
making it dead code for --defaults callers like webkitbot, which is how a 
closed PR came to be
updated rather than replaced. Non-interactive runs now always create a new 
pull-request.
Using --reopen-closed opts back in.

* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version to 
7.0.6.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.truncate_branch_name): Added, since check-ref-format does not bound 
length.
(Branch.branch_matches_issue): Added.
(Branch.main): Accept name_prefix and prepend it to the branch name. Refresh 
repository._branch
when rebasing an existing branch, otherwise repository.branch returns a stale 
cached value
and the wrong ref is pushed.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.parser): Add --reopen-closed.
(PullRequest.pull_request_branch_point): Forward name_prefix to Branch.main and 
use
Branch.branch_matches_issue.
(PullRequest.find_existing_pull_request): Don't let a closed pull-request 
shadow an open one.
(PullRequest.will_reopen_closed_pull_request): Added.
(PullRequest.create_pull_request): Use it.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/revert.py:
(Revert.branch_name_prefix): Added.
(Revert.main): Pass the reverted commits to pull_request_branch_point.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py:

Canonical link: https://commits.webkit.org/320843@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to