You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
GitHub Issue Parser
v2.0.0
Use this action to convert issues into a unified JSON structure.
- uses: stefanbuck/github-issue-parser@v2
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/bug-report.yml
- run: echo ${{ toJSON(steps.issue-parser.outputs.jsonString) }} > bug-details.json
template-path
is optional and meant to be used with Issue Forms.
Given an issue form
name: Bug
description: Something is broken
title: "Order Pizza"
body:
- type: input
id: contact
attributes:
label: Your contact details
validations:
required: true
- type: input
id: what_happened
attributes:
label: What happened?
validations:
required: true
- type: input
id: version
attributes:
label: Version
validations:
required: true
- type: input
id: browsers
attributes:
label: What browsers are you seeing the problem on?
validations:
required: true
- type: checkboxes
attributes:
label: What else?
options:
- label: Never give up
- label: Hot Dog is a Sandwich
And an issue body
### Your contact details
[email protected]
### What happened?
A bug happened!
### Version
1.0.0
### What browsers are you seeing the problem on?
Chrome, Safari
### What else?
- [x] Never give up
- [ ] Hot Dog is a Sandwich
The actions output will be
{
"contact": "[email protected]",
"what_happened": "A bug happened!",
"version": "1.0.0",
"browsers": "Chrome, Safari",
"never_give_up": true,
"hot_dog_is_a_sandwich": false
}
Ever wanted to order a pizza from a GitHub Issue? In this basic example, the order is processed and appended to the README using this Action.
The awesome-browser-extensions-for-github repository is using this Action to make it super easy to submit a new extension just by filling a new GitHub Issue. The workflow runs and turns the issue into a code contribution once the label merge
has been added.