microsoft / gpt-review

MIT License
249 stars 48 forks source link

[Bug Report]: No comment on PR after workflow run succeeds #211

Closed PratikGarai closed 11 months ago

PratikGarai commented 11 months ago

Module path

gpt review

review-gpt CLI version

0.9.5

Describe the bug

Since there was a dependency issue #208 breaking the workflow, I created a copy of the action.yml file in my repository. I edited the file to add the install command as proposed by this solution on the same issue and use this as my workflow.

The workflow runs successfully, but no changes are seen on the PR. No comments or reviews are created.

To reproduce

  1. Create a workflow in the existing repo
  2. Add the following contents shown in code snippet
    
    name: GPT Review on Pull Request

on: pull_request_target: branches: [ 'main' ]

jobs: add_pr_comment: runs-on: ubuntu-latest environment: name: Azure OpenAI PR Comment steps:

Code snippet

No response

Relevant log output

No response

bbyong2410 commented 11 months ago

Try to set write permissions for add_pr_comment job. It works to me.

    permissions:
      pull-requests: write
PratikGarai commented 11 months ago

Thanks a lot, this worked for me