diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-02 15:11:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-02 15:11:04 +0300 |
commit | ed509186782d16d2bbcb34ac73303e8cb3a9d5a2 (patch) | |
tree | 4ab3bbb33b37e9e4c0f73627617ea6b0c7d0d7f7 /app/services/todo_service.rb | |
parent | 44837830832a41a6fe6360aca18e50826c723fd1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/todo_service.rb')
-rw-r--r-- | app/services/todo_service.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/services/todo_service.rb b/app/services/todo_service.rb index 6ae394072c6..06352d36215 100644 --- a/app/services/todo_service.rb +++ b/app/services/todo_service.rb @@ -329,11 +329,12 @@ class TodoService commit_id: nil } - if target.is_a?(Commit) + case target + when Commit attributes.merge!(target_id: nil, commit_id: target.id) - elsif target.is_a?(Issue) + when Issue attributes[:issue_type] = target.issue_type - elsif target.is_a?(Discussion) + when Discussion attributes.merge!(target_type: nil, target_id: nil, discussion: target) end |