Skip to content

[QUESTION] How i'm solve this problem with the OCO_API_KEY? #475

Open
@Humba01

Description

@Humba01

I was setting up my workflow using OpenCommit as a final step to tidy up my commit messages. However, I ran into this problem:

'OCO_API_KEY' name is invalid, it should be either 'OCO_OCO_API_KEY' or it doesn't exist.

I have no idea how to solve this problem, my yml configuration is this one:

  opencommit:
    timeout-minutes: 2
    name: OpenCommit
    runs-on: ubuntu-latest
    permissions: write-all
    steps:
    - name: Setup Node.js Environment
      uses: actions/setup-node@v2
      with:
        node-version: '18'
    - uses: actions/checkout@v3
      with:
        fetch-depth: 0
    - name: Install Dependencies
      run: npm i -g opencommit
    - name: Run opencommit
      run: npx oco config set OCO_API_KEY=${{ secrets.OPENAI_API_KEY }}
    - uses: di-sukharev/opencommit@github-action-v1.0.4
      with:
        GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

      env:
        OCO_API_KEY: ${{ secrets.OPENAI_API_KEY }}
        OCO_TOKENS_MAX_INPUT: 4096
        OCO_TOKENS_MAX_OUTPUT: 500
        OCO_OPENAI_BASE_PATH: ''
        OCO_DESCRIPTION: false
        OCO_EMOJI: true
        OCO_MODEL: gpt-3.5-turbo
        OCO_LANGUAGE: pt-br
        OCO_PROMPT_MODULE: conventional-commit
        OCO_WHY: true

Yes, my secret has this name because I have another work using the same information.

P.S.: I needed to configure the npm package before running the action because it was unable to run without the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions