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
3bb409d2
Commit
3bb409d2
authored
Sep 12, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the cases clear instead of having guards
parent
45afdbef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app/services/ci/process_pipeline_service.rb
app/services/ci/process_pipeline_service.rb
+3
-3
No files found.
app/services/ci/process_pipeline_service.rb
View file @
3bb409d2
...
@@ -31,13 +31,13 @@ module Ci
...
@@ -31,13 +31,13 @@ module Ci
current_status
=
status_for_prior_stages
(
index
)
current_status
=
status_for_prior_stages
(
index
)
created_builds_in_stage
(
index
).
select
do
|
build
|
created_builds_in_stage
(
index
).
select
do
|
build
|
if
HasStatus
::
COMPLETED_STATUSES
.
include?
(
current_status
)
process_build
(
build
,
current_status
)
process_build
(
build
,
current_status
)
end
end
end
end
end
def
process_build
(
build
,
current_status
)
def
process_build
(
build
,
current_status
)
return
false
unless
HasStatus
::
COMPLETED_STATUSES
.
include?
(
current_status
)
if
valid_statuses_for_when
(
build
.
when
).
include?
(
current_status
)
if
valid_statuses_for_when
(
build
.
when
).
include?
(
current_status
)
build
.
enqueue
build
.
enqueue
true
true
...
...
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