diff options
author | Rémy Coutable <remy@rymai.me> | 2016-04-14 13:41:30 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-04-14 13:41:30 +0000 |
commit | 64776ab2b4ef40519e75eb73ae946d2c1f774aa6 (patch) | |
tree | 8f6e32894fd46baf52ec131bb6246269263630bd /app/models | |
parent | e1acd361af01b429cdbb4aaed4431b01d9ab95ab (diff) | |
parent | 0385cd5a585572be4d3b72797c14cad23efc48f5 (diff) | |
download | gitlab-ce-64776ab2b4ef40519e75eb73ae946d2c1f774aa6.tar.gz |
Merge branch 'start-with-iid-on-new-branch' into 'master'
Start with iid on branch creation
After the discussion it in #3886 it was decided the iid should be in the beginning of the branch name.
See merge request !3708
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/issue.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index e064b0f8b95..3f188e04770 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -106,7 +106,7 @@ class Issue < ActiveRecord::Base def related_branches project.repository.branch_names.select do |branch| - branch.end_with?("-#{iid}") + branch =~ /\A#{iid}-(?!\d+-stable)/i end end @@ -151,7 +151,7 @@ class Issue < ActiveRecord::Base end def to_branch_name - "#{title.parameterize}-#{iid}" + "#{iid}-#{title.parameterize}" end def can_be_worked_on?(current_user) |