summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-02-19 11:58:02 +0100
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-15 20:21:11 +0100
commite831a3b869cbb82e9a4294a5f9309ba56df46589 (patch)
tree39174eff88d5774ca92f09e79a3ac8cf028fd71e
parentad97bebfed2e65951c7dc39ee80b32089a032804 (diff)
downloadgitlab-ce-e831a3b869cbb82e9a4294a5f9309ba56df46589.tar.gz
Link in the note when started a new branch from an issue
-rw-r--r--app/services/system_note_service.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb
index 751815c5b18..b65ac47bce3 100644
--- a/app/services/system_note_service.rb
+++ b/app/services/system_note_service.rb
@@ -212,7 +212,10 @@ class SystemNoteService
#
# "Started branch `201-issue-branch-button`"
def self.new_issue_branch(issue, project, author, branch)
- body = "Started branch `#{branch}`"
+ h = Gitlab::Application.routes.url_helpers
+ link = "#{Gitlab.config.gitlab.url}#{h.namespace_project_compare_path(project.namespace, project, from: project.default_branch, to: branch)}"
+
+ body = "Started branch [#{branch}](#{link})"
create_note(noteable: issue, project: project, author: author, note: body)
end