File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,15 @@ pub fn check_codeowners(data: Data) -> anyhow::Result<()> {
25
25
Ok ( ( ) )
26
26
}
27
27
28
+ /// Sensitive TOML data files.
29
+ /// PRs that modify them need to be approved by an infra-admin.
30
+ const PROTECTED_PATHS : & [ & str ] = & [
31
+ "/repos/rust-lang/team.toml" ,
32
+ "/repos/rust-lang/sync-team.toml" ,
33
+ "/teams/infra-admins.toml" ,
34
+ "/teams/team-repo-admins.toml" ,
35
+ ] ;
36
+
28
37
/// We want to allow access to the data files to `team-repo-admins`
29
38
/// (maintainers), while requiring a review from `infra-admins` (admins)
30
39
/// for any other changes.
@@ -137,12 +146,8 @@ teams/**/*.toml
137
146
)
138
147
. unwrap ( ) ;
139
148
140
- let mut protected_paths = vec ! [
141
- "/repos/rust-lang/team.toml" . to_string( ) ,
142
- "/repos/rust-lang/sync-team.toml" . to_string( ) ,
143
- "/teams/infra-admins.toml" . to_string( ) ,
144
- "/teams/team-repo-admins.toml" . to_string( ) ,
145
- ] ;
149
+ let mut protected_paths: Vec < String > =
150
+ PROTECTED_PATHS . iter ( ) . map ( |& p| String :: from ( p) ) . collect ( ) ;
146
151
147
152
// Some users can be both admins and maintainers.
148
153
let all_users = admins
You can’t perform that action at this time.
0 commit comments