summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-04-14 13:41:30 +0000
committerRémy Coutable <remy@rymai.me>2016-04-14 13:41:30 +0000
commit64776ab2b4ef40519e75eb73ae946d2c1f774aa6 (patch)
tree8f6e32894fd46baf52ec131bb6246269263630bd /app/services
parente1acd361af01b429cdbb4aaed4431b01d9ab95ab (diff)
parent0385cd5a585572be4d3b72797c14cad23efc48f5 (diff)
downloadgitlab-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/services')
-rw-r--r--app/services/merge_requests/build_service.rb2
-rw-r--r--app/services/system_note_service.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/merge_requests/build_service.rb b/app/services/merge_requests/build_service.rb
index 6e9152e444e..fa34753c4fd 100644
--- a/app/services/merge_requests/build_service.rb
+++ b/app/services/merge_requests/build_service.rb
@@ -51,7 +51,7 @@ module MergeRequests
# be interpreted as the use wants to close that issue on this project
# Pattern example: 112-fix-mep-mep
# Will lead to appending `Closes #112` to the description
- if match = merge_request.source_branch.match(/-(\d+)\z/)
+ if match = merge_request.source_branch.match(/\A(\d+)-/)
iid = match[1]
closes_issue = "Closes ##{iid}"
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb
index 658b086496f..82a0e2fd1f5 100644
--- a/app/services/system_note_service.rb
+++ b/app/services/system_note_service.rb
@@ -222,7 +222,7 @@ class SystemNoteService
# Called when a branch is created from the 'new branch' button on a issue
# Example note text:
#
- # "Started branch `issue-branch-button-201`"
+ # "Started branch `201-issue-branch-button`"
def self.new_issue_branch(issue, project, author, branch)
h = Gitlab::Routing.url_helpers
link = h.namespace_project_compare_url(project.namespace, project, from: project.default_branch, to: branch)