Skip to content

Commit dc4b9fd

Browse files
committed
Allow rust-highfive to label issues it creates.
Replace sets with lists.
1 parent 8858a43 commit dc4b9fd

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/tools/publish_toolstate.py

+16-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@
3939
'rustc-dev-guide': {'mark-i-m', 'spastorino', 'amanjeev', 'JohnTitor'},
4040
}
4141

42+
LABELS = {
43+
'miri': ['A-miri', 'C-bug'],
44+
'rls': ['A-rls', 'C-bug'],
45+
'rustfmt': ['C-bug'],
46+
'book': ['C-bug'],
47+
'nomicon': ['C-bug'],
48+
'reference': ['C-bug'],
49+
'rust-by-example': ['C-bug'],
50+
'embedded-book': ['C-bug'],
51+
'edition-guide': ['C-bug'],
52+
'rustc-dev-guide': ['C-bug'],
53+
}
54+
4255
REPOS = {
4356
'miri': 'https://github.com/rust-lang/miri',
4457
'rls': 'https://github.com/rust-lang/rls',
@@ -132,6 +145,7 @@ def issue(
132145
assignees,
133146
relevant_pr_number,
134147
relevant_pr_user,
148+
labels,
135149
):
136150
# Open an issue about the toolstate failure.
137151
if status == 'test-fail':
@@ -155,6 +169,7 @@ def issue(
155169
)),
156170
'title': '`{}` no longer builds after {}'.format(tool, relevant_pr_number),
157171
'assignees': list(assignees),
172+
'labels': labels,
158173
})
159174
print("Creating issue:\n{}".format(request))
160175
response = urllib2.urlopen(urllib2.Request(
@@ -235,7 +250,7 @@ def update_latest(
235250
try:
236251
issue(
237252
tool, create_issue_for_status, MAINTAINERS.get(tool, ''),
238-
relevant_pr_number, relevant_pr_user,
253+
relevant_pr_number, relevant_pr_user, LABELS.get(tool, ''),
239254
)
240255
except urllib2.HTTPError as e:
241256
# network errors will simply end up not creating an issue, but that's better

0 commit comments

Comments
 (0)