ai-codereviewer icon indicating copy to clipboard operation
ai-codereviewer copied to clipboard

Workflow failed

Open maxbaluev opened this issue 2 years ago • 14 comments

Codereviewer workflow failed with obscure error. I have the same problem with public and private forks.

My config:

name: AI Code Reviewer

on:
  pull_request:
    types:
      - opened
      - synchronize
permissions: write-all
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v3

      - name: AI Code Reviewer
        uses: freeedcom/ai-codereviewer@main
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
          OPENAI_API_MODEL: "gpt-4" # Optional: defaults to "gpt-4"
          exclude: "**/*.json, **/*.md" # Optional: exclude patterns separated by commas

Full log

image

maxbaluev avatar Aug 10 '23 10:08 maxbaluev

I am also experiencing the same error.

noahxp avatar Aug 22 '23 08:08 noahxp

me too

MhouneyLH avatar Aug 22 '23 13:08 MhouneyLH

@villesau Can you help us?

maxbaluev avatar Aug 24 '23 13:08 maxbaluev

Getting the same error but I'm using API key for chatGPT 3.5 not sure if it is related (will it even work with 3.5?)

BenK93 avatar Sep 02 '23 14:09 BenK93

Does it fail already on pull request open or with subsequent commits?

villesau avatar Sep 02 '23 18:09 villesau

Does it fail already on pull request open or with subsequent commits?

In both cases it crashes.

MhouneyLH avatar Sep 07 '23 14:09 MhouneyLH

Same Error

SamiHK avatar Sep 20 '23 07:09 SamiHK

Unfortunately I'm not able to reproduce this so I would really need help to understand this better.

villesau avatar Sep 20 '23 08:09 villesau

I am facing the same issue. It looks like it fails on private repos which should not be the case since it uses GITHUB_TOKEN for auth.

secrethash avatar Sep 22 '23 13:09 secrethash

Could it be some sort of permission issue? I'm successfully using this on private repos my self.

villesau avatar Sep 22 '23 21:09 villesau

I'm successfully using this on private repos my self.

@villesau Are you using GITHUB_TOKEN that is automatically generated by GitHub during every action or a manually generated access token?

It seems like it fails at the diff. The diff url gives a 404 page not found error.

Could it be some sort of permission issue?

I am not sure, even on one of my repos that I have full access to, I can't run it. It uses other actions like Coverage Monitor that also writes to the PR and it runs without any issues.

secrethash avatar Sep 23 '23 02:09 secrethash

I seem to get it to work using @octokit/action instead of @octokit/rest and also have to switch to node20.

Should I submit a PR?

secrethash avatar Sep 23 '23 04:09 secrethash

I am also facing the same issue on my private repo.

I am using GITHUB_TOKEN generated by Git Hub. And it is failing while fetching the diff.

image

atinder avatar Oct 19 '23 03:10 atinder

I see Page not found error as above

geryit avatar Oct 24 '23 10:10 geryit