Skip to content
代码片段 群组 项目
提交 1e736fb5 编辑于 作者: Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
浏览文件

Allow users to import cross-repository pull requests from GitHub

上级 51cf14b3
无相关合并请求
......@@ -18,9 +18,6 @@ At its current state, GitHub importer can import:
With GitLab 8.7+, references to pull requests and issues are preserved.
It is not yet possible to import your cross-repository pull requests (those from
forks). We are working on improving this in the near future.
The importer page is visible when you [create a new project][new-project].
Click on the **GitHub** link and, if you are logged in via the GitHub
integration, you will be redirected to GitHub for permission to access your
......
......@@ -33,7 +33,7 @@ def number
end
def valid?
source_branch.valid? && target_branch.valid? && !cross_project?
source_branch.valid? && target_branch.valid?
end
def source_branch
......@@ -68,10 +68,6 @@ def body
raw_data.body || ""
end
def cross_project?
source_branch_repo.id != target_branch_repo.id
end
def description
formatter.author_line(author) + body
end
......
......@@ -178,8 +178,8 @@
let(:source_repo) { double(id: 2) }
let(:raw_data) { double(base_data) }
it 'returns false' do
expect(pull_request.valid?).to eq false
it 'returns true' do
expect(pull_request.valid?).to eq true
end
end
......@@ -187,8 +187,8 @@
let(:target_repo) { double(id: 2) }
let(:raw_data) { double(base_data) }
it 'returns false' do
expect(pull_request.valid?).to eq false
it 'returns true' do
expect(pull_request.valid?).to eq true
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册