Skip to content

Commit

Permalink
Merge pull request #358 from ca-risken/feature/add_ci-code-butler
Browse files Browse the repository at this point in the history
add yaml for ci
  • Loading branch information
senk8 authored Apr 1, 2024
2 parents 64c61d2 + 6e9e635 commit 2e3fcbb
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/code-butler.yml
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 2e3fcbb

Please sign in to comment.