reviewdog / action-tflint

Run tflint with reviewdog on pull requests to enforce best practices
MIT License
107 stars 22 forks source link

reviewdog: failed to run 'git rev-parse --show-prefix': exit status 128 #22

Closed denzhel closed 2 years ago

denzhel commented 4 years ago

Hi there,

I have the same issue in this link: https://github.com/reviewdog/action-tflint/issues/21

This is the setup I use

    steps:
    - uses: actions/checkout@v2
    - name: tflint
      uses: reviewdog/action-tflint@master
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        reporter: github-pr-review # Optional. Change reporter
        filter_mode: "nofilter" # Optional. Check all files, not just the diff
        flags: "--module" # Optional. Add custom tflint flags

and I still get:

reviewdog: failed to run 'git rev-parse --show-prefix': exit status 128

Please help :)

Vlaaaaaaad commented 4 years ago

Hey!

With the mess that was last week, I totally missed this. My apologies.

Hm... you are cloning the repo, but git still complains. 128 is a generic error code from what I could find.

Let's take this step-by-step:

  1. What event is triggering the workflow? Is the repo actually cloned?
  2. Could you run a ls -la and git status between the checkout and tflint step to ensure the files are there?
Vlaaaaaaad commented 4 years ago

@denzhel ping 🙂

denzhel commented 4 years ago

@Vlaaaaaaad Hi !!

Let me update you about the steps you've requested.

I will report back but I think I know what the problem is.

I tried using your action in a workflow that is triggered by a issue comment which checks out to master instead of the branch and used older version of git that did not allow to run git commands.

Ever since, I've installed the latest git version + performed git checkout to my branch instead of master.

Please don't close this yet, until I update you with my findings..

Vlaaaaaaad commented 4 years ago

Yup, that could be it. GitHub Actions are very... particular about what code they pull and how.

Sure, I'll keep the issue open. There's no rush.

Vlaaaaaaad commented 3 years ago

@denzhel any updates on this? Did you manage to get it working?

Vlaaaaaaad commented 3 years ago

Closing due to timeout. Feel free to re-open if it's still relevant!

YashNagayach95 commented 2 years ago

@denzhel any updates on this? Did you manage to get it working?

was this solved? As I am facing this now!

grische commented 2 years ago

This seems to be a generic reviewdog issue and there already is an open issue here: https://github.com/reviewdog/reviewdog/issues/1158

Better continue discussing there.