Skip to content

Commit

Permalink
Revert "Rollup merge of rust-lang#56758 - Manishearth:emoji-status-to…
Browse files Browse the repository at this point in the history
…olstate, r=kennytm"

This reverts commit 050bb10, reversing
changes made to c530e31.
  • Loading branch information
pietroalbini committed Dec 15, 2018
1 parent 0a1b226 commit e771a7d
Showing 1 changed file with 7 additions and 25 deletions.
32 changes: 7 additions & 25 deletions src/tools/publish_toolstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@
'rust-by-example': '@steveklabnik @marioidival @projektir',
}

EMOJI = {
'miri': '🛰️',
'clippy-driver': '📎',
'rls': '💻',
'rustfmt': '📝',
'book': '📖',
'nomicon': '👿',
'reference': '📚',
'rust-by-example': '👩‍🏫',
}

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

slug = 'rust-lang/rust'
long_message = textwrap.dedent('''\
message = textwrap.dedent('''\
📣 Toolstate changed by {}!
Tested on commit {}@{}.
Direct link to PR: <{}>
''').format(slug, current_commit, relevant_pr_url)
emoji_status = []
''').format(relevant_pr_number, slug, current_commit, relevant_pr_url)
anything_changed = False
for status in latest:
tool = status['tool']
Expand All @@ -90,18 +81,12 @@ def update_latest(
status[os] = new
if new > old:
changed = True
long_message += '🎉 {} on {}: {} → {}.\n' \
.format(tool, os, old, new)
emoji = "{}🎉".format(EMOJI.get(tool))
if msg not in emoji_status:
emoji_status += [msg]
message += '🎉 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n' \
.format(tool, os, old, new, MAINTAINERS.get(tool))
elif new < old:
changed = True
long_message += '💔 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n' \
message += '💔 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n' \
.format(tool, os, old, new, MAINTAINERS.get(tool))
emoji = "{}💔".format(EMOJI.get(tool))
if msg not in emoji_status:
emoji_status += [msg]

if changed:
status['commit'] = current_commit
Expand All @@ -111,9 +96,6 @@ def update_latest(
if not anything_changed:
return ''

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

0 comments on commit e771a7d

Please sign in to comment.