25
25
# These should be collaborators of the rust-lang/rust repository (with at least
26
26
# read privileges on it). CI will fail otherwise.
27
27
MAINTAINERS = {
28
- 'miri' : '@oli-obk @RalfJung @eddyb' ,
29
- 'clippy-driver' : '@Manishearth @llogiq @mcarton @oli-obk @phansch @flip1995 @yaahc' ,
30
- 'rls' : '@Xanewok' ,
31
- 'rustfmt' : '@topecongiro' ,
32
- 'book' : '@carols10cents @steveklabnik' ,
33
- 'nomicon' : '@frewsxcv @Gankra' ,
34
- 'reference' : '@steveklabnik @Havvy @matthewjasper @ehuss' ,
35
- 'rust-by-example' : '@steveklabnik @marioidival @projektir' ,
36
- 'embedded-book' : (
37
- '@adamgreig @andre-richter @jamesmunns @korken89 '
38
- '@ryankurte @thejpster @therealprof'
39
- ),
40
- 'edition-guide' : '@ehuss @Centril @steveklabnik' ,
41
- 'rustc-guide' : '@mark-i-m @spastorino @amanjeev'
28
+ 'miri' : {'oli-obk' , 'RalfJung' , 'eddyb' },
29
+ 'clippy-driver' : {
30
+ 'Manishearth' , 'llogiq' , 'mcarton' , 'oli-obk' , 'phansch' , 'flip1995' ,
31
+ 'yaahc' ,
32
+ },
33
+ 'rls' : {'Xanewok' },
34
+ 'rustfmt' : {'topecongiro' },
35
+ 'book' : {'carols10cents' , 'steveklabnik' },
36
+ 'nomicon' : {'frewsxcv' , 'Gankra' },
37
+ 'reference' : {'steveklabnik' , 'Havvy' , 'matthewjasper' , 'ehuss' },
38
+ 'rust-by-example' : {'steveklabnik' , 'marioidival' , 'projektir' },
39
+ 'embedded-book' : {
40
+ 'adamgreig' , 'andre-richter' , 'jamesmunns' , 'korken89' ,
41
+ 'ryankurte' , 'thejpster' , 'therealprof' ,
42
+ },
43
+ 'edition-guide' : {'ehuss' , 'Centril' , 'steveklabnik' },
44
+ 'rustc-guide' : {'mark-i-m' , 'spastorino' , 'amanjeev' },
42
45
}
43
46
44
47
REPOS = {
@@ -80,9 +83,7 @@ def validate_maintainers(repo, github_token):
80
83
81
84
errors = False
82
85
for tool , maintainers in MAINTAINERS .items ():
83
- for maintainer in maintainers .split (' ' ):
84
- if maintainer .startswith ('@' ):
85
- maintainer = maintainer [1 :]
86
+ for maintainer in maintainers :
86
87
if maintainer not in assignable :
87
88
errors = True
88
89
print (
@@ -123,13 +124,12 @@ def maybe_delink(message):
123
124
def issue (
124
125
tool ,
125
126
status ,
126
- maintainers ,
127
+ assignees ,
127
128
relevant_pr_number ,
128
129
relevant_pr_user ,
129
130
pr_reviewer ,
130
131
):
131
132
# Open an issue about the toolstate failure.
132
- assignees = [x .strip () for x in maintainers .split ('@' ) if x != '' ]
133
133
if status == 'test-fail' :
134
134
status_description = 'has failing tests'
135
135
else :
@@ -150,7 +150,7 @@ def issue(
150
150
REPOS .get (tool ), relevant_pr_user , pr_reviewer
151
151
)),
152
152
'title' : '`{}` no longer builds after {}' .format (tool , relevant_pr_number ),
153
- 'assignees' : assignees ,
153
+ 'assignees' : list ( assignees ) ,
154
154
'labels' : ['T-compiler' , 'I-nominated' ],
155
155
})
156
156
print ("Creating issue:\n {}" .format (request ))
@@ -200,18 +200,19 @@ def update_latest(
200
200
old = status [os ]
201
201
new = s .get (tool , old )
202
202
status [os ] = new
203
+ maintainers = ' ' .join ('@' + name for name in MAINTAINERS [tool ])
203
204
if new > old : # comparing the strings, but they are ordered appropriately!
204
205
# things got fixed or at least the status quo improved
205
206
changed = True
206
207
message += '🎉 {} on {}: {} → {} (cc {}, @rust-lang/infra).\n ' \
207
- .format (tool , os , old , new , MAINTAINERS . get ( tool ) )
208
+ .format (tool , os , old , new , maintainers )
208
209
elif new < old :
209
210
# tests or builds are failing and were not failing before
210
211
changed = True
211
212
title = '💔 {} on {}: {} → {}' \
212
213
.format (tool , os , old , new )
213
214
message += '{} (cc {}, @rust-lang/infra).\n ' \
214
- .format (title , MAINTAINERS . get ( tool ) )
215
+ .format (title , maintainers )
215
216
# Most tools only create issues for build failures.
216
217
# Other failures can be spurious.
217
218
if new == 'build-fail' or (tool == 'miri' and new == 'test-fail' ):
0 commit comments