action-sqlfluff icon indicating copy to clipboard operation
action-sqlfluff copied to clipboard

fatal: --unshallow on a complete repository does not make sense

Open oynek opened this issue 2 years ago • 4 comments

When using this GitHub Action, I encounter the following error message:

🐶 Get changed files
  fatal: --unshallow on a complete repository does not make sense

I suspect the error here, but do not understand why this occurs.

Maybe this condition could help solving this:

if $(git rev-parse --is-shallow-repository); then
    ... repository is shallow ...
fi

Source: StackOverflow


My workflow file:

    steps:
      - name: Checkout repo
        uses: actions/checkout@v3

      - name: Lint added and modified .sql files
        uses: yu-iskw/action-sqlfluff@v3
        id: lint-sql
        with:
          github_token: ${{ secrets.github_token }}
          reporter: github-pr-review
          sqlfluff_version: "1.4.5"
          sqlfluff_command: "lint"
          config: "${{ github.workspace }}/.sqlfluff"
          paths: "${{ github.workspace }}/models"
          extra_requirements_txt: "${{ github.workspace }}/.github/config/requirements.txt"

oynek avatar Mar 08 '23 09:03 oynek

I am assuming that's because your repository is large. I am thinking what happens, if we use git fetch --prune --depth 10000 --no-tags instead of git fetch --prune --unshallow --no-tags.

yu-iskw avatar Mar 09 '23 14:03 yu-iskw

@yu-iskw is there a solution to this? i'm facing the same error?

MarkEnverus avatar Oct 19 '23 16:10 MarkEnverus

@yu-iskw, can you merge the fix you offered ? It solves the problem 👍

aballiet avatar Dec 04 '23 07:12 aballiet

up @yu-iskw ? I need to maintain a fork of your repo to have it 🙏

aballiet avatar May 13 '24 08:05 aballiet