Skip to content

Commit 9cf2544

Browse files
committed
Merge branch 'main' into dev
# Conflicts: # .claude-plugin/marketplace.json # .claude-plugin/plugin.json # README.md
2 parents d122c82 + 1e3fa1a commit 9cf2544

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: PR Target Branch Check
2+
3+
on:
4+
pull_request:
5+
branches: [main, dev]
6+
7+
jobs:
8+
check-target-branch:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Enforce branch targeting rules
12+
run: |
13+
SOURCE="${{ github.head_ref }}"
14+
TARGET="${{ github.base_ref }}"
15+
16+
echo "Source branch: $SOURCE"
17+
echo "Target branch: $TARGET"
18+
19+
if [ "$TARGET" = "main" ] && [ "$SOURCE" != "dev" ]; then
20+
echo ""
21+
echo "========================================"
22+
echo "FAILED: Only 'dev' branch can target 'main'."
23+
echo ""
24+
echo "Your branch '$SOURCE' must target 'dev' instead."
25+
echo "Please change the base branch of this PR to 'dev'."
26+
echo "========================================"
27+
exit 1
28+
fi
29+
30+
echo ""
31+
echo "========================================"
32+
echo "PASSED: Branch targeting rule satisfied."
33+
echo "========================================"

0 commit comments

Comments
 (0)