diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-17 12:09:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-17 12:09:36 +0300 |
commit | 839e879bcf197a283da8481ddcb15b177172784d (patch) | |
tree | bf2b1e0b27c98340d194469a4b3a5e02d4a2acb8 /app/services/system_note_service.rb | |
parent | 3c97422b098235bca250f738922dab9c861f0ee7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/system_note_service.rb')
-rw-r--r-- | app/services/system_note_service.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb index 58f72e9badc..7d654ca7f5b 100644 --- a/app/services/system_note_service.rb +++ b/app/services/system_note_service.rb @@ -168,16 +168,19 @@ module SystemNoteService # project - Project owning noteable # author - User performing the change # branch_type - 'source' or 'target' + # event_type - the source of event: 'update' or 'delete' # old_branch - old branch name # new_branch - new branch name # - # Example Note text: + # Example Note text is based on event_type: # - # "changed target branch from `Old` to `New`" + # update: "changed target branch from `Old` to `New`" + # delete: "changed automatically target branch to `New` because `Old` was deleted" # # Returns the created Note object - def change_branch(noteable, project, author, branch_type, old_branch, new_branch) - ::SystemNotes::MergeRequestsService.new(noteable: noteable, project: project, author: author).change_branch(branch_type, old_branch, new_branch) + def change_branch(noteable, project, author, branch_type, event_type, old_branch, new_branch) + ::SystemNotes::MergeRequestsService.new(noteable: noteable, project: project, author: author) + .change_branch(branch_type, event_type, old_branch, new_branch) end # Called when a branch in Noteable is added or deleted |