anc95 / ChatGPT-CodeReview

🐥 A code review bot powered by ChatGPT
https://github.com/apps/cr-gpt
ISC License
3.77k stars 361 forks source link

`OPENAI_API_KEY` not properly detected? #85

Closed PeterDaveHello closed 1 year ago

PeterDaveHello commented 1 year ago

Got this error from multiple PRs:

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

(https://github.com/transmission-remote-gui/transgui/pull/1427)

The secret was set as mentioned in the readme, tried both Repository & Organization level:

image

Not sure what's wrong? (I installed from https://github.com/apps/cr-gpt)

anc95 commented 1 year ago

@PeterDaveHello If you are installing from https://github.com/apps/cr-gpt, please try setting the OPENAI_API_KEY under variables instead of secrets, as a GitHub app is unable to access the secrets value.

PeterDaveHello commented 1 year ago

Thanks, it works, not sure if that'll be security concerns that we should be careful?

anc95 commented 1 year ago

@PeterDaveHello Only the owner of the repo is able to view the variable settings, and since the app does not log or store any information related to the variable, it can be considered secure to a certain extent.

PeterDaveHello commented 1 year ago

Okay, thanks!

luomanman567 commented 1 year ago

I got the same problem...Setting the OPENAI_API_KEY under variables didn't work.