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 /spec/factories/todos.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 'spec/factories/todos.rb')
-rw-r--r--spec/factories/todos.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/factories/todos.rb b/spec/factories/todos.rb
index e3681ae93a5..f426e27afed 100644
--- a/spec/factories/todos.rb
+++ b/spec/factories/todos.rb
@@ -18,5 +18,9 @@ FactoryGirl.define do
commit_id RepoHelpers.sample_commit.id
target_type "Commit"
end
+
+ trait :build_failed do
+ action { Todo::BUILD_FAILED }
+ end
end
end