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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
70d15ae1
Commit
70d15ae1
authored
Apr 25, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rubocop offenses
parent
44954c50
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lib/github/import.rb
lib/github/import.rb
+6
-2
No files found.
lib/github/import.rb
View file @
70d15ae1
...
@@ -160,8 +160,7 @@ module Github
...
@@ -160,8 +160,7 @@ module Github
next
unless
merge_request
.
new_record?
&&
pull_request
.
valid?
next
unless
merge_request
.
new_record?
&&
pull_request
.
valid?
begin
begin
restore_source_branch
(
pull_request
)
unless
pull_request
.
source_branch_exists?
restore_branches
(
pull_request
)
restore_target_branch
(
pull_request
)
unless
pull_request
.
target_branch_exists?
author_id
=
user_id
(
pull_request
.
author
,
project
.
creator_id
)
author_id
=
user_id
(
pull_request
.
author
,
project
.
creator_id
)
merge_request
.
iid
=
pull_request
.
iid
merge_request
.
iid
=
pull_request
.
iid
...
@@ -310,6 +309,11 @@ module Github
...
@@ -310,6 +309,11 @@ module Github
end
end
end
end
def
restore_branches
(
pull_request
)
restore_source_branch
(
pull_request
)
unless
pull_request
.
source_branch_exists?
restore_target_branch
(
pull_request
)
unless
pull_request
.
target_branch_exists?
end
def
restore_source_branch
(
pull_request
)
def
restore_source_branch
(
pull_request
)
repository
.
create_branch
(
pull_request
.
source_branch_name
,
pull_request
.
source_branch_sha
)
repository
.
create_branch
(
pull_request
.
source_branch_name
,
pull_request
.
source_branch_sha
)
end
end
...
...
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