Auto merge of #88977 - ehuss:disable-validate-maintainers, r=Mark-Simulacrum

Disable validate_maintainers.

The validate_maintainers check has started to fail with the error:

```
HTTPError: HTTP Error 403: Forbidden
b'{"message":"Must have admin access to view repository collaborators.","documentation_url":"https://docs.github.com/rest/reference/repos#list-repository-collaborators"}'
```

Apparently GitHub has restricted the collaborators API to admins.  For now, this just disables the check to get CI working again.  Eventually, I think we'll just need to remove the check since we will unlikely use an admin token, and I don't see a workaround.  The `MAINTAINERS` list doesn't change often, so we may just need to put a sternly worded comment near the list.
This commit is contained in:
bors 2021-09-15 23:02:02 +00:00
commit 4aed1abb70
2 changed files with 9 additions and 1 deletions

View File

@ -3,6 +3,8 @@
// cdb-only
// min-cdb-version: 10.0.21287.1005
// compile-flags:-g
// FIXME: Failed on update to 10.0.22000.1
// ignore-windows
// === CDB TESTS ==================================================================================
//

View File

@ -299,7 +299,13 @@ try:
if repo:
github_token = os.environ.get('TOOLSTATE_REPO_ACCESS_TOKEN')
if github_token:
validate_maintainers(repo, github_token)
# FIXME: This is currently broken. Starting on 2021-09-15, GitHub
# seems to have changed it so that to list the collaborators
# requires admin permissions. I think this will probably just need
# to be removed since we are probably not going to use an admin
# token, and I don't see another way to do this.
print('maintainer validation disabled')
# validate_maintainers(repo, github_token)
else:
print('skipping toolstate maintainers validation since no GitHub token is present')
# When validating maintainers don't run the full script.