Bug 244660

Summary: [git-webkit] Accidental overwrite of pull request with similar branch names in Github
Product: WebKit Reporter: Lauro Moura <lmoura>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: jbedard, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 244894    
Bug Blocks: 239082    

Description Lauro Moura 2022-08-31 23:05:19 PDT
When searching for pull requests by branch name, the qualifier `head:NAME` matches branches beginning with NAME instead of exact matches. This may cause git-webkit to assume a PR exists for a new branch with similar name to a previous one.

Example:

Last week I pushed https://github.com/WebKit/WebKit/pull/3732, with branch `non-unified-august-26th`. Submitted and merged normally.

Today I tried to submit a new one with branch name `non-unified-august`. The submition ended up finding PR-3732, and overwriting the description of it.

Maybe a fix would be checking for exact head/branch name match when checking whether we have an opened PR? (program/pull_request.py:PullRequest.find_existing_pull_request)

Link to Github docs: https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests#search-by-branch-name
Comment 1 Radar WebKit Bug Importer 2022-09-07 07:05:22 PDT
<rdar://problem/99648208>
Comment 2 Jonathan Bedard 2022-09-07 13:14:12 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4082
Comment 3 Jonathan Bedard 2022-09-07 13:31:17 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4108
Comment 4 EWS 2022-09-14 09:30:59 PDT
Committed 254478@main (9eedf00c4427): <https://commits.webkit.org/254478@main>

Reviewed commits have been landed. Closing PR #4108 and removing active labels.
Comment 5 EWS 2022-09-20 10:44:48 PDT
Committed 252432.448@safari-7614-branch (aec8adaf317c): <https://commits.webkit.org/252432.448@safari-7614-branch>

Reviewed commits have been landed. Closing PR #73 and removing active labels.
Comment 6 Jonathan Bedard 2023-09-15 11:01:10 PDT
*** Bug 242836 has been marked as a duplicate of this bug. ***