diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /app/helpers/todos_helper.rb | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r-- | app/helpers/todos_helper.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 9865f7dfbef..7b0e0df8998 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -16,6 +16,7 @@ module TodosHelper def todo_action_name(todo) case todo.action when Todo::ASSIGNED then todo.self_added? ? 'assigned' : 'assigned you' + when Todo::REVIEW_REQUESTED then 'requested a review of' when Todo::MENTIONED then "mentioned #{todo_action_subject(todo)} on" when Todo::BUILD_FAILED then 'The build failed for' when Todo::MARKED then 'added a todo for' @@ -26,6 +27,13 @@ module TodosHelper end end + def todo_self_addressing(todo) + case todo.action + when Todo::ASSIGNED then 'to yourself' + when Todo::REVIEW_REQUESTED then 'from yourself' + end + end + def todo_target_link(todo) text = raw(todo_target_type_name(todo) + ' ') + if todo.for_commit? @@ -141,6 +149,7 @@ module TodosHelper [ { id: '', text: 'Any Action' }, { id: Todo::ASSIGNED, text: 'Assigned' }, + { id: Todo::REVIEW_REQUESTED, text: 'Review requested' }, { id: Todo::MENTIONED, text: 'Mentioned' }, { id: Todo::MARKED, text: 'Added' }, { id: Todo::BUILD_FAILED, text: 'Pipelines' }, |