Skip to content

Add branch protection configuration for main branch#6

Merged
OneM1 merged 4 commits into
mainfrom
copilot/protect-main-branch
Feb 9, 2026
Merged

Add branch protection configuration for main branch#6
OneM1 merged 4 commits into
mainfrom
copilot/protect-main-branch

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 9, 2026

Main branch lacks protection against force pushes, deletion, and merging without review or status checks.

Configuration Files

.github/settings.yml - Branch protection rules for Probot Settings app or manual application:

  • Prevents force pushes and deletion
  • Requires 1 approving review before merge
  • Requires build status check to pass
  • Dismisses stale reviews on new commits
  • Requires conversation resolution

.github/workflows/branch-protection-check.yml - CI workflow providing required build status check:

  • Linting (flake8 for syntax errors)
  • Test execution
  • Explicit contents: read permissions (CodeQL verified)

.github/CODEOWNERS - Auto-assigns reviewers on PRs

Templates

  • Pull request template with type/checklist
  • Issue templates (bug report, feature request)

Documentation

BRANCH_PROTECTION.md - Implementation guide covering:

  • Three application methods (Probot app, GitHub UI, API/CLI)
  • Working with protected branches
  • Troubleshooting

Updated README.md Contributing section with branch protection reference.

Application

Configuration files are repository-ready but require manual activation:

  1. Install Probot Settings (auto-applies .github/settings.yml), or
  2. Apply rules via GitHub Settings → Branches → Add rule, or
  3. Use GitHub API/CLI (examples in documentation)
Original prompt

address this: Your main branch isn't protected
Protect this branch from force pushing or deletion, or require status checks before merging. View documentation.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 9, 2026 08:32
Co-authored-by: OneM1 <111998759+OneM1@users.noreply.github.com>
Co-authored-by: OneM1 <111998759+OneM1@users.noreply.github.com>
Co-authored-by: OneM1 <111998759+OneM1@users.noreply.github.com>
Copilot AI changed the title [WIP] Add branch protection rules for main branch Add branch protection configuration for main branch Feb 9, 2026
Copilot AI requested a review from OneM1 February 9, 2026 08:37
@OneM1 OneM1 marked this pull request as ready for review February 9, 2026 08:42
@OneM1 OneM1 merged commit 343d104 into main Feb 9, 2026
1 check failed
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.

2 participants