Repository navigation
Skip hooks for repositories without admin access instead of logging a 404 error (#532) - #541
Merged
josegonzalez merged 1 commit intoNov 3, 2026
Conversation
… 404 error (josegonzalez#532) Reading hooks needs admin access, and GitHub returns 404 without it. When the repository listing says the token isn't an admin, skip hooks without making the request. The 404 skip message now names the repository and the permission it needs, and the README note about hooks blocking starred backups is updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #532.
Reading /repos/{owner}/{repo}/hooks needs admin access, and GitHub returns 404 rather than 403 without it. An empty hooks list returns 200 []. #238 (for #176) assumed the 404 meant "no hooks" and turned the crash into a skip, but make_request_with_retry still logs API Error: 404 Not Found at ERROR first. That happens for every repository the token doesn't administer, such as starred repositories with --all-starred.
This PR makes the following changes:
Testing