gitlab-create-issue

1.0.1 • Public • Published

gitlab-create-issue

Creates gitlab issues with the given payload

Run Status

Why gitlab-create-issue?

The gitlab API requires the project ID to be given as payload to create an issue. This module finds the project ID from the project and namespace.

Install

npm install --save gitlab-create-issue

Payload

1) mandatoryPayload
{
 namespace: 'argonlaser',
 project: 'gitlab-create-issue-test',
 privateToken: 'xxxxxxx',
 title: 'TITLE'
 }
2) optionalPayload
{
  description: 'create issue',
  assigneeName: 'argonlaser' (or) assigneeId: '111111',
  labels: ['AAA', 'BBB'],
  dueDate: 'YYYY-MM-DD'
}

Usage

var createIssue = require('gitlab-create-issue')
var mandatoryPayload =
 {
  namespace: 'argonlaser',
  project: 'gitlab-create-issue-test',
  privateToken: process.env.privateToken,
  title: 'Title'
 }
var optionalPayload =
 {
  assigneeName: 'argonlaser',
  dueDate: '2018-11-11'
 }
 
createIssue(mandatoryPayload, optionalPayload, function (err, res) {
  if (err) {
    // Handle error
  } else {
    // Do something with response
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i gitlab-create-issue

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • argonlaser