This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2018-11-26T17:56:33.842Z","extensionVersion":"v3.2.2"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
axios.request({ | |
method: 'post', | |
url: `${GITLAB_URL}/api/v4/projects/${encodeURIComponent(GITLAB_PROJECT)}/issues`, | |
// the GitLab issue that we have just created | |
data: GITLAB_ISSUE | |
headers: { | |
'PRIVATE-TOKEN': GITLAB_TOKEN | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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 => ({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jiraToGitlabUser(JIRAUser) { | |
// GitLabUsers = the list of GitLab users we get from the last call | |
return JIRAUser ? _.find(GitLabUsers, { email: JIRAUser.emailAddress }) : null | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
axios.request({ | |
method: 'get', | |
// 10000 users, should be enough to get them all | |
url: `${GITLAB_URL}/api/v4/users?active=true&search=&per_page=10000`, | |
headers: { | |
'PRIVATE-TOKEN': GITLAB_TOKEN | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the base url to your GitLab | |
const GITLAB_URL = 'http://your-gitlab-url.com/'; | |
// the project in gitlab that you are importing issues to | |
const GITLAB_PROJECT = 'namespaced/project/name'; | |
// GitLab username and password used to login | |
const GITLAB_ACCOUNT = { | |
username, | |
password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the base url to your JIRA | |
const JIRA_URL = 'https://your-jira-url.com/'; | |
// the JIRA project ID (short) | |
const JIRA_PROJECT = 'PRO'; | |
// JIRA username and password used to login | |
const JIRA_ACCOUNT = { | |
username, | |
password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
axios.request({ | |
method: 'get', | |
/* | |
* JIRA_ISSUE = the JIRA issue that we get from the previous call | |
*/ | |
url: `${JIRA_URL}/rest/api/2/issue/${JIRA_ISSUE.id}/?fields=attachment,comment`, | |
auth: { | |
username: JIRA_ACCOUNT.username, | |
password: JIRA_ACCOUNT.password | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
axios.request({ | |
method: 'get', | |
url: `${JIRA_URL}/rest/api/2/search?jql=project=${JIRA_PROJECT}+order+by+id+asc&startAt=${offset}&maxResults=${limit}`, | |
auth: { | |
username: JIRA_ACCOUNT.username, | |
password: JIRA_ACCOUNT.password | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:5.6.30 | |
MAINTAINER Linagora Folks <lgs-openpaas-dev@linagora.com> | |
RUN apt-get update && \ | |
apt-get -y install unzip git php5-curl php5-dev php-amqplib && \ | |
docker-php-ext-install bcmath && \ | |
pecl install mongo && \ | |
docker-php-ext-enable mongo && \ | |
curl https://getcomposer.org/installer | php && \ |
NewerOlder