Skip to content

Allow rust-highfive to label issues it creates. #72395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/tools/publish_toolstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@
'rustc-dev-guide': {'mark-i-m', 'spastorino', 'amanjeev', 'JohnTitor'},
}

LABELS = {
'miri': ['A-miri', 'C-bug'],
'rls': ['A-rls', 'C-bug'],
'rustfmt': ['C-bug'],
'book': ['C-bug'],
'nomicon': ['C-bug'],
'reference': ['C-bug'],
'rust-by-example': ['C-bug'],
'embedded-book': ['C-bug'],
'edition-guide': ['C-bug'],
'rustc-dev-guide': ['C-bug'],
}

REPOS = {
'miri': 'https://github.com/rust-lang/miri',
'rls': 'https://github.com/rust-lang/rls',
Expand Down Expand Up @@ -132,6 +145,7 @@ def issue(
assignees,
relevant_pr_number,
relevant_pr_user,
labels,
):
# Open an issue about the toolstate failure.
if status == 'test-fail':
Expand All @@ -155,6 +169,7 @@ def issue(
)),
'title': '`{}` no longer builds after {}'.format(tool, relevant_pr_number),
'assignees': list(assignees),
'labels': labels,
})
print("Creating issue:\n{}".format(request))
response = urllib2.urlopen(urllib2.Request(
Expand Down Expand Up @@ -235,7 +250,7 @@ def update_latest(
try:
issue(
tool, create_issue_for_status, MAINTAINERS.get(tool, ''),
relevant_pr_number, relevant_pr_user,
relevant_pr_number, relevant_pr_user, LABELS.get(tool, ''),
)
except urllib2.HTTPError as e:
# network errors will simply end up not creating an issue, but that's better
Expand Down