diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-02-04 09:49:54 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-02-04 09:49:54 +0000 |
commit | a1fa973123796ce27559063a644f093539107a7f (patch) | |
tree | 7b73753a3f1642880cd05c3b35d1b7a31028825e /app | |
parent | 8d948744461619ac3561be93d545d72343efa0cd (diff) | |
parent | f0c2f7481febf1e1149cb3dba87780c462759d14 (diff) | |
download | gitlab-ce-a1fa973123796ce27559063a644f093539107a7f.tar.gz |
Merge branch 'wipMergeSpacing' into 'master'
No space required after WIP identifier
Fixes #2426
Currently, the WIP: (or any other variation) prefix of a merge request title must include a trailing space for it to be recognized as a work in progress and prevent merging.
To resolve this, I added an or pattern to the regexp to look for any one of the three possible delimiters ':', ']', or ' '. This way the trailing space isn't required but it still won't mark any titles beginning with wip as work in progress (e.g. "Wipwap").
See merge request !1876
Diffstat (limited to 'app')
-rw-r--r-- | app/models/merge_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 89b6c49b362..2594a7e3578 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -258,7 +258,7 @@ class MergeRequest < ActiveRecord::Base end def work_in_progress? - !!(title =~ /\A\[?WIP\]?:? /i) + !!(title =~ /\A\[?WIP(\]|:| )/i) end def mergeable? |