File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Block AI team files on main
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+
8+ jobs :
9+ check-ai-files :
10+ name : No .squad / .copilot files on main
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 0
16+
17+ - name : Fail if PR adds AI team files to main
18+ run : |
19+ # --diff-filter=AM: only Added or Modified — deletions (cleanup PRs) are allowed
20+ FILES=$(git diff --name-only --diff-filter=AM origin/main...HEAD \
21+ | grep -E "^\.squad/|^\.copilot/|^\.github/agents/" || true)
22+
23+ if [ -n "$FILES" ]; then
24+ echo "❌ This PR adds AI team files to main."
25+ echo " .squad/, .copilot/, and .github/agents/ belong on dev branches only."
26+ echo ""
27+ echo "Offending files:"
28+ echo "$FILES"
29+ exit 1
30+ fi
31+
32+ echo "✅ No AI team files detected in this PR."
You can’t perform that action at this time.
0 commit comments