Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example of using GitHub App token #60

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ steps:
- name: Issue Agent
uses: clover0/setup-issue-agent@v1
with:
version: "0.7.0"
version: "0.7.1"
```

# About Issue Agent

[https://clover0.github.io/issue-agent/](Documentation)

# GitHub Action Cookbook

## If the issue is labeled

Example, If the issue is labeled with `run-agent`, run the Issue Agent Action.

```yml
Expand Down Expand Up @@ -60,24 +62,29 @@ jobs:
run: |
issue-agent version

- uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}

- name: Run Issue Agent Action
run: |
issue-agent create-pr ${GITHUB_REPOSITORY}/issues/${{ github.event.issue.number }} \
--base_branch main \
--model claude-3-5-sonnet-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
```

### AWS Bedrock with OIDC

`claude-3-5-sonnet-20241022-v2` is recommended.

If you do not care about regions, you can also use cross-region inference.
If you do not care about regions, you can also use cross-region inference.
In that case, use cross-region profile. For Example, `us.anthropic.claude-3-5-sonnet-20241022-v2:0`.


```yml
name: Run Agent on Label

Expand Down Expand Up @@ -113,12 +120,18 @@ jobs:
run: |
issue-agent version

- uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}

- name: Run Issue Agent Action
run: |
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-west-2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
```