mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-16 16:16:43 +10:00
Fix validation method for Gitlab::GithubImport::PullRequestFormatter
This commit is contained in:
@@ -15,6 +15,10 @@ module Gitlab
|
||||
repo.present?
|
||||
end
|
||||
|
||||
def valid?
|
||||
repo.present?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def short_id
|
||||
|
||||
@@ -29,7 +29,7 @@ module Gitlab
|
||||
end
|
||||
|
||||
def valid?
|
||||
!cross_project?
|
||||
source_branch.valid? && target_branch.valid? && !cross_project?
|
||||
end
|
||||
|
||||
def source_branch
|
||||
@@ -65,8 +65,7 @@ module Gitlab
|
||||
end
|
||||
|
||||
def cross_project?
|
||||
source_branch_repo.present? && target_branch_repo.present? &&
|
||||
source_branch_repo.id != target_branch_repo.id
|
||||
source_branch_repo.id != target_branch_repo.id
|
||||
end
|
||||
|
||||
def description
|
||||
|
||||
Reference in New Issue
Block a user