BigW Consortium Gitlab

Commit f726df26 by Stan Hu

Reorder system note verb to say "Restored source branch X" instead of "Source branch X restored"

parent 888c1a3f
......@@ -179,7 +179,7 @@ class SystemNoteService
#
# Example Note text:
#
# "Target branch `feature` deleted"
# "Restored target branch `feature`"
#
# Returns the created Note object
def self.change_branch_presence(noteable, project, author, branch_type, branch, presence)
......@@ -189,7 +189,7 @@ class SystemNoteService
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
......
......@@ -121,7 +121,7 @@ describe MergeRequests::RefreshService do
expect(@merge_request).to be_open
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(@fork_merge_request).to be_open
end
......
......@@ -249,7 +249,7 @@ describe SystemNoteService do
context 'when source branch deleted' 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment