77![ Continuous Delivery] ( https://github.com/issue-ops/parser/actions/workflows/continuous-delivery.yml/badge.svg )
88![ Linter] ( https://github.com/issue-ops/parser/actions/workflows/linter.yml/badge.svg )
99
10- Convert issue form responses to JSON
10+ Convert issue form responses to JSON!
1111
1212## About
1313
@@ -54,9 +54,10 @@ steps:
5454
5555# # Outputs
5656
57- | Output | Description |
58- | ------ | --------------------------------- |
59- | `json` | The parsed issue as a JSON string |
57+ | Output | Description |
58+ | -------------- | --------------------------------- |
59+ | `json` | The parsed issue as a JSON string |
60+ | `parsed_<key>` | The parsed value for `<key>` |
6061
6162# # Example
6263
@@ -131,9 +132,7 @@ IssueOps-Demo-Readers
131132IssueOps-Demo-Writers-NotATeam
132133` ` `
133134
134- The output of this action would be :
135-
136- <!-- markdownlint-disable -->
135+ The `json` output of this action would be :
137136
138137` ` ` json
139138{
@@ -160,7 +159,24 @@ The output of this action would be:
160159}
161160` ` `
162161
163- <!-- markdownlint-enable -->
162+ Additionally, the following outputs would be available :
163+
164+ | Output | Value |
165+ | ------------------------ | ----------------------------------------------------------------------- |
166+ | `parsed_name` | `this-thing` |
167+ | `parsed_nickname` | `thing` |
168+ | `parsed_color` | `["blue"]` |
169+ | `parsed_shape` | `["square"]` |
170+ | `parsed_sounds` | `["re", "mi"]` |
171+ | `parsed_topics` | `[]` |
172+ | `parsed_description` | `This is a description.\n\nIt has multiple lines.\n\nIt's pretty cool!` |
173+ | `parsed_notes` | `- Note\n- Another note\n- Lots of notes` |
174+ | `parsed_code` | `const thing = new Thing()\nthing.doThing()` |
175+ | `parsed_code-string` | `thing.toString()` |
176+ | `parsed_is-thing` | `{ "selected" : ["Yes"], "unselected": ["No"] }` |
177+ | `parsed_is-thing-useful` | `{ "selected" : ["Sometimes"], "unselected": ["Yes", "No"] }` |
178+ | `parsed_read-team` | `IssueOps-Demo-Readers` |
179+ | `parsed_write-team` | `IssueOps-Demo-Writers` |
164180
165181# ## No Template Provided
166182
@@ -169,9 +185,7 @@ still parse the issue body, however the output will be a flat JSON object. The
169185object keys will be slugified versions of the headers, and the values will be
170186the contents of the headers.
171187
172- Using the same example as above, the output would instead be :
173-
174- <!-- markdownlint-disable -->
188+ Using the same example as above, the `json` output would instead be :
175189
176190` ` ` json
177191{
@@ -192,7 +206,24 @@ Using the same example as above, the output would instead be:
192206}
193207` ` `
194208
195- <!-- markdownlint-enable -->
209+ Additionally, the following outputs would be available :
210+
211+ | Output | Value |
212+ | --------------------------------------------------- | ----------------------------------------------------------------------- |
213+ | `parsed_the_name_of_the_thing` | `this-thing` |
214+ | `parsed_the_nickname_of_the_thing` | `thing` |
215+ | `parsed_the_color_of_the_thing` | `["blue"]` |
216+ | `parsed_the_shape_of_the_thing` | `["square"]` |
217+ | `parsed_the_sounds_of_the_thing` | `["re", "mi"]` |
218+ | `parsed_the_topics_about_the_thing` | `[]` |
219+ | `parsed_the_description_of_the_thing` | `This is a description.\n\nIt has multiple lines.\n\nIt's pretty cool!` |
220+ | `parsed_the_notes_about_the_thing` | `- Note\n- Another note\n- Lots of notes` |
221+ | `parsed_the_code_of_the_thing` | `const thing = new Thing()\nthing.doThing()` |
222+ | `parsed_the_string_method_of_the_code_of_the_thing` | `thing.toString()` |
223+ | `parsed_is_the_thing_a_thing` | `{ "selected" : ["Yes"], "unselected": ["No"] }` |
224+ | `parsed_is_the_thing_useful` | `{ "selected" : ["Sometimes"], "unselected": ["Yes", "No"] }` |
225+ | `parsed_read_team` | `IssueOps-Demo-Readers` |
226+ | `parsed_write_team` | `IssueOps-Demo-Writers` |
196227
197228# # Transformations
198229
@@ -219,6 +250,12 @@ input type. The type is inferred from the issue form template. For information
219250on each specific type, see
220251[Syntax for GitHub's form schema](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema).
221252
253+ > [!NOTE]
254+ >
255+ > If the issue form template is not provided, the action will assume all inputs
256+ > are of type `input`. This means that all values will be treated as strings (no
257+ > transformations will be applied).
258+
222259# ### Single Line
223260
224261[Type : ` input` ](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#input)
0 commit comments