📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP

issue-parser

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

issue-parser

Parser for Github, GitLab and Bitbucket issues actions, references and mentions

7.0.1
latest
Version published
Weekly downloads
1.8M
-9.46%
Maintainers
4
Weekly downloads
 
Created

What is issue-parser?

The issue-parser npm package is designed to parse issue references from commit messages, pull requests, and other text. It helps in extracting and managing issue references in a structured way.

What are issue-parser's main functionalities?

Parsing Issue References

This feature allows you to parse issue references from a given text. In this example, the text 'Fixes #123' is parsed to extract the issue reference '#123'.

const issueParser = require('issue-parser')();
const result = issueParser('Fixes #123');
console.log(result);

Customizing Issue Patterns

This feature allows you to customize the patterns for issue references. In this example, the parser is configured to recognize 'gh-' as a valid issue prefix.

const issueParser = require('issue-parser')({
  issuePrefixes: ['#', 'gh-'],
  issueURLSegments: ['issues', 'pull']
});
const result = issueParser('Fixes gh-123');
console.log(result);

Parsing Multiple Issue References

This feature allows you to parse multiple issue references from a single text. In this example, the text 'Fixes #123, closes #456' is parsed to extract both issue references '#123' and '#456'.

const issueParser = require('issue-parser')();
const result = issueParser('Fixes #123, closes #456');
console.log(result);

Other packages similar to issue-parser

FAQs

Package last updated on 31 May 2024

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