Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a3545b2067bea22595baa52ed1e1b26bb9d60d50
https://github.com/WebKit/WebKit/commit/a3545b2067bea22595baa52ed1e1b26bb9d60d50
Author: David Kilzer <[email protected]>
Date: 2026-04-20 (Mon, 20 Apr 2026)
Changed paths:
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
M
Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/create_bug.py
M
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/create_bug_unittest.py
Log Message:
-----------
`git-webkit create-bug --radar` creates duplicate radar for Security bugs
<https://bugs.webkit.org/show_bug.cgi?id=312722>
<rdar://175112609>
Reviewed by Jonathan Bedard.
Bugzilla auto-CCs WebKit Bug Importer on Security-product bugs at
creation time. Because `cc_radar()` only added the `InRadar` keyword
when the importer was not yet CC'd, bugs created with
`git-webkit create-bug --radar` on the Security product never received
the keyword, and the importer created a duplicate radar.
A secondary issue occurred when `cc_radar()` detected the importer was
already CC'd with no radar imported and prompted "Would you like to CC
rdar://NNNNNNNNN?" via `Terminal.choose()`, which failed with EOF when
stdin was not a TTY.
Fix the first issue by adding `InRadar` to the keywords list in
`CreateBug.main()` before calling `tracker.create()` when `--radar` is
provided.
Fix the second issue by checking whether `InRadar` is already present in
the bug's keywords inside `cc_radar()` before prompting -- when it is
(because `create-bug` set it at creation time), skip the prompt and
proceed to add the `<rdar://problem/NNNNNNNNN>` comment.
Also set `keyword_to_add = 'InRadar'` unconditionally in `cc_radar()`
when a radar is provided. The old code only set it when `user_to_cc`
was truthy, so the "overwrite different radar" prompt path also forgot
to add `InRadar`.
Covered by newly added unit tests.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker.cc_radar):
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:
(TestBugzilla.test_cc_radar_importer_already_cced_with_explicit_radar): Add.
- Verify `cc_radar()` skips the prompt and adds the comment when the
importer is already CC'd and `InRadar` is already in keywords.
(TestBugzilla.test_cc_radar_importer_already_cced_no_inradar_prompts): Add.
- Verify `cc_radar()` prompts when the importer is already CC'd, no
radar is tracked, and `InRadar` is not in keywords.
(TestBugzilla.test_cc_radar_importer_already_cced_different_tracked_bug): Add.
- Verify `cc_radar()` prompts to overwrite when the importer is
already CC'd and a different bug is already tracked.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/create_bug.py:
(CreateBug.main):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/create_bug_unittest.py:
(TestCreateBug.test_radar_adds_inradar_keyword): Add.
Canonical link: https://commits.webkit.org/311605@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications