This was copy/pasted from the original but we changed the logic so it's inaccurate. The logic here does not need an explanation. Signed-off-by: Adam Williamson <awilliam@redhat.com>
31 lines
946 B
YAML
31 lines
946 B
YAML
name: AI Code Review
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
remove_label:
|
|
type: boolean
|
|
default: true
|
|
pr:
|
|
type: string
|
|
required: true
|
|
|
|
jobs:
|
|
ai-review:
|
|
container:
|
|
image: registry.gitlab.com/redhat/edge/ci-cd/ai-code-review:v2.5.0
|
|
steps:
|
|
- name: Run AI Review
|
|
env:
|
|
AI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
|
run: ai-code-review --platform forgejo --pr-number ${{ inputs.pr }} --post
|
|
|
|
# this has to be a separate job because ai-code-review container does not have nodejs in it
|
|
# also note this does not work for PRs from forks because of a forgejo bug
|
|
# https://codeberg.org/forgejo/forgejo/issues/10733
|
|
remove-label:
|
|
if: ${{ inputs.remove_label }}
|
|
runs-on: fedora
|
|
steps:
|
|
- uses: https://github.com/actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0
|
|
with:
|
|
labels: ai-review-please
|