Skip to content

kerhub/github-issue-parser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Issue Parser

This module parses github issue templates from markdown into plain JavaScript objects. It understands both markdown headers and list items.

Example:

* **Version**: 1.2.3
* **Operating System:** Mac

## Actual Behavior

some bad behavior

## Expected Behavior

some good behavior
const issueParser = require('github-issue-parser')

const issueData = fs.readFileSync('/path/to/issue.md', 'utf8')
const jsonBlob = issueParser(issueData)
console.log(jsonBlob)
/*
{
  'Version:': { raw: '1.2.3', html: '1.2.3' },
  'Operating System:': { raw: 'Mac', html: 'Mac },
  'Actual Behavior': {
    raw: 'some bad behavior',
    html: '<p>some bad behavior</p>'
  },
  'Expected Behavior': {
    raw: 'some good behavior',
    html: '<p>some good behavior</p>'
  },
}
*/

About

parse github issue templates

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • JavaScript 100.0%