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
c4e46c57
Commit
c4e46c57
authored
Dec 07, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix success status
parent
953a1094
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+2
-1
app/models/concerns/has_status.rb
app/models/concerns/has_status.rb
+1
-1
No files found.
app/models/ci/pipeline.rb
View file @
c4e46c57
...
@@ -105,7 +105,8 @@ module Ci
...
@@ -105,7 +105,8 @@ module Ci
end
end
def
stages_name
def
stages_name
statuses
.
order
(
:stage_idx
).
distinct
.
pluck
(
:stage
)
statuses
.
order
(
:stage_idx
).
distinct
.
pluck
(
:stage
,
:stage_idx
).
map
(
&
:first
)
end
end
def
stages
def
stages
...
...
app/models/concerns/has_status.rb
View file @
c4e46c57
...
@@ -26,7 +26,7 @@ module HasStatus
...
@@ -26,7 +26,7 @@ module HasStatus
WHEN (
#{
builds
}
)=(
#{
skipped
}
) THEN 'skipped'
WHEN (
#{
builds
}
)=(
#{
skipped
}
) THEN 'skipped'
WHEN (
#{
builds
}
)=(
#{
success
}
) THEN 'success'
WHEN (
#{
builds
}
)=(
#{
success
}
) THEN 'success'
WHEN (
#{
builds
}
)=(
#{
created
}
) THEN 'created'
WHEN (
#{
builds
}
)=(
#{
created
}
) THEN 'created'
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
skipped
}
) THEN 's
kipped
'
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
skipped
}
) THEN 's
uccess
'
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
skipped
}
)+(
#{
canceled
}
) THEN 'canceled'
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
skipped
}
)+(
#{
canceled
}
) THEN 'canceled'
WHEN (
#{
builds
}
)=(
#{
created
}
)+(
#{
skipped
}
)+(
#{
pending
}
) THEN 'pending'
WHEN (
#{
builds
}
)=(
#{
created
}
)+(
#{
skipped
}
)+(
#{
pending
}
) THEN 'pending'
WHEN (
#{
running
}
)+(
#{
pending
}
)+(
#{
created
}
)>0 THEN 'running'
WHEN (
#{
running
}
)+(
#{
pending
}
)+(
#{
created
}
)>0 THEN 'running'
...
...
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