Skip to content

Automate main branch protection with deletion prevention#2

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/protect-main-branch
Draft

Automate main branch protection with deletion prevention#2
Copilot wants to merge 3 commits into
mainfrom
copilot/protect-main-branch

Conversation

Copilot AI commented Feb 19, 2026

Copy link
Copy Markdown

Main branch had no protection against force pushes, deletion, or unreviewed merges.

Changes

  • .github/workflows/ci.yml — CI workflow triggered on push/PR to main; validates Lua syntax across all .lua files using luac5.4 -p, failing on any error. Provides the required status check for branch protection.

  • .github/workflows/setup-branch-protection.yml — Manually-triggered (workflow_dispatch) workflow that applies branch protection rules to main via the GitHub API:

    • allow_deletions: false
    • allow_force_pushes: false
    • Required status check: Validate Lua addons (strict — branch must be up to date)
    • enforce_admins: true
    • Requires 1 approving PR review

After merging, trigger Actions → Setup Branch Protection → Run workflow once to activate the rules.


💡 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.

Co-authored-by: aragan <64033062+aragan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add protection to main branch Add CI workflow to enable main branch protection Feb 19, 2026
Copilot AI requested a review from aragan February 19, 2026 21:10
Co-authored-by: aragan <64033062+aragan@users.noreply.github.com>
Copilot AI changed the title Add CI workflow to enable main branch protection Automate main branch protection with deletion prevention Feb 19, 2026
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