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
41e9a784
Commit
41e9a784
authored
Jan 08, 2020
by
Sean Carroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied reviewer suggestion
parent
8fca2bea
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
app/models/release.rb
app/models/release.rb
+1
-1
ee/app/services/ee/audit_events/release_associate_milestone_audit_event_service.rb
...events/release_associate_milestone_audit_event_service.rb
+1
-1
ee/app/services/ee/audit_events/release_created_audit_event_service.rb
...es/ee/audit_events/release_created_audit_event_service.rb
+1
-1
spec/models/release_spec.rb
spec/models/release_spec.rb
+2
-2
No files found.
app/models/release.rb
View file @
41e9a784
...
...
@@ -81,7 +81,7 @@ class Release < ApplicationRecord
evidence
&
.
summary
||
{}
end
def
milestone_
list
def
milestone_
titles
self
.
milestones
.
map
{
|
m
|
m
.
title
}.
sort
.
join
(
", "
)
end
...
...
ee/app/services/ee/audit_events/release_associate_milestone_audit_event_service.rb
View file @
41e9a784
...
...
@@ -4,7 +4,7 @@ module EE
module
AuditEvents
class
ReleaseAssociateMilestoneAuditEventService
<
ReleaseAuditEventService
def
message
milestones
=
@release
.
milestone_
list
milestones
=
@release
.
milestone_
titles
milestones
=
"[none]"
if
milestones
.
blank?
"Milestones associated with release changed to
#{
milestones
}
"
...
...
ee/app/services/ee/audit_events/release_created_audit_event_service.rb
View file @
41e9a784
...
...
@@ -8,7 +8,7 @@ module EE
milestone_count
=
release
.
milestones
.
count
if
milestone_count
>
0
"
#{
simple_message
}
with
#{
'Milestone'
.
pluralize
(
milestone_count
)
}
#{
release
.
milestone_
list
}
"
"
#{
simple_message
}
with
#{
'Milestone'
.
pluralize
(
milestone_count
)
}
#{
release
.
milestone_
titles
}
"
else
simple_message
end
...
...
spec/models/release_spec.rb
View file @
41e9a784
...
...
@@ -182,9 +182,9 @@ RSpec.describe Release do
end
end
describe
'#milestone_
list
'
do
describe
'#milestone_
titles
'
do
let
(
:release
)
{
create
(
:release
,
:with_milestones
)
}
it
{
expect
(
release
.
milestone_
list
).
to
eq
(
release
.
milestones
.
map
{
|
m
|
m
.
title
}.
sort
.
join
(
", "
))}
it
{
expect
(
release
.
milestone_
titles
).
to
eq
(
release
.
milestones
.
map
{
|
m
|
m
.
title
}.
sort
.
join
(
", "
))}
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