Skip to content

Commit

Permalink
Add Code-Butler (#4642)
Browse files Browse the repository at this point in the history
Signed-off-by: uncle <unclesam2501@gmail.com>
  • Loading branch information
ouchi2501 authored Nov 1, 2023
1 parent afadde6 commit 3a153c1
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/code-butler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Code Butler

permissions:
contents: read
pull-requests: write

on:
issue_comment:
types: [created]

jobs:
review:
if: startsWith(github.event.comment.body, '/review')
runs-on: ubuntu-latest
steps:
- uses: ca-dp/code-butler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
cmd: review
chat:
if: startsWith(github.event.comment.body, '/chat')
runs-on: ubuntu-latest
steps:
- uses: ca-dp/code-butler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
cmd: chat
comment_body: ${{ github.event.comment.body }}

0 comments on commit 3a153c1

Please sign in to comment.