chore(ci): skip lint-commit job on draft MRs

What does this MR do and why?

Skips the lint-commit job when a merge request is in draft status, preventing a guaranteed pipeline failure on draft MRs.

A new when: never rule is added before the existing rule, matching on $CI_MERGE_REQUEST_TITLE =~ /^Draft:/. GitLab evaluates rules top-to-bottom and stops at the first match, so draft MRs will skip the job entirely.

This mirrors the change made in the gitlab-lsp repo in gitlab-org/editor-extensions/gitlab-lsp!3357 (merged).

How has this been tested

  1. Check the first pipeline (Draft: off) - the commit-lint job should be present.
  2. Check the second pipeline (Draft: on) - the commit-lint job is not present.

Issue: gitlab-org/editor-extensions/gitlab-lsp#2394 (closed)

Edited by Tristan Read

Merge request reports

Loading
Loading