]> git.lizzy.rs Git - rust.git/commitdiff
Only open one issue per tool
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Wed, 19 Dec 2018 14:54:51 +0000 (15:54 +0100)
committerOliver Scherer <github35764891676564198441@oli-obk.de>
Wed, 19 Dec 2018 14:56:11 +0000 (15:56 +0100)
src/tools/publish_toolstate.py

index c05cd912991ca9c8c4867de40e40118e395c7f9a..5cacdb7ef0b57d9cffbf94b89e83030af9541bee 100755 (executable)
@@ -46,11 +46,11 @@ def read_current_status(current_commit, path):
     return {}
 
 def issue(
-    title,
     tool,
     maintainers,
     relevant_pr_number,
     relevant_pr_user,
+    msg,
 ):
     # Open an issue about the toolstate failure.
     gh_url = 'https://api.github.com/repos/rust-lang/rust/issues'
@@ -64,8 +64,11 @@ def issue(
 
             If you have the time it would be great if you could open a PR against {} that
             fixes the fallout from your PR.
-            '''.format(relevant_pr_user, relevant_pr_number, tool, tool),
-            'title': title,
+
+            {}
+
+            '''.format(relevant_pr_user, relevant_pr_number, tool, tool, msg),
+            'title': '💔 {}'.format(tool),
             'assignees': assignees,
             'labels': ['T-compiler', 'I-nominated'],
         }),
@@ -105,6 +108,7 @@ def update_latest(
         for status in latest:
             tool = status['tool']
             changed = False
+            failures = ''
 
             for os, s in current_status.items():
                 old = status[os]
@@ -120,7 +124,11 @@ def update_latest(
                         .format(tool, os, old, new)
                     message += '{} (cc {}, @rust-lang/infra).\n' \
                         .format(title, MAINTAINERS.get(tool))
-                    issue(title, tool, MAINTAINERS.get(tool), relevant_pr_number, relevant_pr_user)
+                    failures += title
+                    failures += '\n'
+
+            if failures != '':
+                issue(tool, MAINTAINERS.get(tool), relevant_pr_number, relevant_pr_user, failures)
 
             if changed:
                 status['commit'] = current_commit