Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
e9959c1be7da
Commit
f726df26
authored
Oct 16, 2015
by
Stan Hu
Browse files
Reorder system note verb to say "Restored source branch X" instead of "Source branch X restored"
parent
e2e792b40aa5
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/services/system_note_service.rb
View file @
e9959c1b
...
...
@@ -179,7 +179,7 @@ def self.change_branch(noteable, project, author, branch_type, old_branch, new_b
#
# Example Note text:
#
# "
T
arget branch `feature`
deleted
"
# "
Restored t
arget branch `feature`"
#
# Returns the created Note object
def
self
.
change_branch_presence
(
noteable
,
project
,
author
,
branch_type
,
branch
,
presence
)
...
...
@@ -189,7 +189,7 @@ def self.change_branch_presence(noteable, project, author, branch_type, branch,
else
'deleted'
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
)
end
...
...
spec/services/merge_requests/refresh_service_spec.rb
View file @
e9959c1b
...
...
@@ -121,7 +121,7 @@
expect
(
@merge_request
).
to
be_open
notes
=
@fork_merge_request
.
notes
.
reorder
(
:created_at
).
map
(
&
:note
)
expect
(
notes
[
0
]).
to
include
(
'
S
ource branch `master`
restored
'
)
expect
(
notes
[
0
]).
to
include
(
'
Restored s
ource branch `master`'
)
expect
(
notes
[
1
]).
to
include
(
'Added 4 commits'
)
expect
(
@fork_merge_request
).
to
be_open
end
...
...
spec/services/system_note_service_spec.rb
View file @
e9959c1b
...
...
@@ -249,7 +249,7 @@
context
'when source branch deleted'
do
it
'sets the note text'
do
expect
(
subject
.
note
).
to
eq
"
S
ource branch `feature`
deleted
"
expect
(
subject
.
note
).
to
eq
"
Deleted s
ource branch `feature`"
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