Skip to content

Commit d652917

Browse files
committed
Auto merge of rust-lang#56847 - pietroalbini:fix-broken-toolstate, r=pietroalbini
Revert merge of rust-lang#56758 - Manishearth:emoji-status-toolstate rust-lang#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)