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
7102be70
Commit
7102be70
authored
Apr 14, 2021
by
Fabio Pitino
Committed by
Marcel Amirault
Apr 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Recommend to fill gaps in enum values
parent
92cfa61d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
doc/development/creating_enums.md
doc/development/creating_enums.md
+38
-0
No files found.
doc/development/creating_enums.md
View file @
7102be70
...
...
@@ -114,3 +114,41 @@ class Pipeline < ApplicationRecord
}
end
```
## Add new values in the gap
After merging some EE and FOSS enums, there might be a gap between the two groups of values:
```
ruby
module
Enums
module
Ci
module
CommitStatus
def
self
.
failure_reasons
{
# ...
data_integrity_failure:
12
,
forward_deployment_failure:
13
,
insufficient_bridge_permissions:
1_001
,
downstream_bridge_project_not_found:
1_002
,
# ...
}
end
end
end
end
```
To add new values, you should fill the gap first.
In the example above add
`14`
instead of
`1_003`
:
```
ruby
{
# ...
data_integrity_failure:
12
,
forward_deployment_failure:
13
,
a_new_value:
14
,
insufficient_bridge_permissions:
1_001
,
downstream_bridge_project_not_found:
1_002
,
# ...
}
```
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