Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2016-03-08 21:22:50 +0300
committerSean McGivern <sean@gitlab.com>2016-05-17 12:17:45 +0300
commit6b834f2cbcfc26fe3123b6682ed7e20618e31d1b (patch)
tree0b812d498079fdcaaf0d004a5bce716560b99be0 /app/models/ci/build.rb
parent78a67fc48dab434b43a080e5b15491963656661a (diff)
Create a todo on failing MR build
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.
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r--app/models/ci/build.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 92327bdb08d..50190101f2b 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -53,6 +53,7 @@ module Ci
new_build.stage_idx = build.stage_idx
new_build.trigger_request = build.trigger_request
new_build.save
+ MergeRequests::AddTodoWhenBuildFailsService.new(build.project, nil).close(new_build)
new_build
end
end