Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: ensure all tool maintainers are assignable on issues #64119

merged 5 commits into from Sep 16, 2019

ci: convert maintainer list in publish_toolstate to a set

  • Loading branch information...
pietroalbini committed Sep 4, 2019
commit f2576c821d2e15b23dcea8af9b3ed08cf4a5795f
@@ -25,20 +25,23 @@
# These should be collaborators of the rust-lang/rust repository (with at least
# read privileges on it). CI will fail otherwise.
'miri': '@oli-obk @RalfJung @eddyb',
'clippy-driver': '@Manishearth @llogiq @mcarton @oli-obk @phansch @flip1995 @yaahc',
'rls': '@Xanewok',
'rustfmt': '@topecongiro',
'book': '@carols10cents @steveklabnik',
'nomicon': '@frewsxcv @Gankra',
'reference': '@steveklabnik @Havvy @matthewjasper @ehuss',
'rust-by-example': '@steveklabnik @marioidival @projektir',
'embedded-book': (
'@adamgreig @andre-richter @jamesmunns @korken89 '
'@ryankurte @thejpster @therealprof'
'edition-guide': '@ehuss @Centril @steveklabnik',
'rustc-guide': '@mark-i-m @spastorino @amanjeev'
'miri': {'oli-obk', 'RalfJung', 'eddyb'},
'clippy-driver': {
'Manishearth', 'llogiq', 'mcarton', 'oli-obk', 'phansch', 'flip1995',
'rls': {'Xanewok'},
'rustfmt': {'topecongiro'},
'book': {'carols10cents', 'steveklabnik'},
'nomicon': {'frewsxcv', 'Gankra'},
'reference': {'steveklabnik', 'Havvy', 'matthewjasper', 'ehuss'},
'rust-by-example': {'steveklabnik', 'marioidival', 'projektir'},
'embedded-book': {
'adamgreig', 'andre-richter', 'jamesmunns', 'korken89',
'ryankurte', 'thejpster', 'therealprof',
'edition-guide': {'ehuss', 'Centril', 'steveklabnik'},
'rustc-guide': {'mark-i-m', 'spastorino', 'amanjeev'},

@@ -80,9 +83,7 @@ def validate_maintainers(repo, github_token):

errors = False
for tool, maintainers in MAINTAINERS.items():
for maintainer in maintainers.split(' '):
if maintainer.startswith('@'):
maintainer = maintainer[1:]
for maintainer in maintainers:
if maintainer not in assignable:
errors = True
@@ -123,13 +124,12 @@ def maybe_delink(message):
def issue(
# Open an issue about the toolstate failure.
assignees = [x.strip() for x in maintainers.split('@') if x != '']
if status == 'test-fail':
status_description = 'has failing tests'
@@ -150,7 +150,7 @@ def issue(
REPOS.get(tool), relevant_pr_user, pr_reviewer
'title': '`{}` no longer builds after {}'.format(tool, relevant_pr_number),
'assignees': assignees,
'assignees': list(assignees),
'labels': ['T-compiler', 'I-nominated'],
print("Creating issue:\n{}".format(request))
@@ -200,18 +200,19 @@ def update_latest(
old = status[os]
new = s.get(tool, old)
status[os] = new
maintainers = ' '.join('@'+name for name in MAINTAINERS[tool])
if new > old: # comparing the strings, but they are ordered appropriately!
# things got fixed or at least the status quo improved
changed = True
message += '🎉 {} on {}: {}{} (cc {}, @rust-lang/infra).\n' \
.format(tool, os, old, new, MAINTAINERS.get(tool))
.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' \
.format(title, MAINTAINERS.get(tool))
.format(title, maintainers)
# Most tools only create issues for build failures.
# Other failures can be spurious.
if new == 'build-fail' or (tool == 'miri' and new == 'test-fail'):
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.