Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c6bf4736
Commit
c6bf4736
authored
Mar 25, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
0756e002
75e1682c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
changelogs/unreleased/sh-fix-github-import-creator.yml
changelogs/unreleased/sh-fix-github-import-creator.yml
+5
-0
lib/gitlab/github_import/importer/pull_request_importer.rb
lib/gitlab/github_import/importer/pull_request_importer.rb
+1
-1
spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb
...tlab/github_import/importer/pull_request_importer_spec.rb
+3
-3
No files found.
changelogs/unreleased/sh-fix-github-import-creator.yml
0 → 100644
View file @
c6bf4736
---
title
:
'
GitHub
importer:
Use
the
project
creator
to
create
branches
from
forks'
merge_request
:
26510
author
:
type
:
fixed
lib/gitlab/github_import/importer/pull_request_importer.rb
View file @
c6bf4736
...
...
@@ -89,7 +89,7 @@ module Gitlab
return
if
project
.
repository
.
branch_exists?
(
source_branch
)
project
.
repository
.
add_branch
(
project
.
owne
r
,
source_branch
,
pull_request
.
source_branch_sha
)
project
.
repository
.
add_branch
(
project
.
creato
r
,
source_branch
,
pull_request
.
source_branch_sha
)
rescue
Gitlab
::
Git
::
CommandError
=>
e
Gitlab
::
Sentry
.
track_acceptable_exception
(
e
,
extra:
{
...
...
spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb
View file @
c6bf4736
...
...
@@ -273,10 +273,10 @@ describe Gitlab::GithubImport::Importer::PullRequestImporter, :clean_gitlab_redi
mr
.
state
=
'opened'
mr
.
save
# Ensure the project
owne
r is creating the branches because the
# Ensure the project
creato
r is creating the branches because the
# merge request author may not have access to push to this
# repository.
allow
(
project
.
repository
).
to
receive
(
:add_branch
).
with
(
project
.
owne
r
,
anything
,
anything
).
and_call_original
# repository.
The project owner may also be a group.
allow
(
project
.
repository
).
to
receive
(
:add_branch
).
with
(
project
.
creato
r
,
anything
,
anything
).
and_call_original
importer
.
insert_git_data
(
mr
,
exists
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment