anc95 / anc95/ChatGPT-CodeReview
OPENAI_API_KEY configuration error: Issues during GitHub Action execution
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 4.5k
- Forks
- 461
- PR merge metrics
- No merged PRs in 30d
Description
I have a problem with OPENAI_API_KEY not being recognized.

-
In the first attempt, I set the OPENAI_API_KEY variable in the Variables tab. The GitHub Action runs, but OPENAI_API_KEY is empty, and the error message says it cannot be found.

-
In the second attempt, I set up the YAML file like this and pushed it, but OPENAI_API_KEY is still empty.
-
Despite setting up the OPENAI_API_KEY in Actions secrets and variables, you are still encountering an issue where the OPENAI_API_KEY value is not being recognized.
name: Code Review
permissions:
contents: read
pull-requests: write
on:
pull_request:
types: [opened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: anc95/ChatGPT-CodeReview@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}


Please tell me how to solve the problem.🥲
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GitHub Actions workflow shown in the issue and the environment-variable handling for anc95/ChatGPT-CodeReview@main. Determine how OPENAI_API_KEY is expected to reach the action without exposing the secret; done means a reproducible workflow run recognizes the key safely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100