The Forge AI Run action lets you run an agent team on every pull request. It posts the result as a comment and can fail the check as a quality gate — perfect for automated DevSecOps reviews, code review, and compliance checks.
Step 1: Add your API key as a secret
In your repo, go to Settings → Secrets and variables → Actions and add a secret named FORGE_API_KEY with your Forge key.
Step 2: Add the workflow
Create .github/workflows/forge-review.yml:
name: Forge PR Review
on:
pull_request:
types: [opened, synchronize]
jobs:
review:
runs-on: ubuntu-latest
permissions:
pull-requests: write # to post the result comment
contents: read
steps:
- uses: ShanovaAI/Forge/packages/github-action@main
with:
api-key: ${{ secrets.FORGE_API_KEY }}
team-id: <your-team-id>
brief: |
Review PR #${{ github.event.pull_request.number }}:
${{ github.event.pull_request.title }}
${{ github.event.pull_request.body }}
fail-on: blocked,needs_revisionStep 3: Open a pull request
The action creates a run, streams agent events into the job log, and posts a sticky comment with the status, outputs, and a link. On the next commit it updates the same comment instead of adding a new one.
Step 4: Gate the merge (optional)
The fail-on input fails the check — blocking the merge if the check is required — when any of these match:
failed— the run failedblocked— the run or an agent is blocked / needs approvalneeds_revision— an agent returned a needs_revision verdictconfidence<0.7— an agent's confidence dropped below the threshold
wait: false to fire-and-forget, or comment: false to skip the PR comment. The action also setsrun-id, run-url, status, and outputs for use in later steps.