diff --git a/.github/workflows/fullsend-poll-jira.yml b/.github/workflows/fullsend-poll-jira.yml deleted file mode 100644 index 218ab7471..000000000 --- a/.github/workflows/fullsend-poll-jira.yml +++ /dev/null @@ -1,114 +0,0 @@ ---- -# fullsend Jira poll -# -# Scheduled workflow that polls Jira for actionable issues/comments and hands -# the resulting dispatches to fullsend's harness for agent execution. -# -# How it works: -# - The `poll` job runs `fullsend poll --input-driver jira-poll`, which writes -# a dispatch record per routed event to dispatches.json, and builds a GHA -# matrix ({include: [...]}) from it. -# - The `harness` job passes that matrix to fullsend's reusable-dispatch -# workflow. When `matrix` is provided, reusable-dispatch skips its own -# routing and runs the harness agents directly against the records -# (see docs/guides/user/jira-integration.md). -# -# Security model: -# - Runs only against this repo's trusted default-branch code (no PR -# checkout), so it is not exposed to "pwn request" style attacks. -# - The fullsend binary is pinned to a specific release and checksum-verified -# before it is given access to the Jira credentials. -# - The reusable-dispatch workflow is pinned to a full commit SHA, and it -# passes user-controlled fields to agents via env vars rather than -# interpolating them into run blocks. -# -# Note: built-in agents cannot yet fully process Jira work-item payloads -# (they expect a GitHub issue number, not a Jira key — fullsend #2264), so -# dispatched agent runs may not complete until that follow-up lands. -name: fullsend Jira poll - -on: - schedule: - - cron: "*/5 * * * *" # every 5 minutes - workflow_dispatch: {} # allow manual runs - -permissions: - actions: write - contents: write - id-token: write - issues: write - packages: read - pull-requests: write - -jobs: - poll: - if: github.repository == 'openshift/osdctl' - runs-on: ubuntu-24.04 - concurrency: - group: fullsend-jira-poll - cancel-in-progress: false - outputs: - matrix: ${{ steps.build-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false - - - name: Install fullsend - env: - GH_TOKEN: ${{ github.token }} - run: | - gh release download v0.43.0 --repo fullsend-ai/fullsend -p 'fullsend_*_linux_amd64.tar.gz' -O - | tar xz - sudo mv fullsend /usr/local/bin/ - - - name: Poll Jira - env: - JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} - JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} - JIRA_BASE_URL: ${{ vars.JIRA_BASE_URL }} - TARGET_REPO: ${{ github.repository }} - run: | - fullsend poll \ - --input-driver jira-poll \ - --jira-url "${JIRA_BASE_URL}" \ - --jira-project ROSAENG \ - --jql 'project = ROSAENG AND ( component = "osdctl") AND status not in (Closed, Done)' \ - --target-repo "${TARGET_REPO}" \ - --output dispatches.json \ - --fullsend-dir .fullsend - - - name: Build dispatch matrix - id: build-matrix - run: | - set -euo pipefail - if ! jq -e 'length > 0' dispatches.json > /dev/null 2>&1; then - echo "No dispatches." - echo 'matrix={"include":[]}' >> "${GITHUB_OUTPUT}" - exit 0 - fi - MATRIX=$(jq -c '{include: .}' dispatches.json) - DELIM="MATRIX_$(openssl rand -hex 8)" - { - echo "matrix<<${DELIM}" - printf '%s' "${MATRIX}" - echo - echo "${DELIM}" - } >> "${GITHUB_OUTPUT}" - - harness: - if: github.repository == 'openshift/osdctl' - name: Harness - needs: poll - uses: fullsend-ai/fullsend/.github/workflows/reusable-dispatch.yml@d5f36921ac754705619f38c637ef692873809fbc # v0.43.0 - with: - matrix: ${{ needs.poll.outputs.matrix }} - mint_url: ${{ vars.FULLSEND_MINT_URL }} - gcp_region: ${{ vars.FULLSEND_GCP_REGION }} - jira_base_url: ${{ vars.JIRA_BASE_URL }} - secrets: - FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }} - FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }} - OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_TRACES_HEADERS }} - OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.OTEL_EXPORTER_OTLP_HEADERS }} - JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} - JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}