https://github.com/codebytere/github-issue-parser
parse github issue templates
https://github.com/codebytere/github-issue-parser
Last synced: 5 months ago
JSON representation
parse github issue templates
- Host: GitHub
- URL: https://github.com/codebytere/github-issue-parser
- Owner: codebytere
- Created: 2019-02-21T10:15:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:13:59.000Z (about 3 years ago)
- Last Synced: 2025-08-15T22:47:44.020Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 110 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub Issue Parser
This module parses github issue templates from markdown into plain JavaScript objects. It understands both markdown headers and list items.
Example:
```md
* **Version**: 1.2.3
* **Operating System:** Mac
## Actual Behavior
some bad behavior
## Expected Behavior
some good behavior
```
```js
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: '
some bad behavior
'
},
'Expected Behavior': {
raw: 'some good behavior',
html: 'some good behavior
'
},
}
*/
```