I see that I can use pre-commit with pipelines, is there a way to set up the yaml file for azure pipeline to use git commit --no-verify
when if fails for specific cases? or is there a way to troubleshoot the pipeline when the issue occurs?
this is what I have for the yaml file
pool:
vmImage: ubuntu-18.04
variables:
PRE_COMMIT_HOME: $(Pipeline.Workspace)/pre-commit-cache
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: ${{ parameters.python }}
- script: |
echo "##vso[task.setvariable variable=PY]$(python -VV)"
displayName: set version variables
- task: CacheBeta@0
inputs:
key: pre-commit | .pre-commit-config.yaml | "$(PY)"
path: $(PRE_COMMIT_HOME)
- script: python -m pip install --upgrade pre-commit
displayName: install pre-commit
- script: pre-commit run --all-files --show-diff-on-failure
displayName: run pre-commit