Fix invalid administration permission scope in branch-protection workflow#26
Merged
Fix invalid administration permission scope in branch-protection workflow#26
administration permission scope in branch-protection workflow#26Conversation
Co-authored-by: leeoades <2321091+leeoades@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix error in branch protection configuration
Fix invalid permission scope in branch-protection.yml causing workflow to never run
Feb 20, 2026
Copilot
AI
changed the title
Fix invalid permission scope in branch-protection.yml causing workflow to never run
Fix invalid Feb 20, 2026
administration permission scope in branch-protection workflow
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.
The
branch-protection.ymlworkflow was failing at validation time with 0 jobs created (conclusion: failure) becauseadministrationis not a validGITHUB_TOKENscope in GitHub Actions.What was wrong
administrationis a GitHub Apps repository permission — it has no effect in a workflowpermissions:block and causes the entire workflow run to be rejected before any jobs are queued.What
enforce_admins: truealready doesThe apparent intent behind
administration: writewas misplaced. Whether the repo admin is subject to branch protection is controlled byenforce_adminsin theupdateBranchProtectionAPI call — not the workflow permissions block:enforce_admins: true→ admin must also use PRs (already set, intentional for securing main)enforce_admins: false→ admin is exempt from branch protectionFix
Removed the invalid
administration: writeline. No other changes needed — for a personal repository theGITHUB_TOKENalready runs with owner-level access and can callupdateBranchProtectionwithout any additional scope.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.