Repository navigation
Conversation
Stop excluding AllMight and add .github/repos/AllMight.yml with `protection: null` on the default branch, so safe-settings deletes it. The branches override validator dereferenced overrideconfig.protection and had no way to tell which repo it was validating. Validators now receive the repo name as a fourth argument, and the branches validator allows `protection: null` only for AllMight. Every other repo still has the review-count guardrail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GjGrPVikcfioKHkrBzbhxu
🤖 Safe-Settings config changes detected:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e81a66968f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (overrideconfig.protection === null) { | ||
| return repoName === 'AllMight' |
There was a problem hiding this comment.
Validate protection removal on added branches
When a non-AllMight repository overrides a branch that is absent from the global branches array, this check is never reached: mergeArrayBy invokes the override validator only when matchingIndex > -1, and Settings.childPluginsList later validates only entries from the base array. Consequently, an override such as {name: "staging", protection: null} is passed to the branches plugin, which deletes that branch's protection, despite the stated restriction that only AllMight may do so. Apply the repository restriction to added branch entries as well as matched overrides.
Useful? React with 👍 / 👎.
AllMight stays excluded from safe-settings so its branch protection can be managed directly in GitHub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GjGrPVikcfioKHkrBzbhxu
Summary
This PR adds repository name context to configuration validators, enabling validators to make decisions based on which repository is being configured. This allows for repository-specific validation rules and overrides.
Key Changes
Validator Function Signatures: Updated all validator function constructors to include
repoNameas a parameter:configvalidators: Changed from(baseconfig, githubContext)to(baseconfig, githubContext, repoName)overridevalidators: Changed from(baseconfig, overrideconfig, githubContext)to(baseconfig, overrideconfig, githubContext, repoName)MergeDeep Class:
repoNameparameter to constructorrepoNameas instance variablerepoNameSettings Class:
validate()method to accept and passrepoNameparametergetRepoConfig()to instantiateMergeDeepwithrepoNamerepoNameArray Merge Logic (
mergeArrayBy.js):mergeBy()function signature to acceptrepoNamerepoNameto all validator calls during array mergingDeployment Config (
deploymentConfig.js):repoNameparameterExample Use Case (
.github/repos/AllMight.yml):Implementation Details
The
repoNameis now threaded through the entire validation pipeline, from the initialgetRepoConfig()call throughMergeDeepand into individual validator functions. This enables validators to implement repository-specific logic, such as allowing certain repositories to override restrictions that apply to others.https://claude.ai/code/session_01GjGrPVikcfioKHkrBzbhxu