Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 00845d94ab4d5f41477ae5056b5a20d4f1f0906e
      
https://github.com/WebKit/WebKit/commit/00845d94ab4d5f41477ae5056b5a20d4f1f0906e
  Author: David Kilzer <[email protected]>
  Date:   2026-04-27 (Mon, 27 Apr 2026)

  Changed paths:
    M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
    M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py
    M 
Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py

  Log Message:
  -----------
  git-webkit create-bug --see-also causes cc_radar() to prompt about 
overwriting the wrong bug
<https://bugs.webkit.org/show_bug.cgi?id=313182>
<rdar://175465077>

Reviewed by Pascoe and Jonathan Bedard.

When create-bug adds --see-also URLs pointing to other bugzilla bugs,
those links appear in issue.references alongside any radar references.
cc_radar() blindly used references[0] to check for an already-tracked
radar, so a see-also bugzilla link in that position caused the
"tracking a different bug" prompt -- targeting the wrong bug entirely.

Filter issue.references to only consider RadarTracker instances when
checking for an already-tracked radar. This matches the pattern used
by every other consumer of issue.references (clone.py, branch.py,
and the polling loop in cc_radar itself).

Also fix the existing test_cc_radar_importer_already_cced_different_-
tracked_bug test, which was asserting the buggy behavior: it used a
bugzilla see-also reference (references=[2]) but expected the
"tracking a different bug" prompt. Replace with a radar reference
via the issue description (<rdar://problem/2>) to properly test the
legitimate "different tracked radar" scenario.

Fix the _see_also() mock endpoint to include related_links (see-also
URLs added via tracker.set()), matching the full bug response that
already includes them. Without this, see-also links added after bug
creation were invisible when populate() re-fetched references.

* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker.cc_radar):

* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py:
(Bugzilla._see_also):

* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:
(BugzillaTrackerTest.test_cc_radar_importer_already_cced_different_tracked_bug):
(BugzillaTrackerTest.test_cc_radar_see_also_not_confused_as_tracked_radar):
(BugzillaTrackerTest.test_cc_radar_multiple_see_also_no_radar_references): Add.
(BugzillaTrackerTest.test_cc_radar_multiple_references_with_one_radar): Add.

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



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

Reply via email to