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
4ac06d34
Commit
4ac06d34
authored
Jan 02, 2019
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert " Trigger iid logic from GitHub importer for merge requests."
This reverts commit
fb98496f
.
parent
820739eb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
14 deletions
+0
-14
lib/gitlab/import/merge_request_helpers.rb
lib/gitlab/import/merge_request_helpers.rb
+0
-4
spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb
...tlab/github_import/importer/pull_request_importer_spec.rb
+0
-10
No files found.
lib/gitlab/import/merge_request_helpers.rb
View file @
4ac06d34
...
@@ -24,10 +24,6 @@ module Gitlab
...
@@ -24,10 +24,6 @@ module Gitlab
merge_request
=
project
.
merge_requests
.
reload
.
find
(
merge_request_id
)
merge_request
=
project
.
merge_requests
.
reload
.
find
(
merge_request_id
)
# We use .insert_and_return_id which effectively disables all callbacks.
# Trigger iid logic here to make sure we track internal id values consistently.
merge_request
.
ensure_target_project_iid!
[
merge_request
,
false
]
[
merge_request
,
false
]
end
end
rescue
ActiveRecord
::
InvalidForeignKey
rescue
ActiveRecord
::
InvalidForeignKey
...
...
spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb
View file @
4ac06d34
...
@@ -111,16 +111,6 @@ describe Gitlab::GithubImport::Importer::PullRequestImporter, :clean_gitlab_redi
...
@@ -111,16 +111,6 @@ describe Gitlab::GithubImport::Importer::PullRequestImporter, :clean_gitlab_redi
expect
(
mr
).
to
be_instance_of
(
MergeRequest
)
expect
(
mr
).
to
be_instance_of
(
MergeRequest
)
expect
(
exists
).
to
eq
(
false
)
expect
(
exists
).
to
eq
(
false
)
end
end
it
'triggers internal_id functionality to track greatest iids'
do
mr
=
build_stubbed
(
:merge_request
,
source_project:
project
,
target_project:
project
)
allow
(
importer
).
to
receive
(
:insert_and_return_id
).
and_return
(
mr
.
id
)
allow
(
project
.
merge_requests
).
to
receive
(
:find
).
with
(
mr
.
id
).
and_return
(
mr
)
expect
(
mr
).
to
receive
(
:ensure_target_project_iid!
)
importer
.
create_merge_request
end
end
end
context
'when the author could not be found'
do
context
'when the author could not be found'
do
...
...
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