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
820739eb
Commit
820739eb
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 issues."
This reverts commit
b78a69b0
.
parent
852e68fd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
27 deletions
+1
-27
lib/gitlab/github_import/importer/issue_importer.rb
lib/gitlab/github_import/importer/issue_importer.rb
+1
-5
spec/lib/gitlab/github_import/importer/issue_importer_spec.rb
.../lib/gitlab/github_import/importer/issue_importer_spec.rb
+0
-22
No files found.
lib/gitlab/github_import/importer/issue_importer.rb
View file @
820739eb
...
...
@@ -57,11 +57,7 @@ module Gitlab
updated_at:
issue
.
updated_at
}
insert_and_return_id
(
attributes
,
project
.
issues
).
tap
do
|
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.
project
.
issues
.
find
(
id
).
ensure_project_iid!
end
insert_and_return_id
(
attributes
,
project
.
issues
)
rescue
ActiveRecord
::
InvalidForeignKey
# It's possible the project has been deleted since scheduling this
# job. In this case we'll just skip creating the issue.
...
...
spec/lib/gitlab/github_import/importer/issue_importer_spec.rb
View file @
820739eb
...
...
@@ -78,11 +78,6 @@ describe Gitlab::GithubImport::Importer::IssueImporter, :clean_gitlab_redis_cach
.
to
receive
(
:id_for
)
.
with
(
issue
)
.
and_return
(
milestone
.
id
)
allow
(
importer
.
user_finder
)
.
to
receive
(
:author_id_for
)
.
with
(
issue
)
.
and_return
([
user
.
id
,
true
])
end
context
'when the issue author could be found'
do
...
...
@@ -177,23 +172,6 @@ describe Gitlab::GithubImport::Importer::IssueImporter, :clean_gitlab_redis_cach
expect
(
importer
.
create_issue
).
to
be_a_kind_of
(
Numeric
)
end
it
'triggers internal_id functionality to track greatest iids'
do
allow
(
importer
.
user_finder
)
.
to
receive
(
:author_id_for
)
.
with
(
issue
)
.
and_return
([
user
.
id
,
true
])
issue
=
build_stubbed
(
:issue
,
project:
project
)
allow
(
importer
)
.
to
receive
(
:insert_and_return_id
)
.
and_return
(
issue
.
id
)
allow
(
project
.
issues
).
to
receive
(
:find
).
with
(
issue
.
id
).
and_return
(
issue
)
expect
(
issue
).
to
receive
(
:ensure_project_iid!
)
importer
.
create_issue
end
end
describe
'#create_assignees'
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