Skip to content

Commit

Permalink
Use _extract_label instead for google_issue_tracker. (google#4214)
Browse files Browse the repository at this point in the history
Otherwise we'll try to add the label as a hotlist.
  • Loading branch information
oliverchang authored Aug 28, 2024
1 parent c093379 commit ab302bb
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -571,11 +571,11 @@ def _update_issue(self, new_comment=None, notify=True):
self.labels.remove_by_prefix('ReleaseBlock-')

# Special case: OSS-Fuzz "Reported" custom field.
added_reported = _get_labels(self.labels.added, 'Reported-')
added_reported = _extract_label(self.labels, 'Reported-')
if added_reported:
try:
# Assume there is only one entry.
year, month, day = _parse_date_label(added_reported[0])
year, month, day = _parse_date_label(added_reported)
custom_field_entries.append({
'customFieldId': _OSS_FUZZ_REPORTED_CUSTOM_FIELD_ID,
'dateValue': {
Expand All @@ -588,12 +588,12 @@ def _update_issue(self, new_comment=None, notify=True):
logs.warning(f'Invalid date format for Reported-{added_reported[0]}')

# Special case: OSS-Fuzz "Project" custom field.
added_projects = _get_labels(self.labels.added, 'Project-')
if added_projects:
added_project = _extract_label(self.labels, 'Project-')
if added_project:
# Assume there is only one.
custom_field_entries.append({
'customFieldId': _OSS_FUZZ_PROJECT_CUSTOM_FIELD_ID,
'textValue': added_projects[0]
'textValue': added_project
})

# Special case Component Tags custom field.
Expand Down

0 comments on commit ab302bb

Please sign in to comment.