From 044959958d9794eb092a36969c9ca9b8441d87a3 Mon Sep 17 00:00:00 2001 From: Micah Bales Date: Mon, 27 Nov 2023 16:40:34 -0800 Subject: [PATCH] Add OS Custom Field to Issue When Available (#3540) --- .../issue_management/google_issue_tracker/issue_tracker.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/clusterfuzz/_internal/issue_management/google_issue_tracker/issue_tracker.py b/src/clusterfuzz/_internal/issue_management/google_issue_tracker/issue_tracker.py index 89859293d0..74188a8ff6 100644 --- a/src/clusterfuzz/_internal/issue_management/google_issue_tracker/issue_tracker.py +++ b/src/clusterfuzz/_internal/issue_management/google_issue_tracker/issue_tracker.py @@ -27,6 +27,7 @@ _NUM_RETRIES = 3 _ISSUE_TRACKER_URL = 'https://issuetracker.google.com/issues' +_CHROMIUM_OS_CUSTOM_FIELD_ID = 1223084 class IssueAccessLevel(str, enum.Enum): @@ -387,10 +388,13 @@ def save(self, new_comment=None, notify=True): if self._is_new: logs.log('google_issue_tracker: Creating new issue..') priority = _extract_label(self.labels, 'Pri-') + os = _extract_label(self.labels, 'OS-') issue_type = _extract_label(self.labels, 'Type-') or 'BUG' self._data['issueState']['type'] = issue_type if priority: self._data['issueState']['priority'] = priority + if os: + self._data['issueState'][_CHROMIUM_OS_CUSTOM_FIELD_ID] = os logs.log('google_issue_tracker: labels: %s' % list(self.labels)) severity_text = _extract_label(self.labels, 'Security_Severity-')