This action supports running the Warp Agent in GitHub Actions. It wraps the Warp CLI with:
- Caching for package installation
- Capturing output for subsequent steps
To get started, you'll need a Warp API Key. We recommend storing this key as a secret in your repository or organization.
Then, add a step to your workflow that runs Warp:
- name: Review code changes in Warp
uses: warpdotdev/warp-agent-action@v1
with:
prompt: |
Review the code changes on this branch:
1. Use the `git` command to identify changes from the base branch
2. Thoroughly analyze all changes, and identify any issues with style, security, or correctness
3. If you have suggestions, use the `gh` command to comment on the PR.
warp_api_key: ${{ secrets.WARP_API_KEY }}- Inject relevant context from the GitHub event and previous steps into your Warp prompt via templating.
- Warp's output is available as
steps.${step_id}.outputs.agent_output. Use theoutput_format: jsonoption to get machine-readable agent output! - For debugging, use the
shareoption to automatically share the agent's session with your teammates. See the Session Sharing documentation for more info.
See the action definition for all options.
This repository includes several example workflows in examples/ that demonstrate how to use the
Warp Agent Action for common development tasks.
Each scenario is provided in three forms:
- A full reference workflow in
examples/that shows all jobs, permissions, and steps. - A reusable workflow in
.github/workflows/that can be invoked viaworkflow_callfrom other workflows. - A lightweight consumer template in
consumer-workflows/that wires the appropriate triggers and calls the reusable workflow viajobs.<id>.uses. These templates are intended to be copied into.github/workflows/in your own repository and customized.
- Pick a scenario below (e.g., Respond to Comment, Auto Fix Issue).
- Copy the corresponding file from
consumer-workflows/into.github/workflows/in your repository. - Ensure the required secrets (such as
WARP_API_KEY, andSLACK_WEBHOOK_URLwhere applicable) are defined in your repository and mapped under thesecrets:block.
Alternatively, advanced users can call the reusable workflows directly from their own workflows via
jobs.<id>.uses and wire with: and secrets: manually.
Full Example: examples/respond-to-comment.yml
Consumer Template: consumer-workflows/respond-to-comment.yml
Usage: Comment on a PR or Issue with @warp-agent (or your configured trigger phrase).
Description: Allows you to interact with the Agent directly in comments (e.g., "@warp-agent fix this typo").
Setup:
- Ensure
WARP_API_KEYis set in Repository Secrets.
Expected Output:
- The Agent replies to your comment with an answer or confirmation.
- If code changes were requested, the Agent commits them directly to the PR branch.
When to use: Interactive coding assistance during code review or issue triage.
Full Example: examples/review-pr.yml
Consumer Template: consumer-workflows/review-pr.yml
Usage: Runs automatically when a Pull Request is opened or marked ready for review.
Description: Analyzes the diff of the PR and provides code review feedback.
Setup:
- Ensure
WARP_API_KEYis set in Repository Secrets. - The Agent needs read access to contents and write access to pull-requests.
Expected Output:
- Inline comments on the PR diff highlighting potential bugs, security issues, or style improvements.
- A general summary comment if applicable.
When to use: Get immediate feedback on code changes before human review.
Full Example: examples/auto-fix-issue.yml
Consumer Template: consumer-workflows/auto-fix-issue.yml
Usage: Apply the label warp-agent to any GitHub Issue.
Description: Triggers when the label is applied, analyzes the issue, and attempts to write code to fix it.
Setup:
- Ensure
WARP_API_KEYis set in Repository Secrets. - Action requires write permissions for contents, issues, and pull-requests.
Expected Output:
- If a fix is found: A new Pull Request (
fix/issue-NUMBER) is created and linked to the issue. - If no fix is found: The Agent comments on the issue explaining why.
When to use: Delegate bug fixes, small features, or chore tasks to the Warp Agent.
Full Example: examples/daily-issue-summary.yml
Consumer Template: consumer-workflows/daily-issue-summary.yml
Usage: Runs automatically on a schedule (every day at 9:00 UTC).
Description: Fetches issues created in the last 24 hours and generates a summary.
Setup:
- Ensure
WARP_API_KEYis set in Repository Secrets. - Ensure
SLACK_WEBHOOK_URLis set in Repository Secrets to receive the report.
Expected Output: A Slack message containing a categorized summary of new issues (Bugs, Features, etc.).
When to use: Keep your team aligned on incoming issues without manually checking GitHub.
Full Example: examples/fix-failing-checks.yml
Consumer Template: consumer-workflows/fix-failing-checks.yml
Usage: Triggers automatically when a specified workflow (e.g., "Continuous Integration") fails.
Description: Analyzes failure logs from the failed workflow to determine the cause and attempts a fix.
Setup:
- Ensure
WARP_API_KEYis set in Repository Secrets. - Update the
workflow_run.workflowslist in the file to match your CI workflow names.
Expected Output:
- A new Pull Request containing the fix for the build or test failure.
- Comments on the original PR (if applicable) with a link to the fix.
When to use: Reduce downtime caused by broken builds or flaky tests.
Full Example: examples/suggest-review-fixes.yml
Consumer Template: consumer-workflows/suggest-review-fixes.yml
Usage: Runs automatically when a Pull Request review is submitted.
Description: Analyzes review comments. If a comment requests a simple fix (e.g., typo, naming, style), the Agent replies with a code suggestion block containing the fix.
Setup:
- Ensure
WARP_API_KEYis set in Repository Secrets. - Action requires write permissions for
contentsandpull-requests.
Expected Output:
- Replies to review comments with code suggestions for simple fixes.
- Skips complex or unclear comments.
When to use: Speed up the cycle of applying review feedback for trivial issues.