Merge branch 'feature/ci_check_commits' into 'master'
CI: check if commit history need revise Usually we need to cleanup the commit history before MR merged. Sometime we forget to squash before merge. We can add certain pattern at the beginning of commit message, and add a job in deploy stage to check the patterns. When we want to push code for review or resolve review comments, we can add this pattern to commit message as a reminder. This will not block CI tests, checking job will always be put in the last CI stage. See merge request !629
This commit is contained in:
commit
1eff11f947
1 changed files with 15 additions and 1 deletions
|
@ -143,7 +143,6 @@ build_docs:
|
|||
- docs/_build/html
|
||||
expire_in: 1 mos
|
||||
|
||||
|
||||
test_nvs_on_host:
|
||||
stage: test
|
||||
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
||||
|
@ -294,6 +293,21 @@ check_doc_links:
|
|||
- docs/_build/linkcheck
|
||||
expire_in: 1 mos
|
||||
|
||||
check_commit_msg:
|
||||
stage: deploy
|
||||
image: $CI_DOCKER_REGISTRY/esp32-ci-env
|
||||
tags:
|
||||
- build
|
||||
except:
|
||||
- master
|
||||
- /^release\/v/
|
||||
- /^v\d+\.\d+(\.\d+)?($|-)/
|
||||
before_script:
|
||||
- echo "skip update submodule"
|
||||
script:
|
||||
- git checkout ${CI_BUILD_REF_NAME}
|
||||
# commit start with "WIP: " need to be squashed before merge
|
||||
- 'git log --pretty=%s master..${CI_BUILD_REF_NAME} | grep "^WIP: " || exit 0 && exit 1'
|
||||
|
||||
# AUTO GENERATED PART START, DO NOT MODIFY CONTENT BELOW
|
||||
# template for test jobs
|
||||
|
|
Loading…
Reference in a new issue