Skip to content

A simple project to import csv issues files into gitlab

Notifications You must be signed in to change notification settings

grib0/gitlab-import-issues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This project allows the import of issues from a CSV file into your gitlab instance

It as been created for the need of a one shoot import, it is not usable as this for your need, but it should be simple enough to made some change to feet your needs.

Requirement

  • NodeJS
  • Your gitlab instance and info

Run

npm install fast-csv randomcolor

Copy your csv file into the same directory

Edit importIssues.js and change your gitlab host, your personal gitlab key, your project name and your csv filename :

//Your gitlab host
var host = '10.82.136.217';
//Your private key (http://yourgitlabinstance/profile/personal_access_tokens or http://yourgitlabinstance/profile/account) 
var privateToken = 'J_n6XdxJtw7j5Z3nwso8';
//Your project id or group%2FprojectName 
var projectId = 'gribo%2Ftest-import';
//The name of the csv file to read
var csvFileToRead = 'MyIssues.csv';

Configure your columns index and your csv separator :

//Change index of your csv file
var ISSUE_ORIGINAL_ID_INDEX = 0; //Issue original id, added in issue description
var ISSUE_TITLE_INDEX = 1;
var ISSUE_PRIORITY_INDEX = 2;
var ISSUE_FOUNDER_INDEX = 4; //Issue was found by (not a gitlab user, added to description)
var ISSUE_DESCRIPTION_INDEX = 5; //Issue description, may contain line break
var ISSUE_SYSTEM_INDEX = 8;  //Issue is associated to a system version
var ISSUE_VERSION_INDEX = 7; //Issue was assign to version
var ISSUE_CRDR_INDEX = 6; //Issue is a CR or DR

Then launch

node importIssues.js

Known issue : https://gitlab.com/gitlab-org/gitlab-ee/issues/2374

About

A simple project to import csv issues files into gitlab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages