Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

setup-issue-agent

GitHub Action for Issue Agent


Usage

Latest Version

steps:
- uses: clover0/setup-issue-agent@v1

Specific Issue Agent Version

steps:
- uses: clover0/setup-issue-agent@v1with:
version: "0.16.0"

About Issue Agent

Documentation

GitHub Actions Cookbook

Issue Agent requires the following GitHub permissions.

  • Issues: Read-only
  • Contents: Readn and Write
  • Pull requests: Read and Write
  • [optional] Workflows: Read and Write (If you change the workflow files)

Full workflow examples: examples/

Run Action by labeling an issue

Example of running an issue with the label run-agent.

name: Run Agent on Labelon:
issues:
types:
- labeledpermissions: {}jobs:
run-agent:
if: ${{ github.event.label.name == 'run-agent' }}runs-on: ubuntu-lateststeps:
- name: Install Issue Agent Actionuses: clover0/setup-issue-agent@v1# You can also use your Personal Access Token (PAT) instead of the token issued by the GitHub App
- uses: actions/create-github-app-token@v1id: app-tokenwith:
app-id: ${{ secrets.APP_ID }}private-key: ${{ secrets.PRIVATE_KEY }}
- name: Run Issue Agent Actionrun: | issue-agent create-pr ${GITHUB_REPOSITORY}/issues/${{ github.event.issue.number }} \ --base_branch main \ --model claude-3-7-sonnet-20250219env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

AWS Bedrock with OIDC

name: Run Agent on Labelon:
issues:
types:
- labeledjobs:
run-agent-oidc:
if: ${{ github.event.label.name == 'run-agent' }}permissions:
id-token: writeruns-on: ubuntu-lateststeps:
- name: Install Issue Agent Actionuses: clover0/setup-issue-agent@v1
- name: configure aws credentialsuses: aws-actions/configure-aws-credentials@v4with:
role-to-assume: "arn:aws:iam::<AWS-ACCOUNT>:role/<ROLE-NAME>"role-session-name: run-agent-${{ github.run_id }}aws-region: "AWS-REGION"# You can also use your Personal Access Token (PAT) instead of the token issued by the GitHub App
- uses: actions/create-github-app-token@v1id: app-tokenwith:
app-id: ${{ secrets.APP_ID }}private-key: ${{ secrets.PRIVATE_KEY }}
- name: Run Issue Agent Actionrun: | issue-agent create-pr ${GITHUB_REPOSITORY}/issues/${{ github.event.issue.number }} \ --base_branch main \ --model us.anthropic.claude-3-5-sonnet-20241022-v2:0 \ --aws_region us-east-1env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

If regional specificity is not a concern, you can use cross-region inference with a cross-region profile. For example, 'us.anthropic.claude-3-5-sonnet-20241022-v2:0'.

Run Action by commenting on an Pull Request

name: Run Agenton:
# Run the workflow on pull request review comment creation event.pull_request_review_comment:
types:
- createdpermissions:
id-token: writejobs:
# React to review comment with `/agent` prefix in review commentreact-to-review-comment:
if: ${{ github.event_name == 'pull_request_review_comment' && startsWith(github.event.comment.body, '/agent')}}name: React to Review commentruns-on: ubuntu-lateststeps:
- name: Install Issue Agent Actionuses: clover0/setup-issue-agent@v1
- name: configure aws credentialsuses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # 4.0.2with:
role-to-assume: "arn:aws:iam::<AWS-ACCOUNT>:role/<ROLE-NAME>"role-session-name: run-agent-${{ github.run_id }}aws-region: "<AWS-REGION>"
- uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1id: app-tokenwith:
app-id: ${{ secrets.APP_ID }}private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Run Issue Agent Actionrun: | issue-agent react ${GITHUB_REPOSITORY}/pulls/comments/${{ github.event.comment.id }} \ --model us.anthropic.claude-3-7-sonnet-20250219-v1:0 \ --log_level debug \ --aws_region us-east-1env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

About

GitHub Actions for Issue Agent

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages