Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
b817e1d0
Commit
b817e1d0
authored
May 07, 2018
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add memoization of commit related values in Ci::Pipeline
parent
7f544886
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+18
-6
No files found.
app/models/ci/pipeline.rb
View file @
b817e1d0
...
...
@@ -269,28 +269,40 @@ module Ci
end
def
git_author_name
strong_memoize
(
:git_author_name
)
do
commit
.
try
(
:author_name
)
end
end
def
git_author_email
strong_memoize
(
:git_author_email
)
do
commit
.
try
(
:author_email
)
end
end
def
git_commit_message
strong_memoize
(
:git_commit_message
)
do
commit
.
try
(
:message
)
end
end
def
git_commit_title
strong_memoize
(
:git_commit_title
)
do
commit
.
try
(
:title
)
end
end
def
git_commit_full_title
strong_memoize
(
:git_commit_full_title
)
do
commit
.
try
(
:full_title
)
end
end
def
git_commit_description
strong_memoize
(
:git_commit_description
)
do
commit
.
try
(
:description
)
end
end
def
short_sha
Ci
::
Pipeline
.
truncate_sha
(
sha
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment