github-issue-parser
github-issue-parser copied to clipboard
fix(checkboxes): correctly parse checkboxes when the template is wrong or missing
When the wrong template is provided, then the action will traceback with the error:
/home/runner/work/_actions/stefanbuck/github-issue-parser/v3/dist/index.js:105
result[key] = content.concat(value);
^
TypeError: Cannot read properties of undefined (reading 'concat')
at /home/runner/work/_actions/stefanbuck/github-issue-parser/v3/dist/index.js:105:33
at Array.forEach (<anonymous>)
at toObject (/home/runner/work/_actions/stefanbuck/github-issue-parser/v3/dist/index.js:97:11)
at run (/home/runner/work/_actions/stefanbuck/github-issue-parser/v3/dist/index.js:161:12)
at 2932 (/home/runner/work/_actions/stefanbuck/github-issue-parser/v3/dist/index.js:184:3)
at __nccwpck_require__ (/home/runner/work/_actions/stefanbuck/github-issue-parser/v3/dist/index.js:7097:43)
at /home/runner/work/_actions/stefanbuck/github-issue-parser/v3/dist/index.js:7117:37
at Object.<anonymous> (/home/runner/work/_actions/stefanbuck/github-issue-parser/v3/dist/index.js:7120:12)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
Also, checkboxes aren't represented as an array when the issue-form template is not provided.
This commit fixes both issues by correctly parsing checkboxes even when the template is wrong or missing.
Follow-up to:
- https://github.com/stefanbuck/github-issue-parser/pull/21
Related to:
- https://github.com/stefanbuck/github-issue-parser/issues/50
/cc @stefanbuck
@joshjohanning, @gr2m, Could you please have a look? Thank you.
:tada: This PR is included in version 3.1.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Thank you @gr2m 👍
:tada: This PR is included in version 3.2.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket: