anc95 / anc95/ChatGPT-CodeReview

OPENAI_API_KEY configuration error: Issues during GitHub Action execution

Open
#67 11 comments 0 reactions 0 assignees View on GitHub

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.

Screenshot 2023-04-10 at 00 30 56

  • 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.
    Screenshot 2023-04-10 at 00 31 39

  • 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 }}

Screenshot 2023-04-10 at 00 50 09

Screenshot 2023-04-10 at 00 33 36

Please tell me how to solve the problem.🥲

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.