Skip to content

Commit

Permalink
[webkitbugspy] Implement ability to perform Radar search queries.
Browse files Browse the repository at this point in the history
rdar://117214203
https://bugs.webkit.org/show_bug.cgi?id=263383

Reviewed by Jonathan Bedard.

Allows callers to perform Radar search queries as part of `webkitbugspy.Radar`.

* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:
(Tracker):
(Tracker.search): Perform Radar search from passed query parameters.

Canonical link: https://commits.webkit.org/270738@main
  • Loading branch information
bls1999 committed Nov 15, 2023
1 parent c586c6d commit 6695e0a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,3 +546,17 @@ def clone(
if assign:
result.assign(self.me())
return result

# FIXME: This function is untested because it doesn't have a mock.
def search(self, query):
if not query or len(query) == 0:
raise ValueError('Query must be provided')

radars = self.client.find_radars(query, return_find_results_directly=True)
issues = []
for radar in radars:
if radar.id:
issue = Issue(id=radar.id, tracker=self)
issues.append(issue)

return issues

0 comments on commit 6695e0a

Please sign in to comment.