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
f4e01b59
Commit
f4e01b59
authored
Jul 26, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move enum specific code from a concern to CI stage
parent
c14bd53d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
5 deletions
+1
-5
stage.rb
app/models/ci/stage.rb
+1
-1
has_status.rb
app/models/concerns/has_status.rb
+0
-4
No files found.
app/models/ci/stage.rb
View file @
f4e01b59
...
...
@@ -5,7 +5,7 @@ module Ci
include
HasStatus
include
Gitlab
::
OptimisticLocking
enum
erate_status!
enum
status:
HasStatus
::
STATUSES_ENUM
belongs_to
:project
belongs_to
:pipeline
...
...
app/models/concerns/has_status.rb
View file @
f4e01b59
...
...
@@ -12,10 +12,6 @@ module HasStatus
failed:
4
,
canceled:
5
,
skipped:
6
,
manual:
7
}.
freeze
class_methods
do
def
enumerate_status!
enum
status:
HasStatus
::
STATUSES_ENUM
end
def
status_sql
scope_relevant
=
respond_to?
(
:exclude_ignored
)
?
exclude_ignored
:
all
scope_warnings
=
respond_to?
(
:failed_but_allowed
)
?
failed_but_allowed
:
none
...
...
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