Skip to main content

CI Integration: GitHub Actions + Jetty

Trigger Jetty workflows from your CI pipeline and post results back to PRs.

Overview

Setup

1. Add Secrets to Your Repository

In your GitHub repo settings, add:

SecretValue
JETTY_API_TOKENYour Jetty API token
MISE_WEBHOOK_SECRETA shared secret for webhook signature verification

2. Choose Your Endpoint Mode

ModeEndpointWhen to Use
SyncPOST /run-github-action/{collection}/{task}Fast checks that finish within CI job timeout
AsyncPOST /run-github-action-async/{collection}/{task}Long-running agent tasks. Returns immediately, sends webhook on completion.

3. Create a GitHub Action

Sync Mode (Simple)

name: Jetty Quality Check
on:
pull_request:
types: [opened, synchronize]

jobs:
quality-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run Jetty workflow
run: |
RESPONSE=$(curl -s -X POST \
"https://flows-api.jetty.io/run-github-action/${{ vars.JETTY_COLLECTION }}/${{ vars.JETTY_TASK }}" \
-H "Authorization: Bearer ${{ secrets.JETTY_API_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{
"files": ["src/"],
"pr_number": ${{ github.event.pull_request.number }},
"repo": "${{ github.repository }}"
}')
echo "$RESPONSE"

Async Mode (With Webhook)

name: Jetty Agent Review
on:
pull_request:
types: [opened, synchronize]

jobs:
agent-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Launch Jetty workflow
run: |
curl -X POST \
"https://flows-api.jetty.io/run-github-action-async/${{ vars.JETTY_COLLECTION }}/${{ vars.JETTY_TASK }}" \
-H "Authorization: Bearer ${{ secrets.JETTY_API_TOKEN }}" \
-F "webhook_url=${{ vars.WEBHOOK_ENDPOINT }}" \
-F "webhook_secret=${{ secrets.MISE_WEBHOOK_SECRET }}" \
-F 'init_params={"pr_number": ${{ github.event.pull_request.number }}, "repo": "${{ github.repository }}"}'

Webhook Callbacks

When an async workflow completes, Jetty POSTs the full trajectory to your webhook URL:

  • X-Mise-Signature — HMAC-SHA256 of "{timestamp}.{payload}" with your webhook secret
  • X-Mise-Timestamp — Unix timestamp
  • X-Mise-Trajectory-Id — Trajectory ID

Always verify signatures with timing-safe comparison. See Webhook Reference for the full payload schema and verification examples.

Quality Gate Pattern

The most powerful CI pattern combines an agent run with LLM-as-judge evaluation:

The webhook callback includes pass/fail status, score, explanation, and artifact URLs. Your CI job parses the markdown summary and posts it as a PR comment.

Triggers

GitHub Actions can trigger Jetty workflows on:

  • PR opened/updated — Code review, test generation, quality checks
  • Push to branch — Continuous analysis
  • Scheduled cron — Periodic audits, batch processing
  • Manual dispatch — On-demand runs via workflow_dispatch

Next Steps