From d2f4295270852f1ec4b9736f1db493421729474d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 28 Oct 2021 12:10:22 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/models/todo.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/models/todo.rb') diff --git a/app/models/todo.rb b/app/models/todo.rb index 94a99603848..d0a6d1d9e23 100644 --- a/app/models/todo.rb +++ b/app/models/todo.rb @@ -18,6 +18,7 @@ class Todo < ApplicationRecord DIRECTLY_ADDRESSED = 7 MERGE_TRAIN_REMOVED = 8 # This is an EE-only feature REVIEW_REQUESTED = 9 + ATTENTION_REQUIRED = 10 ACTION_NAMES = { ASSIGNED => :assigned, @@ -28,7 +29,8 @@ class Todo < ApplicationRecord APPROVAL_REQUIRED => :approval_required, UNMERGEABLE => :unmergeable, DIRECTLY_ADDRESSED => :directly_addressed, - MERGE_TRAIN_REMOVED => :merge_train_removed + MERGE_TRAIN_REMOVED => :merge_train_removed, + ATTENTION_REQUIRED => :attention_required }.freeze belongs_to :author, class_name: "User" @@ -189,6 +191,10 @@ class Todo < ApplicationRecord action == REVIEW_REQUESTED end + def attention_required? + action == ATTENTION_REQUIRED + end + def merge_train_removed? action == MERGE_TRAIN_REMOVED end -- cgit v1.2.3