Skip to content

Add Fix-BranchRuleset.ps1 and update Setup-BranchRuleset.ps1#114

Merged
Chris-Wolfgang merged 5 commits intomainfrom
feature/fix-branch-ruleset-scripts
Mar 28, 2026
Merged

Add Fix-BranchRuleset.ps1 and update Setup-BranchRuleset.ps1#114
Chris-Wolfgang merged 5 commits intomainfrom
feature/fix-branch-ruleset-scripts

Conversation

@Chris-Wolfgang
Copy link
Copy Markdown
Owner

Summary

  • Add Fix-BranchRuleset.ps1: inspects existing rulesets, disables them, renames any "Protect main branch" ruleset, then auto-runs Setup-BranchRuleset.ps1 to recreate it
  • Update Setup-BranchRuleset.ps1 to match current repo-template with correct repository name, status check names, and CodeQL enforced via code_scanning rule instead of required_status_checks
  • Switch pr.yaml to pull_request_target for secure workflow execution where applicable

Test plan

  • Run Fix-BranchRuleset.ps1 and verify it lists planned changes, prompts, then runs Setup automatically
  • Verify the new ruleset has correct status check names

🤖 Generated with Claude Code

Chris-Wolfgang and others added 4 commits March 26, 2026 17:58
- Add Fix-BranchRuleset.ps1: inspects, disables, and renames existing
  rulesets so Setup-BranchRuleset.ps1 can recreate them cleanly
- Update Setup-BranchRuleset.ps1 to match current repo-template with
  correct repository name and status check names

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CodeQL is already enforced via the code_scanning rule type, so the
required_status_checks entry is redundant and blocks PRs when the
check name doesn't match exactly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…uccess

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts in Fix-BranchRuleset.ps1 and Setup-BranchRuleset.ps1:
- Keep HEAD's -Confirm/-y flag and auto-invoke of Setup script
- Keep main's CodeQL status check context in required checks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant