Skip to content

Instantly share code, notes, and snippets.

@dbenchi
Created July 13, 2017 09:29
Show Gist options
  • Save dbenchi/1970db2cfe44aafc60b8065c2e3eb8e4 to your computer and use it in GitHub Desktop.
Save dbenchi/1970db2cfe44aafc60b8065c2e3eb8e4 to your computer and use it in GitHub Desktop.
{
title: JIRAIssue.fields.summary,
description: JIRAIssue.fields.description,
labels: [JIRAIssue.fields.issuetype.name],
created_at: JIRAIssue.fields.created,
updated_at: JIRAIssue.fields.updated,
done: issue.fields.status.statusCategory.name === 'Done' ? true : false,
assignee: jiraToGitlabUser(JIRAIssue.fields.assignee ),
reporter: jiraToGitlabUser(JIRAIssue.fields.reporter),
comments: JIRAComments.map(JIRAComment => ({
author: jiraToGitlabUser(JIRAComment.author),
comment: JIRAComment.body,
created_at: JIRAComment.created
})),
attachments: JIRAAttachments.map(JIRAAttachment => ({
author: jiraToGitlabUser(JIRAAttachment.author),
filename: JIRAAttachment.filename,
content: JIRAAttachment.content,
created_at: JIRAAttachment.created
}))
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment