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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
558e6026
Commit
558e6026
authored
Nov 25, 2019
by
Igor Drozdov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Ci::Pipeline#latest_for_shas cause it's not used
parent
00b7f217
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
16 deletions
+0
-16
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+0
-5
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+0
-11
No files found.
app/models/ci/pipeline.rb
View file @
558e6026
...
...
@@ -299,11 +299,6 @@ module Ci
end
end
def
self
.
latest_for_shas
(
shas
)
max_id_per_sha
=
for_sha
(
shas
).
group
(
:sha
).
select
(
"max(id)"
)
where
(
id:
max_id_per_sha
)
end
def
self
.
latest_successful_ids_per_project
success
.
group
(
:project_id
).
select
(
'max(id) as id'
)
end
...
...
spec/models/ci/pipeline_spec.rb
View file @
558e6026
...
...
@@ -1768,17 +1768,6 @@ describe Ci::Pipeline, :mailer do
end
end
describe
'.latest_for_shas'
do
let
(
:sha
)
{
'abc'
}
it
'returns latest pipeline for sha'
do
create
(
:ci_pipeline
,
sha:
sha
)
pipeline2
=
create
(
:ci_pipeline
,
sha:
sha
)
expect
(
described_class
.
latest_for_shas
(
sha
)).
to
contain_exactly
(
pipeline2
)
end
end
describe
'.latest_successful_ids_per_project'
do
let
(
:projects
)
{
create_list
(
:project
,
2
)
}
let!
(
:pipeline1
)
{
create
(
:ci_pipeline
,
:success
,
project:
projects
[
0
])
}
...
...
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