summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorDJ Mountney <david@twkie.net>2017-09-06 16:09:20 -0700
committerDJ Mountney <david@twkie.net>2017-09-06 16:09:20 -0700
commitb373c56c7b2898fc0cac16a26a41c7019ab7ca3e (patch)
tree749c8661edb7cae36cae8f4eec548206b8a5ac5d /app/models/commit.rb
parentac38f36abe017dfe80a30c2e646a14c4c69c08b0 (diff)
parent21935d85382989e38dd4cc12de55966e0c9b6eba (diff)
downloadgitlab-ce-b373c56c7b2898fc0cac16a26a41c7019ab7ca3e.tar.gz
Merge remote-tracking branch 'origin/master' into dev-master
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index ba3845df867..2ae8890c1b3 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -16,6 +16,8 @@ class Commit
participant :notes_with_associations
attr_accessor :project, :author
+ attr_accessor :redacted_description_html
+ attr_accessor :redacted_title_html
DIFF_SAFE_LINES = Gitlab::Git::DiffCollection::DEFAULT_LIMITS[:max_lines]
@@ -26,6 +28,13 @@ class Commit
# The SHA can be between 7 and 40 hex characters.
COMMIT_SHA_PATTERN = '\h{7,40}'.freeze
+ def banzai_render_context(field)
+ context = { pipeline: :single_line, project: self.project }
+ context[:author] = self.author if self.author
+
+ context
+ end
+
class << self
def decorate(commits, project)
commits.map do |commit|