diff options
Diffstat (limited to 'app/services/issuable_base_service.rb')
-rw-r--r-- | app/services/issuable_base_service.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb index 8960235b093..f1ef5ca84fe 100644 --- a/app/services/issuable_base_service.rb +++ b/app/services/issuable_base_service.rb @@ -15,4 +15,23 @@ class IssuableBaseService < BaseService SystemNoteService.change_label( issuable, issuable.project, current_user, added_labels, removed_labels) end + + def create_title_change_note(issuable, old_title) + SystemNoteService.change_title( + issuable, issuable.project, current_user, old_title) + end + + def create_branch_change_note(issuable, branch_type, old_branch, new_branch) + SystemNoteService.change_branch( + issuable, issuable.project, current_user, branch_type, + old_branch, new_branch) + end + + def filter_params + unless can?(current_user, :admin_issue, project) + params.delete(:milestone_id) + params.delete(:label_ids) + params.delete(:assignee_id) + end + end end |