Commit b817e1d0 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Add memoization of commit related values in Ci::Pipeline

parent 7f544886
...@@ -269,28 +269,40 @@ module Ci ...@@ -269,28 +269,40 @@ module Ci
end end
def git_author_name def git_author_name
strong_memoize(:git_author_name) do
commit.try(:author_name) commit.try(:author_name)
end end
end
def git_author_email def git_author_email
strong_memoize(:git_author_email) do
commit.try(:author_email) commit.try(:author_email)
end end
end
def git_commit_message def git_commit_message
strong_memoize(:git_commit_message) do
commit.try(:message) commit.try(:message)
end end
end
def git_commit_title def git_commit_title
strong_memoize(:git_commit_title) do
commit.try(:title) commit.try(:title)
end end
end
def git_commit_full_title def git_commit_full_title
strong_memoize(:git_commit_full_title) do
commit.try(:full_title) commit.try(:full_title)
end end
end
def git_commit_description def git_commit_description
strong_memoize(:git_commit_description) do
commit.try(:description) commit.try(:description)
end end
end
def short_sha def short_sha
Ci::Pipeline.truncate_sha(sha) Ci::Pipeline.truncate_sha(sha)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment