diff options
author | Robert Speicher <robert@gitlab.com> | 2016-01-20 22:11:20 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-01-20 22:11:20 +0000 |
commit | 3e7092a83ab0fc6cb259627c8ecc0e259f77ca7c (patch) | |
tree | 4459b9f7ff3f8035517a673d7aaa40fb5e717bda /lib | |
parent | 348129d021555225f17561ddc7f175a3a55923d2 (diff) | |
parent | f4bdbecfd54c39baed79d0143de97933d26e3215 (diff) | |
download | gitlab-ce-3e7092a83ab0fc6cb259627c8ecc0e259f77ca7c.tar.gz |
Merge branch 'fix-github-pull-requests-import' into 'master'
Fix cross projects detection when importing GitHub pull requests
Fixes #12456
See merge request !2523
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 |