ci: add check to reject PRs with .beads/issues.jsonl changes

Contributors frequently fork the repo and accidentally include their local
.beads/issues.jsonl changes in PRs. This adds:

1. A new CI job that fails PRs containing .beads/issues.jsonl changes
2. Clear error message with fix instructions
3. Updated CONTRIBUTING.md with guidance

This should prevent the common issue of PRs including unintended database changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-15 23:43:30 -08:00
parent 8e55b758aa
commit 9544558840
2 changed files with 39 additions and 0 deletions

View File

@@ -7,6 +7,32 @@ on:
branches: [ main ]
jobs:
# Fast check to catch accidental .beads/issues.jsonl changes from contributors
check-no-beads-changes:
name: Check for .beads changes
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check for .beads/issues.jsonl changes
run: |
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^\.beads/issues\.jsonl$"; then
echo "❌ This PR includes changes to .beads/issues.jsonl"
echo ""
echo "This file is the project's issue database and should not be modified in PRs."
echo ""
echo "To fix, run:"
echo " git checkout origin/main -- .beads/issues.jsonl"
echo " git commit --amend"
echo " git push --force"
echo ""
exit 1
fi
echo "✅ No .beads/issues.jsonl changes detected"
test:
name: Test
runs-on: ubuntu-latest