Commit 34a1aa8e authored by Adrian DC's avatar Adrian DC
Browse files

ci(gitlab-ci): detect and refuse '^wip|^WIP' commits

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent acd1dc2c
Loading
Loading
Loading
Loading
+9 −0
Changes for .gitlab-ci.yml: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -215,6 +215,15 @@ commits:
      set -x
      pre-commit install --install-hooks
      SKIP="${skip}" pre-commit run --all-files --show-diff-on-failure
    # Validate WIP commits
    - |
      set +x
      if git log --pretty='%s' "${base_sha}..${head_sha}" | grep -i '^WIP'; then
        echo ' '
        echo " [ERROR] Detected WIP commits in range '${base_sha}..${head_sha}'"
        echo ' '
        false
      fi
  rules:
    - when: always