|
| 1 | +# fullsend shim workflow (per-repo installation mode) |
| 2 | +# Routes events to agent workflows via reusable-dispatch.yml. |
| 3 | +# All agent execution happens in this repo's context — no external |
| 4 | +# config repo is needed. |
| 5 | +# |
| 6 | +# Security: pull_request_target runs the BASE branch version of this workflow, |
| 7 | +# preventing PRs from modifying it to exfiltrate credentials. |
| 8 | +# This shim never checks out PR code, so it is not vulnerable to "pwn request" |
| 9 | +# attacks. |
| 10 | +# |
| 11 | +# Routing: this shim forwards the raw event context to reusable-dispatch.yml, |
| 12 | +# which determines the stage and conditionally calls the appropriate |
| 13 | +# reusable-{stage}.yml workflow. Adding a new stage requires only a case |
| 14 | +# branch in reusable-dispatch.yml — zero changes to this repo. |
| 15 | +name: fullsend |
| 16 | + |
| 17 | +permissions: |
| 18 | + actions: write |
| 19 | + id-token: write |
| 20 | + contents: write |
| 21 | + issues: write |
| 22 | + packages: read |
| 23 | + pull-requests: write |
| 24 | + |
| 25 | +on: |
| 26 | + issues: |
| 27 | + types: [opened, edited, labeled] |
| 28 | + issue_comment: |
| 29 | + types: [created] |
| 30 | + pull_request_target: |
| 31 | + types: [opened, synchronize, ready_for_review, closed] |
| 32 | + pull_request_review: |
| 33 | + types: [submitted] |
| 34 | + |
| 35 | +jobs: |
| 36 | + dispatch: |
| 37 | + concurrency: |
| 38 | + group: fullsend-dispatch-${{ github.event.issue.number || github.event.pull_request.number }} |
| 39 | + cancel-in-progress: false |
| 40 | + if: >- |
| 41 | + github.event_name != 'issue_comment' |
| 42 | + || github.event.comment.user.type != 'Bot' |
| 43 | + uses: fullsend-ai/fullsend/.github/workflows/reusable-dispatch.yml@v0 |
| 44 | + with: |
| 45 | + event_action: ${{ github.event.action }} |
| 46 | + install_mode: per-repo |
| 47 | + mint_url: ${{ vars.FULLSEND_MINT_URL }} |
| 48 | + gcp_region: ${{ vars.FULLSEND_GCP_REGION }} |
| 49 | + secrets: |
| 50 | + FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }} |
| 51 | + FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }} |
| 52 | + |
| 53 | + stop-fix: |
| 54 | + if: >- |
| 55 | + github.event_name == 'issue_comment' |
| 56 | + && github.event.issue.pull_request |
| 57 | + && github.event.comment.user.type != 'Bot' |
| 58 | + && github.event.comment.body == '/fs-fix-stop' |
| 59 | + && ( |
| 60 | + github.event.comment.author_association == 'OWNER' |
| 61 | + || github.event.comment.author_association == 'MEMBER' |
| 62 | + || github.event.comment.author_association == 'COLLABORATOR' |
| 63 | + || github.event.comment.author_association == 'CONTRIBUTOR' |
| 64 | + || github.event.comment.user.login == github.event.issue.user.login |
| 65 | + ) |
| 66 | + runs-on: ubuntu-latest |
| 67 | + permissions: |
| 68 | + contents: read |
| 69 | + issues: write |
| 70 | + pull-requests: write |
| 71 | + steps: |
| 72 | + - name: Add fullsend-no-fix label and notify |
| 73 | + env: |
| 74 | + GH_TOKEN: ${{ github.token }} |
| 75 | + PR_NUMBER: ${{ github.event.issue.number }} |
| 76 | + REPO: ${{ github.repository }} |
| 77 | + run: | |
| 78 | + set -euo pipefail |
| 79 | + gh label create "fullsend-no-fix" --repo "$REPO" \ |
| 80 | + --description "Skip bot-triggered fix agent runs" --color "FBCA04" \ |
| 81 | + --force 2>/dev/null || true |
| 82 | + gh pr edit "$PR_NUMBER" --repo "$REPO" \ |
| 83 | + --add-label "fullsend-no-fix" |
| 84 | + gh pr comment "$PR_NUMBER" --repo "$REPO" \ |
| 85 | + --body "Fix agent disabled for this PR. Remove the \`fullsend-no-fix\` label or use \`/fs-fix\` to re-engage." |
0 commit comments