Skip to content

Commit d652917

Browse files
committed
Auto merge of #56847 - pietroalbini:fix-broken-toolstate, r=pietroalbini
Revert merge of #56758 - Manishearth:emoji-status-toolstate #56758 is breaking master. r? @ghost cc @Manishearth @kennytm
2 parents 44d3fb3 + e771a7d commit d652917

File tree

1 file changed

+7
-25
lines changed

1 file changed

+7
-25
lines changed

src/tools/publish_toolstate.py

+7-25
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,6 @@
3434
'rust-by-example': '@steveklabnik @marioidival @projektir',
3535
}
3636

37-
EMOJI = {
38-
'miri': '🛰️',
39-
'clippy-driver': '📎',
40-
'rls': '💻',
41-
'rustfmt': '📝',
42-
'book': '📖',
43-
'nomicon': '👿',
44-
'reference': '📚',
45-
'rust-by-example': '👩‍🏫',
46-
}
4737

4838
def read_current_status(current_commit, path):
4939
'''Reads build status of `current_commit` from content of `history/*.tsv`
@@ -73,12 +63,13 @@ def update_latest(
7363
}
7464

7565
slug = 'rust-lang/rust'
76-
long_message = textwrap.dedent('''\
66+
message = textwrap.dedent('''\
67+
📣 Toolstate changed by {}!
68+
7769
Tested on commit {}@{}.
7870
Direct link to PR: <{}>
7971
80-
''').format(slug, current_commit, relevant_pr_url)
81-
emoji_status = []
72+
''').format(relevant_pr_number, slug, current_commit, relevant_pr_url)
8273
anything_changed = False
8374
for status in latest:
8475
tool = status['tool']
@@ -90,18 +81,12 @@ def update_latest(
9081
status[os] = new
9182
if new > old:
9283
changed = True
93-
long_message += '🎉 {} on {}: {} → {}.\n' \
94-
.format(tool, os, old, new)
95-
emoji = "{}🎉".format(EMOJI.get(tool))
96-
if msg not in emoji_status:
97-
emoji_status += [msg]
84+
message += '🎉 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n' \
85+
.format(tool, os, old, new, MAINTAINERS.get(tool))
9886
elif new < old:
9987
changed = True
100-
long_message += '💔 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n' \
88+
message += '💔 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n' \
10189
.format(tool, os, old, new, MAINTAINERS.get(tool))
102-
emoji = "{}💔".format(EMOJI.get(tool))
103-
if msg not in emoji_status:
104-
emoji_status += [msg]
10590

10691
if changed:
10792
status['commit'] = current_commit
@@ -111,9 +96,6 @@ def update_latest(
11196
if not anything_changed:
11297
return ''
11398

114-
short_message = "📣 Toolstate changed by {}! ({})"
115-
.format(relevant_pr_number, '/'.join(emoji_status))
116-
message = short_message + "\n\n" + long_message
11799
f.seek(0)
118100
f.truncate(0)
119101
json.dump(latest, f, indent=4, separators=(',', ': '))

0 commit comments

Comments
 (0)