fix: write hint about fetch-depth (#5241)

Point users at the fetch-depth option when not running locally.
This commit is contained in:
Marco Ferrari 2024-02-09 18:45:00 +01:00 committed by GitHub
parent 1f2fbb14cd
commit 787b63ddb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,9 @@
function IssueHintForFullGitHistory() { function IssueHintForFullGitHistory() {
info "Check that the local repository has the full history and that the repository is not shallow." info "Check that the local repository has the full history and that the repository is not shallow."
if [[ "${RUN_LOCAL}" == "false" ]]; then
info "Check that you set the 'fetch-depth: 0' option for the actions/checkout step in your GitHub Actions workflow."
fi
info "See https://github.com/super-linter/super-linter#get-started" info "See https://github.com/super-linter/super-linter#get-started"
info "Is shallow repository: $(git -C "${GITHUB_WORKSPACE}" rev-parse --is-shallow-repository)" info "Is shallow repository: $(git -C "${GITHUB_WORKSPACE}" rev-parse --is-shallow-repository)"
} }