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
1c807d01
Commit
1c807d01
authored
Nov 05, 2018
by
Markus Doits
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amend method description a little bit
parent
65e2731f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
app/models/ci/build.rb
app/models/ci/build.rb
+5
-6
No files found.
app/models/ci/build.rb
View file @
1c807d01
...
...
@@ -893,12 +893,11 @@ module Ci
options
&
.
dig
(
:environment
,
:url
)
||
persisted_environment
&
.
external_url
end
# The format of the retry option changed in GitLab 11.5. Before it was an
# integer only, after it is a hash. New builds always created have the
# correct format, but builds created before GitLab 11.5 and saved in
# database still have the old integer only format. This helper method makes
# sure that the format is always correct when accessing the retry options,
# even on old builds.
# The format of the retry option changed in GitLab 11.5: Before it was
# integer only, after it is a hash. New builds are created with the new
# format, but builds created before GitLab 11.5 and saved in database still
# have the old integer only format. This method returns the retry option
# normalized as a hash in 11.5+ format.
def
normalized_retry
value
=
options
&
.
dig
(
:retry
)
value
.
is_a?
(
Integer
)
?
{
max:
value
}
:
value
.
to_h
...
...
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