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:
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
@@ -7,6 +7,32 @@ on:
|
|||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
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:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -113,6 +113,18 @@ Add cycle detection for dependency graphs
|
|||||||
- Update documentation with examples
|
- Update documentation with examples
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Important: Don't Include .beads/issues.jsonl Changes
|
||||||
|
|
||||||
|
The `.beads/issues.jsonl` file is the project's issue database. **Do not include changes to this file in your PR.** CI will fail if this file is modified.
|
||||||
|
|
||||||
|
If you accidentally committed changes to this file, fix it with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git checkout origin/main -- .beads/issues.jsonl
|
||||||
|
git commit --amend
|
||||||
|
git push --force
|
||||||
|
```
|
||||||
|
|
||||||
### Pull Requests
|
### Pull Requests
|
||||||
|
|
||||||
- Keep PRs focused on a single feature or fix
|
- Keep PRs focused on a single feature or fix
|
||||||
@@ -120,6 +132,7 @@ Add cycle detection for dependency graphs
|
|||||||
- Update documentation as needed
|
- Update documentation as needed
|
||||||
- Ensure CI passes before requesting review
|
- Ensure CI passes before requesting review
|
||||||
- Respond to review feedback promptly
|
- Respond to review feedback promptly
|
||||||
|
- **Do not include `.beads/issues.jsonl` changes** (see above)
|
||||||
|
|
||||||
## Testing Guidelines
|
## Testing Guidelines
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user