Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 00af9f0cd69117d359726aace2d4490d29bf1e44
https://github.com/WebKit/WebKit/commit/00af9f0cd69117d359726aace2d4490d29bf1e44
Author: David Kilzer <[email protected]>
Date: 2026-04-13 (Mon, 13 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/radar.py
A
Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_security_unittest.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/create_bug.py
A
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/tracker_metadata.py
A
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/create_bug_unittest.py
A
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/tracker_metadata_unittest.py
Log Message:
-----------
git-webkit: add `create-bug` and `tracker-metadata` subcommands
<https://bugs.webkit.org/show_bug.cgi?id=309535>
<rdar://problem/172135894>
Reviewed by Pascoe and Jonathan Bedard.
Add two subcommands to provide a scriptable bug tracker interface,
primarily to support external tooling such as LLM-based skills.
`git-webkit create-bug` creates a new bug on the configured tracker.
It optionally links the bug to an existing radar or auto-creates a
new radar for it, and determines whether the Security product and
component are required based on the provided radar and the title and
description.
`git-webkit tracker-metadata` queries the tracker for its available
products, components, and keywords -- including descriptions -- so
external tools can discover and validate choices before calling
create-bug without extra round-trips.
Both `create-bug` and the existing `branch` subcommand share radar
URL parsing through the new `radar.Tracker.parse_id()` classmethod,
which uses `urllib.parse.urlparse()` to handle all radar URL forms
(rdar://, radar://, https://rdar.apple.com/) and extract numeric
IDs. This replaces the `RES` compiled-regex list that
`from_string()` previously relied on, and eliminates the duplicate
`urlparse` logic that `parse_radar_arg()` previously contained.
Covered by newly added unit tests.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker.set):
- Add `cc` parameter.
(Tracker.SECURITY_KEYWORDS):
(Tracker.check_security_keywords):
(Tracker.prompt_security_classification):
(Tracker.classify_from_radar):
(Tracker.valid_keywords):
- Return a dict mapping keyword names to their descriptions rather
than a list, so callers can surface contextual help.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py:
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:
(Tracker.parse_id):
- Extract radar URL parsing into a shared classmethod that accepts
rdar://, radar://, and https://rdar.apple.com/ forms with optional
angle brackets and ampersand-separated multi-ID URLs. Return the
numeric ID as a string (single) or list of strings (multiple), or
None on no match.
(Tracker.from_string):
- Delegate to parse_id() instead of iterating the RES regex list.
For multi-ID URLs, take the first ID to preserve existing behavior.
(Tracker.RES):
- Remove the compiled-regex list, now superseded by parse_id().
*
Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_security_unittest.py:
Add.
(TestBugzillaSecurityKeywords):
(TestBugzillaClassifyFromRadar):
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py:
(TestRadarParseId):
- Cover all single-ID URL forms, angle brackets, ampersand multi-ID
URLs, bare integers, and invalid inputs.
(TestRadarFromString):
- Regression tests verifying from_string() behavior is unchanged
after the parse_id() refactor.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.main):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/create_bug.py: Add.
(CreateBug):
(CreateBug.parser):
(CreateBug.parse_radar_arg):
- Delegate URL parsing to radar.Tracker.parse_id() instead of
reimplementing urlparse logic. Accept https://rdar.apple.com/N
in addition to rdar:// and radar:// forms. Normalize all outputs
to rdar://N format.
(CreateBug.main):
(CreateBug._post_create_operations):
- Filter the radar importer from the explicit --cc list so cc_radar()
can add it in the correct order (after the <rdar://N> comment and
InRadar keyword), preventing a duplicate radar from being created.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/tracker_metadata.py:
Add.
(TrackerMetadata):
(TrackerMetadata.parser):
(TrackerMetadata.main):
(TrackerMetadata.get_tracker_metadata):
(TrackerMetadata.output_result):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/create_bug_unittest.py:
Add.
(TestCreateBug):
(TestCreateBug.test_radar_importer_not_double_cced):
(TestCreateBugRadarArgValidation):
- Update rdar://problem/N tests to expect normalized rdar://N output.
Move https://rdar.apple.com/N from invalid to valid.
*
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/tracker_metadata_unittest.py:
Add.
(TestTrackerMetadata):
Canonical link: https://commits.webkit.org/311151@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications