File tree 1 file changed +13
-7
lines changed
1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -868,20 +868,26 @@ fn validate_repos(data: &Data, errors: &mut Vec<String>) {
868
868
}
869
869
for team_name in repo. access . teams . keys ( ) {
870
870
if !github_teams. contains ( & ( repo. org . clone ( ) , team_name. clone ( ) ) ) {
871
+ let is_team_archived = data. archived_teams ( ) . any ( |t| t. name ( ) == team_name) ;
872
+ let error_reason = if is_team_archived {
873
+ "is archived. Please remove it from the repo"
874
+ } else {
875
+ "is not present in the `/teams/` folder"
876
+ } ;
877
+
871
878
bail ! (
872
- "access for {}/{} is invalid: '{}' is not configured as a GitHub team for the '{}' org" ,
873
- repo. org,
874
- repo. name,
875
- team_name,
876
- repo. org
877
- )
879
+ "Access for the repo {}/{} is invalid: the team '{}/{team_name}' {error_reason}." ,
880
+ repo. org,
881
+ repo. name,
882
+ repo. org,
883
+ ) ;
878
884
}
879
885
}
880
886
881
887
for name in repo. access . individuals . keys ( ) {
882
888
if data. person ( name) . is_none ( ) {
883
889
bail ! (
884
- "access for {}/{} is invalid: '{}' is not the name of a person in the team repo" ,
890
+ "Access for the repo {}/{} is invalid: '{}' is not the name of a person in the team repo" ,
885
891
repo. org,
886
892
repo. name,
887
893
name
You can’t perform that action at this time.
0 commit comments