Skip to content

Commit c485acb

Browse files
committed
Only open one issue per tool
1 parent 46a8fcd commit c485acb

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/tools/publish_toolstate.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ def read_current_status(current_commit, path):
4646
return {}
4747

4848
def issue(
49-
title,
5049
tool,
5150
maintainers,
5251
relevant_pr_number,
5352
relevant_pr_user,
53+
msg,
5454
):
5555
# Open an issue about the toolstate failure.
5656
gh_url = 'https://api.github.com/repos/rust-lang/rust/issues'
@@ -64,8 +64,11 @@ def issue(
6464
6565
If you have the time it would be great if you could open a PR against {} that
6666
fixes the fallout from your PR.
67-
'''.format(relevant_pr_user, relevant_pr_number, tool, tool),
68-
'title': title,
67+
68+
{}
69+
70+
'''.format(relevant_pr_user, relevant_pr_number, tool, tool, msg),
71+
'title': '💔 {}'.format(tool),
6972
'assignees': assignees,
7073
'labels': ['T-compiler', 'I-nominated'],
7174
}),
@@ -105,6 +108,7 @@ def update_latest(
105108
for status in latest:
106109
tool = status['tool']
107110
changed = False
111+
failures = ''
108112

109113
for os, s in current_status.items():
110114
old = status[os]
@@ -120,7 +124,11 @@ def update_latest(
120124
.format(tool, os, old, new)
121125
message += '{} (cc {}, @rust-lang/infra).\n' \
122126
.format(title, MAINTAINERS.get(tool))
123-
issue(title, tool, MAINTAINERS.get(tool), relevant_pr_number, relevant_pr_user)
127+
failures += title
128+
failures += '\n'
129+
130+
if failures != '':
131+
issue(tool, MAINTAINERS.get(tool), relevant_pr_number, relevant_pr_user, failures)
124132

125133
if changed:
126134
status['commit'] = current_commit

0 commit comments

Comments
 (0)