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
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
5 deletions
+1
-5
app/models/ci/stage.rb
app/models/ci/stage.rb
+1
-1
app/models/concerns/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