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
a99f7b98
Commit
a99f7b98
authored
Jun 08, 2020
by
Jarka Košanová
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify jira import startt mutation
parent
0eb4b6f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
app/graphql/mutations/jira_import/start.rb
app/graphql/mutations/jira_import/start.rb
+3
-11
No files found.
app/graphql/mutations/jira_import/start.rb
View file @
a99f7b98
...
...
@@ -23,29 +23,21 @@ module Mutations
description:
'Project name of the importer Jira project'
def
resolve
(
project_path
:,
jira_project_key
:)
project
=
find_project!
(
project_path:
project_path
)
raise_resource_not_available_error!
unless
project
project
=
authorized_find!
(
full_path:
project_path
)
service_response
=
::
JiraImport
::
StartImportService
.
new
(
context
[
:current_user
],
project
,
jira_project_key
)
.
execute
jira_import
=
service_response
.
success?
?
service_response
.
payload
[
:import_data
]
:
nil
errors
=
service_response
.
error?
?
[
service_response
.
message
]
:
[]
{
jira_import:
jira_import
,
errors:
errors
errors:
service_response
.
errors
}
end
private
def
find_project!
(
project_path
:)
return
unless
project_path
.
present?
authorized_find!
(
full_path:
project_path
)
end
def
find_object
(
full_path
:)
resolve_project
(
full_path:
full_path
)
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