chore: adopt gsd agent automation #6
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: Auto-prep Cursor PRs | |
| # Cursor's API-triggered Coding agent opens PRs as Draft AND can't apply | |
| # labels (sandbox integration token lacks pull-requests: write). This | |
| # workflow flips drafts to ready AND adds needs-qa for cursor/* PRs. | |
| on: | |
| pull_request: | |
| types: [opened, reopened] | |
| jobs: | |
| prep: | |
| if: startsWith(github.head_ref, 'cursor/') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Mark as Ready for Review | |
| if: github.event.pull_request.draft == true | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh pr ready ${{ github.event.pull_request.number }} \ | |
| --repo ${{ github.repository }} | |
| - name: Add needs-qa label | |
| if: ${{ !contains(github.event.pull_request.labels.*.name, 'needs-qa') && !contains(github.event.pull_request.labels.*.name, 'qa-passed') }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh pr edit ${{ github.event.pull_request.number }} \ | |
| --repo ${{ github.repository }} \ | |
| --add-label needs-qa |