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

Configure the AI review on new PRs #1973

Merged
merged 1 commit into from
Oct 18, 2024
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
26 changes: 26 additions & 0 deletions .github/workflows/ai-code-scanner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: AI Code Review

on:
push:
branches-ignore:
- main

jobs:
ai_code_review:
if: contains(github.event.head_commit.message, '[review]')
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: AI Code Review
uses: cds-snc/cds-ai-codereviewer@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_MODEL: ${{ vars.OPENAI_API_MODEL }}
OPENAI_API_VERSION: ${{ vars.OPENAI_API_VERSION }}
OPENAI_BASE_URL: ${{ vars.OPENAI_BASE_URL }}
exclude: "*lock*,.env,**/*.conf,**/*.ini,**/node_modules/**"
include: "**/*.cfg,**/*.html,**/*.js,**/*.json,**/*.md,**/*.py,**/*.sh,**/*.yml,**/*.yaml"
Loading