npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jira-facade

v0.1.1

Published

Facade to the jira wrapper module that simplifies some of the more tedious processes.

Downloads

2

Readme

jira-facade

Build Status

The goal of jira-facade is to be a simple facade to the jira wrapper module that simplifies some of the more tedious processes such as getting IDs for versions, priorities, components, etc.

NOTE: Better documentation is coming.

Installation

npm install -S jira-facade

var JiraFacade = require('jira-facade');

Methods

new JiraFacade(options) (Constructor)

This is basically a pass through to the jira

var jiraFacade = new JiraFacade({
	protocol: 'https',
	host: 'jira.example.com',
	port: 443,
	username: 'splunk-user',
	password: 'splunk-password',
	apiVersion: '2',
})

jira

This is an instance of the jira module and has full access to all of its methods. See the jira module page for detailed documentation.

jiraFacade.jira.getProject('EXAMPLEKEY', function(err, project){
	console.log(project);
});

createIssue(options, callback)

Creates a JIRA issue and returns the issue object from the JIRA api.

jiraFacade.createIssue({
	project: 'EXAMPLEKEY',
	issueType: 'Task',
	summary: 'Issue Summary/Subject',	
	description: 'Issue Description',
	fixVersions: ['Backlog'],
	components: ['Services', 'Site'],
	assignee: 'joe.developer',
	reporter: 'sally.manager',
	priority: 'Critical',
	labels: ['services', 'website']
}, function(err, issue){
	console.log(issue.id);
});

Options

  • project (string) JIRA Project Key
  • issueType (string) The issueType name (e.g. Bug)
  • summary (string) The summary or subject of the issue to be created
  • description (string) The issue description
  • fixVersions (Array) Array of version names this issue will be in
  • components (Array) Array of Component names this isssue is associated with
  • assignee (string) JIRA username of the assignee
  • reporter (string) JIRA username of hte reporter
  • priority (string) Severity name (e.g. Critical)
  • labels (Array) Array of string labels to apply to the issue

addWatcher(issueKey, username, callback)

Adds the user username to the issue issueKey

jiraFacade.addUser('MYPROJ-548', 'kmorris', function(err){
	console.log("Error:", err);
});

getVersionByName(project, versionName, callback)

Returns a JIRA version object from a specific project based on the name of that version.

jiraFacade.getVersionByName('EXAMPLEKEY', '1.0.0', function(err, version){
	console.log(version);
});

getPriorityByName(priorityName, callback)

Returns a JIRA global priority object based on the name of that priority.

jiraFacade.getPriorityByName('Critical', function(err, priority){
	console.log(priority);
});

getPriorityById(priorityId, callback)

Returns a JIRA global priority object based on the id of that priority.

jiraFacade.getPriorityById(2, function(err, priority){
	console.log(priority);
});

getIssueTypeByName(priorityName, callback)

Returns a JIRA global issueType object based on the name of that issueType.

jiraFacade.getIssueTypeByName('Bug', function(err, issueType){
	console.log(priority);
});