Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change GHA behaviour #136

Open
l3r8yJ opened this issue Jun 25, 2024 · 3 comments
Open

Change GHA behaviour #136

l3r8yJ opened this issue Jun 25, 2024 · 3 comments

Comments

@l3r8yJ
Copy link
Contributor

l3r8yJ commented Jun 25, 2024

@h1alexbel in cases when reviewer requesting changes action just not triggering; I think it can be applied in cases like that too, wdyt?

@h1alexbel
Copy link
Contributor

@l3r8yJ I think we need to review the whole pull request review. Once pull request accepted this action analyzes all the comments from all the reviews in that pull request. In case of single "LGMT", action will get and probably complain about that. In case of multiple reviews with rejections, finally review will be accepted and trigger action, that will receive all the comments

@h1alexbel
Copy link
Contributor

@l3r8yJ but I like the idea of triggering action on each review

@h1alexbel
Copy link
Contributor

@l3r8yJ If we remove this line from yml file:

-    if: ${{ github.event.review.state == 'approved' }}

Action will be triggered on each review state. Full yml:

name: code-review
on:
 pull_request_review:
   types: submitted
permissions:
  pull-requests: write
  contents: read
jobs:
  check:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
      - uses: docker://tracehub/code-review-action:latest
        with:
          openai_token: ${{ secrets.OPENAI_TOKEN }}
          openai_model: gpt-4
          github_token: ${{ secrets.GITHUB_TOKEN }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants