Reads the body of an issue and parses it into a JSON object.
Bases itself on the definitions of GitHub Issue Forms:
Provided the following issue body:
### Name
Name provided in the issue.
### Language
PowerShell
### Rationale
I need the
<!-- This isa comment --> data parsed
### OS-[ ] macOS
-[x] Ubuntu
-[x] Windows
This action returns the following JSON object:
{
"Name": "Name provided in the issue.", // input"Language": "PowerShell", // dropdown"Rationale": "I need the\ndata parsed", // textarea"OS": { // checkbox"macOS": false,
"Ubuntu": true,
"Windows": true
}
}| Name | Description | Default | Required |
|---|---|---|---|
| IssueBody | The body of the issue, if not provided it will use the body of the issue that triggered the workflow. | ${{ github.event.issue.body }} | false |
| Name | Description |
|---|---|
| data | The parsed JSON object |
name: Example workflowon:
issues:
types:
- opened
- editedpermissions:
contents: readjobs:
assign:
name: Process issueruns-on: ubuntu-lateststeps:
- name: Get-IssueFormDataid: Get-IssueFormDatauses: PSModule/Get-IssueFormData@v1
- name: Print datashell: pwshenv:
data: ${{ steps.Get-IssueFormData.outputs.data }}run: | $data = $env:data | ConvertFrom-Json Write-Output $data