Skip to content
Snippets Groups Projects

Add support to configure webhook_timeout in gitlab.yaml

Closed gitlab-qa-bot requested to merge github/fork/wesgurn/master into master
1 file
+ 1
0
Compare changes
  • Side-by-side
  • Inline
@@ -18,6 +18,7 @@
@@ -18,6 +18,7 @@
# merge_status :string(255)
# merge_status :string(255)
# target_project_id :integer not null
# target_project_id :integer not null
# iid :integer
# iid :integer
 
# description :text
#
#
require Rails.root.join("app/models/commit")
require Rails.root.join("app/models/commit")
@@ -30,8 +31,7 @@ class MergeRequest < ActiveRecord::Base
@@ -30,8 +31,7 @@ class MergeRequest < ActiveRecord::Base
belongs_to :target_project, foreign_key: :target_project_id, class_name: "Project"
belongs_to :target_project, foreign_key: :target_project_id, class_name: "Project"
belongs_to :source_project, foreign_key: :source_project_id, class_name: "Project"
belongs_to :source_project, foreign_key: :source_project_id, class_name: "Project"
attr_accessible :title, :assignee_id, :source_project_id, :source_branch, :target_project_id, :target_branch, :milestone_id, :author_id_of_changes, :state_event
attr_accessible :title, :assignee_id, :source_project_id, :source_branch, :target_project_id, :target_branch, :milestone_id, :author_id_of_changes, :state_event, :description
attr_mentionable :title
attr_accessor :should_remove_source_branch
attr_accessor :should_remove_source_branch
@@ -222,7 +222,11 @@ class MergeRequest < ActiveRecord::Base
@@ -222,7 +222,11 @@ class MergeRequest < ActiveRecord::Base
def mr_and_commit_notes
def mr_and_commit_notes
commit_ids = commits.map(&:id)
commit_ids = commits.map(&:id)
Note.where("(noteable_type = 'MergeRequest' AND noteable_id = :mr_id) OR (noteable_type = 'Commit' AND commit_id IN (:commit_ids))", mr_id: id, commit_ids: commit_ids)
project.notes.where(
 
"(noteable_type = 'MergeRequest' AND noteable_id = :mr_id) OR (noteable_type = 'Commit' AND commit_id IN (:commit_ids))",
 
mr_id: id,
 
commit_ids: commit_ids
 
)
end
end
# Returns the raw diff for this merge request
# Returns the raw diff for this merge request
Loading