diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-01-20 19:36:35 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-01-20 19:36:35 -0200 |
commit | f4bdbecfd54c39baed79d0143de97933d26e3215 (patch) | |
tree | a2d9559a39c65fd0f5fd8be30ae1337c751cc7e4 /lib | |
parent | 714f95b2ff68c02eeee9151c9b456bb2afe7eaff (diff) | |
download | gitlab-ce-f4bdbecfd54c39baed79d0143de97933d26e3215.tar.gz |
Fix cross projects detection when importing GitHub pull requests
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/github_import/pull_request_formatter.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/github_import/pull_request_formatter.rb b/lib/gitlab/github_import/pull_request_formatter.rb index b7c47958cc7..f96fed0f5cf 100644 --- a/lib/gitlab/github_import/pull_request_formatter.rb +++ b/lib/gitlab/github_import/pull_request_formatter.rb @@ -18,7 +18,7 @@ module Gitlab end def cross_project? - source_repo.fork == true + source_repo.id != target_repo.id end def number @@ -73,6 +73,10 @@ module Gitlab project end + def target_repo + raw_data.base.repo + end + def target_branch target_project.repository.find_branch(raw_data.base.ref) end |