zioproto / github-issues-ai-assistant

MIT License
0 stars 1 forks source link

problem with reading secrets #10

Open zioproto opened 1 year ago

zioproto commented 1 year ago

I will demonstrate that you cannot read the secrets when triggering the issue with:

on:
  issues:
    types: [opened, edited]

this is the full code:

name: My Workflow
permissions: write-all
on:
  issues:
    types: [opened, edited]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Run action
      uses: zioproto/github-issues-ai-assistant@main
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        issue_number: ${{ github.event.issue.number }}
        #issue_number: ${{ inputs.issue_number }}
        OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
        OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }}
github-actions[bot] commented 1 year ago

The GitHub issue discusses a demonstration that shows that secrets cannot be read when triggering an issue with the code provided. The code includes a workflow that runs on issues that are opened or edited, and a job that runs on Ubuntu and includes steps to checkout the repository and run an action using the GitHub API and OpenAI API keys.