BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
system_note_service.rb
app/services/system_note_service.rb
+2
-2
refresh_service_spec.rb
spec/services/merge_requests/refresh_service_spec.rb
+1
-1
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