2014-08-25 05:25:02 -04:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: merge_requests
|
|
|
|
#
|
2016-01-05 21:30:59 -05:00
|
|
|
# id :integer not null, primary key
|
|
|
|
# target_branch :string(255) not null
|
|
|
|
# source_branch :string(255) not null
|
|
|
|
# source_project_id :integer not null
|
|
|
|
# author_id :integer
|
|
|
|
# assignee_id :integer
|
|
|
|
# title :string(255)
|
|
|
|
# created_at :datetime
|
|
|
|
# updated_at :datetime
|
|
|
|
# milestone_id :integer
|
|
|
|
# state :string(255)
|
|
|
|
# merge_status :string(255)
|
|
|
|
# target_project_id :integer not null
|
|
|
|
# iid :integer
|
|
|
|
# description :text
|
|
|
|
# position :integer default(0)
|
|
|
|
# locked_at :datetime
|
|
|
|
# updated_by_id :integer
|
|
|
|
# merge_error :string(255)
|
|
|
|
# merge_params :text
|
|
|
|
# merge_when_build_succeeds :boolean default(FALSE), not null
|
|
|
|
# merge_user_id :integer
|
2016-01-29 12:04:48 -05:00
|
|
|
# merge_commit_sha :string
|
2014-08-25 05:25:02 -04:00
|
|
|
#
|
|
|
|
|
2014-07-31 11:07:24 -04:00
|
|
|
FactoryGirl.define do
|
|
|
|
factory :merge_request do
|
|
|
|
title
|
|
|
|
author
|
|
|
|
source_project factory: :project
|
|
|
|
target_project { source_project }
|
|
|
|
|
2015-06-22 14:43:51 -04:00
|
|
|
# $ git log --pretty=oneline feature..master
|
2014-07-31 11:07:24 -04:00
|
|
|
# 5937ac0a7beb003549fc5fd26fc247adbce4a52e Add submodule from gitlab.com
|
|
|
|
# 570e7b2abdd848b95f2f578043fc23bd6f6fd24d Change some files
|
|
|
|
# 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 More submodules
|
|
|
|
# d14d6c0abdd253381df51a723d58691b2ee1ab08 Remove ds_store files
|
|
|
|
# c1acaa58bbcbc3eafe538cb8274ba387047b69f8 Ignore DS files
|
2014-08-06 02:52:56 -04:00
|
|
|
#
|
|
|
|
# See also RepoHelpers.sample_compare
|
|
|
|
#
|
2014-07-31 11:07:24 -04:00
|
|
|
source_branch "master"
|
|
|
|
target_branch "feature"
|
|
|
|
|
2015-03-05 13:38:23 -05:00
|
|
|
merge_status "can_be_merged"
|
2014-07-31 11:07:24 -04:00
|
|
|
|
|
|
|
trait :with_diffs do
|
|
|
|
end
|
|
|
|
|
2016-03-09 02:19:54 -05:00
|
|
|
trait :without_diffs do
|
|
|
|
source_branch "improve/awesome"
|
|
|
|
target_branch "master"
|
|
|
|
end
|
|
|
|
|
2014-08-06 02:52:56 -04:00
|
|
|
trait :conflict do
|
|
|
|
source_branch "feature_conflict"
|
|
|
|
target_branch "feature"
|
|
|
|
end
|
|
|
|
|
2016-03-01 06:32:20 -05:00
|
|
|
trait :merged do
|
|
|
|
state :merged
|
|
|
|
end
|
|
|
|
|
2014-07-31 11:07:24 -04:00
|
|
|
trait :closed do
|
|
|
|
state :closed
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :reopened do
|
|
|
|
state :reopened
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :simple do
|
|
|
|
source_branch "feature"
|
|
|
|
target_branch "master"
|
|
|
|
end
|
|
|
|
|
2016-02-04 13:23:58 -05:00
|
|
|
trait :rebased do
|
|
|
|
source_branch "markdown"
|
|
|
|
target_branch "improve/awesome"
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :diverged do
|
|
|
|
source_branch "feature"
|
|
|
|
target_branch "master"
|
|
|
|
end
|
|
|
|
|
2015-12-03 04:27:34 -05:00
|
|
|
trait :merge_when_build_succeeds do
|
|
|
|
merge_when_build_succeeds true
|
|
|
|
merge_user author
|
|
|
|
end
|
|
|
|
|
2016-03-01 06:32:20 -05:00
|
|
|
factory :merged_merge_request, traits: [:merged]
|
2014-07-31 11:07:24 -04:00
|
|
|
factory :closed_merge_request, traits: [:closed]
|
|
|
|
factory :reopened_merge_request, traits: [:reopened]
|
|
|
|
factory :merge_request_with_diffs, traits: [:with_diffs]
|
|
|
|
end
|
|
|
|
end
|