Link in the note when started a new branch from an issue
This commit is contained in:
parent
ad97bebfed
commit
e831a3b869
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue