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 is the best way I can figure to allow callers to do
arbitrary ai-code-review configuration, e.g. disabling the PR
summary, changing the language hint...
This seems more sane than mirroring every possibly setting as an
'input'. There doesn't seem to be a good way to pass through
arbitrary environment variables from the parent workflow (this is
a security measure I believe), so we can't do it that way. I tried
letting the repo carry an actual config file and checking that
out sparsely with actions/checkout, but it doesn't work because we
don't have nodejs in the ai-code-review container.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
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>
Per Matrix, it's not needed/supported on Forgejo, and causes odd
behavior on PRs to this repo itself.
Signed-off-by: Adam Williamson <awilliam@redhat.com>