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
Boxiang Sun
gitlab-ce
Commits
f726df26
Commit
f726df26
authored
Oct 16, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorder system note verb to say "Restored source branch X" instead of "Source branch X restored"
parent
888c1a3f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/services/system_note_service.rb
app/services/system_note_service.rb
+2
-2
spec/services/merge_requests/refresh_service_spec.rb
spec/services/merge_requests/refresh_service_spec.rb
+1
-1
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+1
-1
No files found.
app/services/system_note_service.rb
View file @
f726df26
...
@@ -179,7 +179,7 @@ class SystemNoteService
...
@@ -179,7 +179,7 @@ class SystemNoteService
#
#
# Example Note text:
# Example Note text:
#
#
# "
Target branch `feature` deleted
"
# "
Restored target branch `feature`
"
#
#
# Returns the created Note object
# Returns the created Note object
def
self
.
change_branch_presence
(
noteable
,
project
,
author
,
branch_type
,
branch
,
presence
)
def
self
.
change_branch_presence
(
noteable
,
project
,
author
,
branch_type
,
branch
,
presence
)
...
@@ -189,7 +189,7 @@ class SystemNoteService
...
@@ -189,7 +189,7 @@ class SystemNoteService
else
else
'deleted'
'deleted'
end
end
body
=
"
#{
branch_type
.
to_s
}
branch `
#{
branch
}
`
#{
verb
}
"
.
capitalize
body
=
"
#{
verb
}
#{
branch_type
.
to_s
}
branch `
#{
branch
}
`
"
.
capitalize
create_note
(
noteable:
noteable
,
project:
project
,
author:
author
,
note:
body
)
create_note
(
noteable:
noteable
,
project:
project
,
author:
author
,
note:
body
)
end
end
...
...
spec/services/merge_requests/refresh_service_spec.rb
View file @
f726df26
...
@@ -121,7 +121,7 @@ describe MergeRequests::RefreshService do
...
@@ -121,7 +121,7 @@ describe MergeRequests::RefreshService do
expect
(
@merge_request
).
to
be_open
expect
(
@merge_request
).
to
be_open
notes
=
@fork_merge_request
.
notes
.
reorder
(
:created_at
).
map
(
&
:note
)
notes
=
@fork_merge_request
.
notes
.
reorder
(
:created_at
).
map
(
&
:note
)
expect
(
notes
[
0
]).
to
include
(
'
Source branch `master` restored
'
)
expect
(
notes
[
0
]).
to
include
(
'
Restored source branch `master`
'
)
expect
(
notes
[
1
]).
to
include
(
'Added 4 commits'
)
expect
(
notes
[
1
]).
to
include
(
'Added 4 commits'
)
expect
(
@fork_merge_request
).
to
be_open
expect
(
@fork_merge_request
).
to
be_open
end
end
...
...
spec/services/system_note_service_spec.rb
View file @
f726df26
...
@@ -249,7 +249,7 @@ describe SystemNoteService do
...
@@ -249,7 +249,7 @@ describe SystemNoteService do
context
'when source branch deleted'
do
context
'when source branch deleted'
do
it
'sets the note text'
do
it
'sets the note text'
do
expect
(
subject
.
note
).
to
eq
"
Source branch `feature` deleted
"
expect
(
subject
.
note
).
to
eq
"
Deleted source branch `feature`
"
end
end
end
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