Check mr title for invalid characters

This commit is contained in:
andrewc
2023-10-27 09:23:38 +10:00
parent d2427f2926
commit 1a2043dcea

View File

@@ -102,9 +102,11 @@ image:
git_tag: git_tag:
- | - |
if [[ $GITLAB_CI == 'true' && $CI_COMMIT_BRANCH == "main" ]]; then if [[ $GITLAB_CI == 'true' && $CI_COMMIT_BRANCH == "main" ]]; then
echo "running git tag" echo "running git tag"
git tag $CI_COMMIT_MESSAGE git tag $CI_COMMIT_MESSAGE
elif [[ $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" && "$CI_MERGE_REQUEST_TITLE" =~ [^a-zA-Z0-9.-_] ]]; then
exit 1
fi fi
merge_libs: merge_libs: