Guard check-mode ruleset_id and correct its header comment - #411
Merged
Conversation
Copilot on the promotion PR caught that check_ruleset invokes ruleset_id unguarded, so its non-zero return (API error, or the new per_page-cap abort) would exit the auditor via set -e instead of recording a FAIL and continuing - inconsistent with the sibling gh-read guards. Wrap it in an if/fail/return. Update the ruleset_id header to state the per_page-cap abort path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR is a small hardening/follow-up change to repo-config/configure.sh to keep the check path resilient when GitHub API lookups fail, so the auditor records a FAIL and continues instead of exiting early due to set -e.
Changes:
- Guard
check_ruleset'sruleset_idlookup so a non-zero return is handled as a recorded failure rather than aborting the script. - Clarify the
ruleset_idheader comment to explicitly document that it aborts at theper_page=100cap (in addition to API errors).
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.
Follow-up to #409, from Copilot's review of the promotion PR #410.
check_rulesetinvokedruleset_idunguarded, so its non-zero return (API error, or the newper_page-cap abort) would exit the auditor viaset -einstead of recording a FAIL and continuing. Now wrapped inif ! id=...; then fail; return; fi, consistent with the sibling gh-read guards. Apply mode's call stays unguarded on purpose (aborting before a duplicate write is correct there).ruleset_idheader comment now states theper_page-cap abort path.