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
67c02edc
Commit
67c02edc
authored
Jun 06, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move create! method from formatters to the BaseFormatter
parent
9437b8a2
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
10 deletions
+14
-10
lib/gitlab/github_import/base_formatter.rb
lib/gitlab/github_import/base_formatter.rb
+4
-0
lib/gitlab/github_import/issue_formatter.rb
lib/gitlab/github_import/issue_formatter.rb
+4
-4
lib/gitlab/github_import/label_formatter.rb
lib/gitlab/github_import/label_formatter.rb
+2
-2
lib/gitlab/github_import/milestone_formatter.rb
lib/gitlab/github_import/milestone_formatter.rb
+2
-2
lib/gitlab/github_import/pull_request_formatter.rb
lib/gitlab/github_import/pull_request_formatter.rb
+2
-2
No files found.
lib/gitlab/github_import/base_formatter.rb
View file @
67c02edc
...
...
@@ -9,6 +9,10 @@ module Gitlab
@formatter
=
Gitlab
::
ImportFormatter
.
new
end
def
create!
self
.
klass
.
create!
(
self
.
attributes
)
end
private
def
gl_user_id
(
github_id
)
...
...
lib/gitlab/github_import/issue_formatter.rb
View file @
67c02edc
...
...
@@ -16,14 +16,14 @@ module Gitlab
}
end
def
create!
Issue
.
create!
(
self
.
attributes
)
end
def
has_comments?
raw_data
.
comments
>
0
end
def
klass
Issue
end
def
number
raw_data
.
number
end
...
...
lib/gitlab/github_import/label_formatter.rb
View file @
67c02edc
...
...
@@ -9,8 +9,8 @@ module Gitlab
}
end
def
create!
Label
.
create!
(
self
.
attributes
)
def
klass
Label
end
private
...
...
lib/gitlab/github_import/milestone_formatter.rb
View file @
67c02edc
...
...
@@ -14,8 +14,8 @@ module Gitlab
}
end
def
create!
Milestone
.
create!
(
self
.
attributes
)
def
klass
Milestone
end
private
...
...
lib/gitlab/github_import/pull_request_formatter.rb
View file @
67c02edc
...
...
@@ -24,8 +24,8 @@ module Gitlab
}
end
def
create!
MergeRequest
.
create!
(
self
.
attributes
)
def
klass
MergeRequest
end
def
number
...
...
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