Skip to content

Commit e02c655

Browse files
committed
dump the JSON we are going to submit to GH to create the issue
1 parent fb2f841 commit e02c655

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

src/tools/publish_toolstate.py

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,27 +77,29 @@ def issue(
7777
status_description = 'has failing tests'
7878
else:
7979
status_description = 'no longer builds'
80+
request = json.dumps({
81+
'body': maybe_delink(textwrap.dedent('''\
82+
Hello, this is your friendly neighborhood mergebot.
83+
After merging PR {}, I observed that the tool {} {}.
84+
A follow-up PR to the repository {} is needed to fix the fallout.
85+
86+
cc @{}, do you think you would have time to do the follow-up work?
87+
If so, that would be great!
88+
89+
cc @{}, the PR reviewer, and @rust-lang/compiler -- nominating for prioritization.
90+
91+
''').format(
92+
relevant_pr_number, tool, status_description,
93+
REPOS.get(tool), relevant_pr_user, pr_reviewer
94+
)),
95+
'title': '`{}` no longer builds after {}'.format(tool, relevant_pr_number),
96+
'assignees': assignees,
97+
'labels': ['T-compiler', 'I-nominated'],
98+
})
99+
print("Creating issue:\n{}".format(request))
80100
response = urllib2.urlopen(urllib2.Request(
81101
gh_url(),
82-
json.dumps({
83-
'body': maybe_delink(textwrap.dedent('''\
84-
Hello, this is your friendly neighborhood mergebot.
85-
After merging PR {}, I observed that the tool {} {}.
86-
A follow-up PR to the repository {} is needed to fix the fallout.
87-
88-
cc @{}, do you think you would have time to do the follow-up work?
89-
If so, that would be great!
90-
91-
cc @{}, the PR reviewer, and @rust-lang/compiler -- nominating for prioritization.
92-
93-
''').format(
94-
relevant_pr_number, tool, status_description,
95-
REPOS.get(tool), relevant_pr_user, pr_reviewer
96-
)),
97-
'title': '`{}` no longer builds after {}'.format(tool, relevant_pr_number),
98-
'assignees': assignees,
99-
'labels': ['T-compiler', 'I-nominated'],
100-
}),
102+
request,
101103
{
102104
'Authorization': 'token ' + github_token,
103105
'Content-Type': 'application/json',

0 commit comments

Comments
 (0)