diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-26 03:14:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-26 03:14:54 +0300 |
commit | a40d39ddd2dce862f95d35c42a07c0fce4df8f0a (patch) | |
tree | 4c7f8b0898c57f1e0973b22729e01f8508388562 /app/models/note.rb | |
parent | ffe8b982e9d93ed23817a4bd9696ef1ef59de9f9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 1d661367599..4f2e7ebe2c5 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -50,7 +50,7 @@ class Note < ApplicationRecord attr_accessor :user_visible_reference_count # Attribute used to store the attributes that have been changed by quick actions. - attr_accessor :commands_changes + attr_writer :commands_changes # Attribute used to determine whether keep_around_commits will be skipped for diff notes. attr_accessor :skip_keep_around_commits @@ -615,6 +615,41 @@ class Note < ApplicationRecord change_position.line_range["end"] || change_position.line_range["start"] end + def commands_changes + @commands_changes&.slice( + :due_date, + :label_ids, + :remove_label_ids, + :add_label_ids, + :canonical_issue_id, + :clone_with_notes, + :confidential, + :create_merge_request, + :add_contacts, + :remove_contacts, + :assignee_ids, + :milestone_id, + :time_estimate, + :spend_time, + :discussion_locked, + :merge, + :rebase, + :wip_event, + :target_branch, + :reviewer_ids, + :health_status, + :promote_to_epic, + :weight, + :emoji_award, + :todo_event, + :subscription_event, + :state_event, + :title, + :tag_message, + :tag_name + ) + end + private def system_note_viewable_by?(user) |