Skip to content

Commit 3738f6d

Browse files
committed
Provide better error message for repository access validation
1 parent d4dd59b commit 3738f6d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/validate.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,12 @@ fn validate_repos(data: &Data, errors: &mut Vec<String>) {
877877
);
878878
}
879879
for team_name in repo.access.teams.keys() {
880-
check_team_access(data, repo, team_name).with_context(|| {
881-
format!("Access for the repo {}/{} is invalid", repo.org, repo.name)
880+
check_team_access(data, repo, team_name).map_err(|e| {
881+
anyhow::anyhow!(
882+
"Access for the repo {}/{} is invalid: {e}",
883+
repo.org,
884+
repo.name
885+
)
882886
})?;
883887
}
884888

0 commit comments

Comments
 (0)