CI_COMMIT_MESSAGE regex examples in `rules` should not use prefix matching due to trailing new line
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=348254) </details> <!--IssueSummary end--> Documentation can be improved by using more general examples, which do not fail to work. See pages regarding `workflow:rules`: - https://docs.gitlab.com/ee/ci/yaml/index.html#workflowrules - https://docs.gitlab.com/ee/ci/yaml/workflow.html#workflow-rules-examples Here the default example for using `CI_COMMIT_MESSAGE` to much a suffix _-draft_ is: ```yaml if: $CI_COMMIT_MESSAGE =~ /-draft$/ ``` Due to the way how `git commit -m my-draft` works, it will add a trailing new line to the commit message, which is not obvious. Therefore, for a beginner to `rules` the above example will always fail to work. It would be more save to provide an example with a prefix notation, which will not fail to work in any environment: ```yaml if: $CI_COMMIT_MESSAGE =~ /^draft/ ```
issue