Conversation
feat: Add GitHub Actions workflow to prevent merging to main from non…
📝 WalkthroughWalkthroughA new GitHub Actions workflow is added that enforces branch protection on the main branch. The workflow triggers on pull requests to main and blocks merges unless the source branch is 'dev', returning an exit code of 1 for non-dev branches. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
PR Type
Enhancement
Description
Add GitHub Actions workflow to enforce dev branch merging policy
Prevent direct merges to main from non-dev branches
Fail CI checks when pull requests target main from other branches
Diagram Walkthrough
flowchart LR PR["Pull Request to main"] --> Check["Check source branch"] Check --> IsDev{"Is from dev?"} IsDev -->|Yes| Pass["Allow merge"] IsDev -->|No| Fail["Fail CI check"]File Walkthrough
var-branch.yml
Add main branch protection workflow.github/workflows/var-branch.yml
branch
Summary by CodeRabbit