action-sqlfluff
action-sqlfluff copied to clipboard
fatal: --unshallow on a complete repository does not make sense
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"
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 is there a solution to this? i'm facing the same error?
@yu-iskw, can you merge the fix you offered ? It solves the problem 👍
up @yu-iskw ? I need to maintain a fork of your repo to have it 🙏