Skip to content
Snippets Groups Projects
Commit e831a3b8 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg
Browse files

Link in the note when started a new branch from an issue

parent ad97bebf
No related branches found
No related tags found
No related merge requests found
Loading
@@ -212,7 +212,10 @@ class SystemNoteService
Loading
@@ -212,7 +212,10 @@ class SystemNoteService
# #
# "Started branch `201-issue-branch-button`" # "Started branch `201-issue-branch-button`"
def self.new_issue_branch(issue, project, author, branch) 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) create_note(noteable: issue, project: project, author: author, note: body)
end end
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment