Skip to content

Commit

Permalink
internal: add pr agent
Browse files Browse the repository at this point in the history
  • Loading branch information
s2mr committed May 7, 2024
1 parent f277587 commit 7931d1e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
review:
if: startsWith(github.event.comment.body, '/review')
if: startsWith(github.event.comment.body, '/butler-review')
runs-on: ubuntu-latest
steps:
- uses: ca-dp/code-butler@v1
Expand All @@ -21,7 +21,7 @@ jobs:
lang: ja
model: gpt-4-turbo-2024-04-09
chat:
if: startsWith(github.event.comment.body, '/chat')
if: startsWith(github.event.comment.body, '/butler-chat')
runs-on: ubuntu-latest
steps:
- uses: ca-dp/code-butler@v1
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/pr_agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
issue_comment:
types: [created]

jobs:
pr_agent_job:
if: startsWith(github.event.comment.body, '/pragent-review')
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
contents: write
name: Run pr agent on every pull request, respond to user comments
steps:
- name: PR Agent action step
id: pragent
uses: Codium-ai/pr-agent@main
env:
OPENAI_KEY: ${{ secrets.OPENAI_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_REVIEWER.EXTRA_INSTRUCTIONS: 'Please use Japanese in descriptions.'
PR_DESCRIPTION.EXTRA_INSTRUCTIONS: 'Please use Japanese in descriptions. Titles should have prefix of commitlint pattern such as `feat:`, `chore:`, `test:`, `fix:`, `ci:`, `docs:` etc'

0 comments on commit 7931d1e

Please sign in to comment.