docs: contrib-harnesses reference + .beads/backup gitignore (hq-j6hur.3.1) #2469
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Block Internal PRs | |
| on: | |
| pull_request: | |
| types: [opened, reopened] | |
| jobs: | |
| block-internal-prs: | |
| name: Block Internal PRs | |
| # Only run if PR is from the same repo (not a fork) | |
| if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'renovate[bot]' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Close PR and comment | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | |
| with: | |
| script: | | |
| const prNumber = context.issue.number; | |
| const branch = context.payload.pull_request.head.ref; | |
| const body = [ | |
| '**Internal PRs are not allowed.**', | |
| '', | |
| 'Gas Town agents push directly to main. PRs are for external contributors only.', | |
| '', | |
| 'To land your changes:', | |
| '```bash', | |
| 'git checkout main', | |
| 'git merge ' + branch, | |
| 'git push origin main', | |
| 'git push origin --delete ' + branch, | |
| '```', | |
| '', | |
| 'See CLAUDE.md: "Crew workers push directly to main. No feature branches. NEVER create PRs."' | |
| ].join('\n'); | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: prNumber, | |
| body: body | |
| }); | |
| await github.rest.pulls.update({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: prNumber, | |
| state: 'closed' | |
| }); | |
| core.setFailed('Internal PR blocked. Push directly to main instead.'); |