Commit 09318207 authored by Ben Couturier's avatar Ben Couturier
Browse files

Merge branch 'focus-pre-commit' into 'master'

Run pre-commit only on changed files (all for master)

See merge request !9
parents d466b23d 878be085
Pipeline #2393178 passed with stages
in 1 minute and 9 seconds
......@@ -28,7 +28,12 @@ pre-commit:
- curl -o lb-check-copyright "https://gitlab.cern.ch/lhcb-core/LbDevTools/raw/master/LbDevTools/SourceTools.py?inline=false"
- chmod +x lb-check-copyright
script:
- pre-commit run --all-files
- if [ $CI_COMMIT_BRANCH == "master" ] ; then
- pre-commit run --all-files
- else
- git fetch origin master
- pre-commit run --from-ref FETCH_HEAD --to-ref HEAD
- fi
variables:
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
cache:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment