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
ee6a8dad
Commit
ee6a8dad
authored
Jan 09, 2020
by
Sean Carroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply maintainer suggestion
parent
41e9a784
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
app/services/releases/update_service.rb
app/services/releases/update_service.rb
+4
-4
No files found.
app/services/releases/update_service.rb
View file @
ee6a8dad
...
...
@@ -12,12 +12,12 @@ module Releases
return
error
(
"Milestone(s) not found:
#{
inexistent_milestones
.
join
(
', '
)
}
"
,
400
)
if
inexistent_milestones
.
any?
if
param_for_milestone_titles_provided?
@
previous_milestones
=
release
.
milestones
.
map
(
&
:title
)
previous_milestones
=
release
.
milestones
.
map
(
&
:title
)
params
[
:milestones
]
=
milestones
end
if
release
.
update
(
params
)
success
(
tag:
existing_tag
,
release:
release
,
milestones_updated:
milestones_updated?
)
success
(
tag:
existing_tag
,
release:
release
,
milestones_updated:
milestones_updated?
(
previous_milestones
)
)
else
error
(
release
.
errors
.
messages
||
'400 Bad request'
,
400
)
end
...
...
@@ -33,10 +33,10 @@ module Releases
params
.
except
(
:tag
).
empty?
end
def
milestones_updated?
def
milestones_updated?
(
previous_milestones
)
return
false
unless
param_for_milestone_titles_provided?
@
previous_milestones
.
to_set
!=
release
.
milestones
.
map
(
&
:title
)
previous_milestones
.
to_set
!=
release
.
milestones
.
map
(
&
:title
)
end
end
end
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