summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authormicael.bergeron <micaelbergeron@gmail.com>2017-11-22 09:48:09 -0500
committermicael.bergeron <micaelbergeron@gmail.com>2017-12-07 09:01:37 -0500
commitcb6f51ec9b2006f1040cca94119135c92e9a4cd1 (patch)
tree6331c54f8eab568e134c51ec85a0232372471a16 /app/services
parent716f9cbb415cd425644b1aeae19844b26cc7d6b7 (diff)
downloadgitlab-ce-cb6f51ec9b2006f1040cca94119135c92e9a4cd1.tar.gz
add support for the commit reference filter
Diffstat (limited to 'app/services')
-rw-r--r--app/services/system_note_service.rb14
1 files changed, 3 insertions, 11 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb
index 5f8a1bf07e2..30a5aab13bf 100644
--- a/app/services/system_note_service.rb
+++ b/app/services/system_note_service.rb
@@ -23,7 +23,7 @@ module SystemNoteService
body = "added #{commits_text}\n\n"
body << existing_commit_summary(noteable, existing_commits, oldrev)
- body << new_commit_summary(noteable, new_commits).join("\n")
+ body << new_commit_summary(new_commits).join("\n")
body << "\n\n[Compare with previous version](#{diff_comparison_url(noteable, project, oldrev)})"
create_note(NoteSummary.new(noteable, project, author, body, action: 'commit', commit_count: total_count))
@@ -486,9 +486,9 @@ module SystemNoteService
# new_commits - Array of new Commit objects
#
# Returns an Array of Strings
- def new_commit_summary(merge_request, new_commits)
+ def new_commit_summary(new_commits)
new_commits.collect do |commit|
- "* [#{commit.short_id}](#{merge_request_commit_url(merge_request, commit)}) - #{escape_html(commit.title)}"
+ "* #{commit.short_id} - #{escape_html(commit.title)}"
end
end
@@ -668,12 +668,4 @@ module SystemNoteService
start_sha: oldrev
)
end
-
- def merge_request_commit_url(merge_request, commit)
- url_helpers.diffs_project_merge_request_url(
- merge_request.target_project,
- merge_request,
- commit_id: commit
- )
- end
end