Skip to content
Snippets Groups Projects
Commit da6fbbd3 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Make CI check to produce a patch file

parent 50d6b091
No related branches found
No related tags found
No related merge requests found
Pipeline #2035454 passed
......@@ -15,4 +15,17 @@ run-checks:
- pip install pre-commit
- pre-commit --version
- git fetch origin master
- pre-commit run --from-ref FETCH_HEAD --to-ref HEAD
- if ! pre-commit run --from-ref FETCH_HEAD --to-ref HEAD ; then
- git config user.name "Gitlab CI"
- git config user.email noreply@cern.ch
- git add -u
- git commit --message "Automatic fixes" --message "see $CI_JOB_URL" &&
git format-patch -1 --stdout > hooks_changes.patch &&
echo -e "Apply fixes with:\n\n curl $CI_JOB_URL/artifacts/raw/hooks_changes.patch | git am"
- exit 1
- fi
artifacts:
expose_as: "CI check patch"
paths:
- hooks_changes.patch
when: on_failure
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment