Socket
Book a DemoInstallSign in
Socket

jira-tools

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jira-tools

CLI for automating multi step redundant process in JIRA

latest
Source
npmnpm
Version
1.3.1
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

JIRA Tools

JIRA Tools is a cli tool and library that allows you to perform actions against your JIRA projects via your command line or node.js scripts.

Getting Started CLI

INSTALL

npm install -g jira-tools

AUTHENTICATE

jtools auth -i && source ~/.bashrc

RUN A COMMAND

jtools -p [PROJECT] realease get --all

Commands

  • auth
  • release

Getting Started Library

INSTALL

npm install --save jira-tools

CONFIGURE

Create the following 2 files...

config/custom-environment-variables.json

{
  "jtools": {
    "auth": {
      "user": "JTOOLS_AUTH_USER",
      "token": "JTOOLS_AUTH_TOKEN"
    },
    "api": {
      "url": "JTOOLS_API_URL",
      "version": "JTOOLS_API_VERSION"
    }
  }
}

config/default.json

{
  "jtools": {
    "api": {
      "url": "https://jira.atlassian.net",
      "path": "/rest/api/",
      "version": "2"
    }
  }
}

AUTHENTICATE

You can authenticate using the cli method above, or you can simply set the following env vars

  • JTOOLS_AUTH_USER=[JIRA_EMAIL]
  • JTOOLS_AUTH_TOKEN=[base64(JIRA_API_TOKEN)]
  • JTOOLS_API_URL=https://[YOUR_SUBDOMAIN].atlassian.net
  • (optional) JTOOLS_API_VERSION=3 (default: 2) - You can also change the default in default.json instead

IMPLEMENTATION

const Jira = require('jira-tools');
Jira.getIssues({
  jql: 'status = "In Progress"',
  startAt: 0,
  maxResults: 20'
}).then(json => {
  console.log(json); //get your issues
});

Note: This is a very simple wrapper to make API calls a bit easier. I implement the methods as I need them for my use cases. This is not an exahaustive list of methods available via the JIRA api. If you'd like to see a method added, please send a Pull Request or Open an Issue.

!!List of available methods!!

FAQs

Package last updated on 25 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts