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
e324a417
Commit
e324a417
authored
Mar 19, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
dd2c1977
6e74eb4e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
changelogs/unreleased/sh-create-branch-as-project-owner-for-github-import.yml
...d/sh-create-branch-as-project-owner-for-github-import.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
+5
-0
No files found.
changelogs/unreleased/sh-create-branch-as-project-owner-for-github-import.yml
0 → 100644
View file @
e324a417
---
title
:
'
GitHub
import:
Create
new
branches
as
project
owner'
merge_request
:
26335
author
:
type
:
fixed
lib/gitlab/github_import/importer/pull_request_importer.rb
View file @
e324a417
...
...
@@ -89,7 +89,7 @@ module Gitlab
return
if
project
.
repository
.
branch_exists?
(
source_branch
)
project
.
repository
.
add_branch
(
merge_request
.
autho
r
,
source_branch
,
pull_request
.
source_branch_sha
)
project
.
repository
.
add_branch
(
project
.
owne
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 @
e324a417
...
...
@@ -273,6 +273,11 @@ describe Gitlab::GithubImport::Importer::PullRequestImporter, :clean_gitlab_redi
mr
.
state
=
'opened'
mr
.
save
# Ensure the project owner 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
.
owner
,
anything
,
anything
).
and_call_original
importer
.
insert_git_data
(
mr
,
exists
)
expect
(
project
.
repository
.
branch_exists?
(
mr
.
source_branch
)).
to
be_truthy
...
...
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