Skip to content

Commit

Permalink
Add OS Custom Field to Issue When Available (#3540)
Browse files Browse the repository at this point in the history
  • Loading branch information
micahbales authored Nov 28, 2023
1 parent 7a278e7 commit 0449599
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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-')
Expand Down

0 comments on commit 0449599

Please sign in to comment.