BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
13d009ce
Commit
13d009ce
authored
Dec 23, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer oneline and Rubocop prefers ternary operator
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8286/diffs#note_20433402
parent
b63f2794
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
pipeline.rb
app/models/ci/pipeline.rb
+2
-7
No files found.
app/models/ci/pipeline.rb
View file @
13d009ce
...
...
@@ -93,13 +93,8 @@ module Ci
.
select
(
"max(
#{
quoted_table_name
}
.id)"
)
.
group
(
:ref
,
:sha
)
query
=
if
ref
where
(
id:
max_id
,
ref:
ref
)
else
where
(
id:
max_id
)
end
query
.
order
(
id: :desc
)
relation
=
ref
?
where
(
ref:
ref
)
:
self
relation
.
where
(
id:
max_id
).
order
(
id: :desc
)
end
def
self
.
latest_status
(
ref
=
nil
)
...
...
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