diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-09-04 17:17:21 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-09-04 17:50:57 +0300 |
commit | a62ee89a83b0012613cf998884014875f97c6a27 (patch) | |
tree | ec9d50a475b91b2f4b72875207609cf881259acf /danger | |
parent | 2b3de6c320eebe5f3750037b58fea33551f997eb (diff) |
danger: Allow scoped merge request titles
In the Git ecosystem, commit titles are commonly scoped to a given
subsystem to make immediately clear which parts of the system are being
changed (see e.g. this very commit's title). Using the same pattern for
merge requests is thus a natural urge for many used to this, but our
Danger rules will complain about such commit titles as their first
character is not an uppercase on.e
Let's improve the rule to allow optional (lower-cased) scopes.
Diffstat (limited to 'danger')
-rw-r--r-- | danger/merge_request/Dangerfile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/danger/merge_request/Dangerfile b/danger/merge_request/Dangerfile index f35f88f6d..879d0f644 100644 --- a/danger/merge_request/Dangerfile +++ b/danger/merge_request/Dangerfile @@ -1,4 +1,4 @@ -unless gitlab.mr_title[0] == gitlab.mr_title[0].upcase +unless /^([[:alpha:]][[:lower:]]+: )?[[:upper:]]/ =~ gitlab.mr_title warn("Please capitalize the merge request title") end |