Skip to content

Improve Emoji detection in commit messages

Yorick Peterse requested to merge relax-danger-emoji-matching into master

What does this MR do?

This changes our Danger integration so that it is smarter about detecting GitLab emoji in commit messages. This is done using a two step process:

  1. We use the old regular expression to determine if a commit message might include an emoji.

  2. If this regular expression matches, we then check for all existing emoji names in the commit message. This might be a wee bit expensive, but because we couple it with the previous step it should be rarely executed.

This ensures we don't trigger an error when a commit message includes text such as :foo:bar:, which is not a valid Emoji.

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/release/framework/issues/15

Does this MR meet the acceptance criteria?

Merge request reports