Skip to content

Commit cc5e561

Browse files
workflows: add chatgpt ai reviewer
Adds openai models as reviewers for pull requests. Signed-off-by: Giacomo Dematteis <giacomo.dematteis@nordicsemi.no>
1 parent 5b07eff commit cc5e561

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/openai.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: AI Code Reviewer
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
permissions: write-all
10+
11+
jobs:
12+
review:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v3
17+
18+
- name: AI Code Reviewer
19+
uses: aidar-freeed/ai-codereviewer@main
20+
with:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # The GITHUB_TOKEN is there by default so you just need to keep it like it is and not necessarily need to add it as secret as it will throw an error. [More Details](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret)
22+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
23+
OPENAI_API_MODEL: "gpt-4" # Optional: defaults to "gpt-4"
24+
#exclude: "**/*.json, **/*.md" # Optional: exclude patterns separated by commas

0 commit comments

Comments
 (0)