]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/publish_toolstate.py
Rollup merge of #69209 - Mark-Simulacrum:strip-unsafe, r=dtolnay
[rust.git] / src / tools / publish_toolstate.py
index 61762ae1d9b0438023bdb4b0b48c1253ef3f1994..81d44a3df2598f0a9e692761ffdfa60cb88b0df2 100755 (executable)
@@ -1,11 +1,11 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-## This script publishes the new "current" toolstate in the toolstate repo (not to be
-## confused with publishing the test results, which happens in
-## `src/ci/docker/x86_64-gnu-tools/checktools.sh`).
-## It is set as callback for `src/ci/docker/x86_64-gnu-tools/repo.sh` by the CI scripts
-## when a new commit lands on `master` (i.e., after it passed all checks on `auto`).
+# This script publishes the new "current" toolstate in the toolstate repo (not to be
+# confused with publishing the test results, which happens in
+# `src/ci/docker/x86_64-gnu-tools/checktools.sh`).
+# It is set as callback for `src/ci/docker/x86_64-gnu-tools/repo.sh` by the CI scripts
+# when a new commit lands on `master` (i.e., after it passed all checks on `auto`).
 
 from __future__ import print_function
 
@@ -103,6 +103,7 @@ def validate_maintainers(repo, github_token):
         print("The build will fail due to this.")
         exit(1)
 
+
 def read_current_status(current_commit, path):
     '''Reads build status of `current_commit` from content of `history/*.tsv`
     '''
@@ -113,14 +114,17 @@ def read_current_status(current_commit, path):
                 return json.loads(status)
     return {}
 
+
 def gh_url():
     return os.environ['TOOLSTATE_ISSUES_API_URL']
 
+
 def maybe_delink(message):
     if os.environ.get('TOOLSTATE_SKIP_MENTIONS') is not None:
         return message.replace("@", "")
     return message
 
+
 def issue(
     tool,
     status,
@@ -164,6 +168,7 @@ def issue(
     ))
     response.read()
 
+
 def update_latest(
     current_commit,
     relevant_pr_number,
@@ -194,7 +199,7 @@ def update_latest(
         for status in latest:
             tool = status['tool']
             changed = False
-            create_issue_for_status = None # set to the status that caused the issue
+            create_issue_for_status = None  # set to the status that caused the issue
 
             for os, s in current_status.items():
                 old = status[os]
@@ -206,14 +211,14 @@ def update_latest(
                 if new > old:
                     # things got fixed or at least the status quo improved
                     changed = True
-                    message += '🎉 {} on {}: {} â†’ {} (cc {}, @rust-lang/infra).\n' \
+                    message += '🎉 {} on {}: {} â†’ {} (cc {}).\n' \
                         .format(tool, os, old, new, maintainers)
                 elif new < old:
                     # tests or builds are failing and were not failing before
                     changed = True
                     title = '💔 {} on {}: {} â†’ {}' \
                         .format(tool, os, old, new)
-                    message += '{} (cc {}, @rust-lang/infra).\n' \
+                    message += '{} (cc {}).\n' \
                         .format(title, maintainers)
                     # See if we need to create an issue.
                     if tool == 'miri':