microsoft / PSRule.Rules.GitHub

A suite of rules to validate GitHub repositories using PSRule.
MIT License
21 stars 15 forks source link

Forbidden repository protection crashes export #184

Closed BernieWhite closed 1 year ago

BernieWhite commented 1 year ago

Description of the issue

Export of repository data crashes out if permission is not provided. Some restricted repository information may not be accessible with the default GitHub Actions token or with the provided token.

Expected behaviour

Attempts to export data that is not authorized should not crash the process.

Error output

Capture any error messages and or verbose messages with -Verbose.

ForbiddenException: Resource not accessible by integration
AggregateException: One or more errors occurred. (Resource not accessible by integration)