Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jira-client

Package Overview
Dependencies
Maintainers
5
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jira-client

Wrapper for the JIRA API

  • 8.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
128K
decreased by-11.8%
Maintainers
5
Weekly downloads
 
Created

What is jira-client?

The jira-client npm package is a Node.js wrapper for the JIRA REST API. It allows developers to interact with JIRA programmatically, enabling them to automate tasks, retrieve data, and manage JIRA issues, projects, and other resources.

What are jira-client's main functionalities?

Create Issue

This feature allows you to create a new issue in JIRA. The code sample demonstrates how to configure the jira-client and create a new issue with specified fields such as project key, summary, description, and issue type.

const JiraClient = require('jira-client');

const jira = new JiraClient({
  protocol: 'https',
  host: 'your-jira-host.atlassian.net',
  username: 'your-username',
  password: 'your-password',
  apiVersion: '2',
  strictSSL: true
});

jira.addNewIssue({
  fields: {
    project: { key: 'TEST' },
    summary: 'New issue from jira-client',
    description: 'Creating an issue via jira-client',
    issuetype: { name: 'Task' }
  }
}).then(issue => {
  console.log(`Created issue: ${issue.key}`);
}).catch(err => {
  console.error(err);
});

Get Issue

This feature allows you to retrieve details of a specific issue by its key. The code sample shows how to configure the jira-client and fetch an issue using its key.

const JiraClient = require('jira-client');

const jira = new JiraClient({
  protocol: 'https',
  host: 'your-jira-host.atlassian.net',
  username: 'your-username',
  password: 'your-password',
  apiVersion: '2',
  strictSSL: true
});

jira.findIssue('TEST-1').then(issue => {
  console.log(`Found issue: ${issue.key}`);
  console.log(issue);
}).catch(err => {
  console.error(err);
});

Update Issue

This feature allows you to update an existing issue in JIRA. The code sample demonstrates how to configure the jira-client and update the summary and description of an issue using its key.

const JiraClient = require('jira-client');

const jira = new JiraClient({
  protocol: 'https',
  host: 'your-jira-host.atlassian.net',
  username: 'your-username',
  password: 'your-password',
  apiVersion: '2',
  strictSSL: true
});

jira.updateIssue('TEST-1', {
  fields: {
    summary: 'Updated summary',
    description: 'Updated description'
  }
}).then(issue => {
  console.log(`Updated issue: ${issue.key}`);
}).catch(err => {
  console.error(err);
});

Search Issues

This feature allows you to search for issues in JIRA using JQL (JIRA Query Language). The code sample shows how to configure the jira-client and perform a search for issues in a specific project with a specific status.

const JiraClient = require('jira-client');

const jira = new JiraClient({
  protocol: 'https',
  host: 'your-jira-host.atlassian.net',
  username: 'your-username',
  password: 'your-password',
  apiVersion: '2',
  strictSSL: true
});

jira.searchJira('project = TEST AND status = "To Do"').then(result => {
  console.log('Search results:', result.issues);
}).catch(err => {
  console.error(err);
});

Other packages similar to jira-client

FAQs

Package last updated on 03 Nov 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc