ai-review: allow passing API key as AICR_API_KEY
Requiring it to be GEMINI_API_KEY was always a bit dumb, but now we're allowing for the repo to contain a config file it's more dumb, because a repo could include a config file that configures a different model provider. Of course they can just have the key for that provider under the name GEMINI_API_KEY and stuff will work, but it looks dumb. So, let's allow (and prefer) the more generic name AICR_API_KEY, which identifies this as "the key for ai_code_review, whatever model provider it's configured for". Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
896b448825
commit
bbbe4cb4f3
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
if: ${{ inputs.config }}
|
||||
- name: Run AI Review
|
||||
env:
|
||||
AI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
||||
AI_API_KEY: ${{ secrets.AICR_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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue