diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-05-20 00:18:22 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-05-20 00:18:22 +0300 |
commit | 3f6f2bbe14a7b6da59f87918c84617b8a3e4d1f1 (patch) | |
tree | a90fad419c99aa718466832b891b4727d2a20952 /app/finders | |
parent | 18ef054bc7eb14a7b817af5f66f140f2f3dd4ae6 (diff) | |
parent | 6b834f2cbcfc26fe3123b6682ed7e20618e31d1b (diff) |
Merge branch 'create-todo-on-failing-build' into 'master'
Create a todo on failing MR build
Implements #14067. I worked on this with @DouweM (any mistakes are mine).
When a build fails for a commit, create a todo for the author of the merge request that commit is the HEAD of. If the commit isn't the HEAD commit of any MR, don't do anything. If there already is a todo for that user and MR, don't do anything.
Current limitations:
- This isn't configurable by project.
- The author of a merge request might not be the person who pushed the breaking commit.
- I haven't tested this with a working CI setup, just with the unit tests below and by modifying my DB directly.
See merge request !3177
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/todos_finder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/todos_finder.rb b/app/finders/todos_finder.rb index 3ba27c40504..4bd46a76087 100644 --- a/app/finders/todos_finder.rb +++ b/app/finders/todos_finder.rb @@ -36,7 +36,7 @@ class TodosFinder private def action_id? - action_id.present? && [Todo::ASSIGNED, Todo::MENTIONED].include?(action_id.to_i) + action_id.present? && [Todo::ASSIGNED, Todo::MENTIONED, Todo::BUILD_FAILED].include?(action_id.to_i) end def action_id |