@zentered/issue-forms-body-parser 1.0.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.yml +36 -0
- package/.github/ISSUE_TEMPLATE/config.yml +1 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +38 -0
- package/.github/workflows/end-to-end-test.yml +13 -0
- package/.github/workflows/publish.yml +1 -0
- package/README.md +32 -0
- package/dist/index.js +53308 -0
- package/dist/licenses.txt +1759 -0
- package/dist/package.json +3 -0
- package/package.json +3 -3
- package/src/index.js +1 -1
- package/src/parse.js +0 -1
- package/test/issue.json +6 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -24
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -19
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Create a report to help us improve
|
|
3
|
+
title: Bug report
|
|
4
|
+
labels: ['bug']
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: description
|
|
8
|
+
attributes:
|
|
9
|
+
label: Describe the bug
|
|
10
|
+
description: A clear and concise description of what the bug is.
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: reproduction
|
|
15
|
+
attributes:
|
|
16
|
+
label: To reproduce
|
|
17
|
+
description: Steps to reproduce the behavior
|
|
18
|
+
placeholder: >
|
|
19
|
+
1. Go to ...\n 2. Click on ...\n 3. Scroll down to ...\n 4. See error
|
|
20
|
+
validations:
|
|
21
|
+
required: false
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: expectation
|
|
24
|
+
attributes:
|
|
25
|
+
label: Expected behaviour
|
|
26
|
+
description:
|
|
27
|
+
A clear and concise description of what you expected to happen.
|
|
28
|
+
validations:
|
|
29
|
+
required: false
|
|
30
|
+
- type: textarea
|
|
31
|
+
id: additional
|
|
32
|
+
attributes:
|
|
33
|
+
label: Additional context
|
|
34
|
+
description: Add any other context about the problem here.
|
|
35
|
+
validations:
|
|
36
|
+
required: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest an idea for this project
|
|
3
|
+
title: Feature request
|
|
4
|
+
labels: ['enhancement']
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: description
|
|
8
|
+
attributes:
|
|
9
|
+
label: Is your feature request related to a problem? Please describe.
|
|
10
|
+
description:
|
|
11
|
+
A clear and concise description of what the problem is. Ex. Im always
|
|
12
|
+
frustrated when [...]
|
|
13
|
+
validations:
|
|
14
|
+
required: true
|
|
15
|
+
- type: textarea
|
|
16
|
+
id: solution
|
|
17
|
+
attributes:
|
|
18
|
+
label: Describe the solution you would like
|
|
19
|
+
description: A clear and concise description of what you want to happen.
|
|
20
|
+
validations:
|
|
21
|
+
required: false
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: alternatives
|
|
24
|
+
attributes:
|
|
25
|
+
label: Describe alternatives you have considered
|
|
26
|
+
description:
|
|
27
|
+
A clear and concise description of any alternative solutions or features
|
|
28
|
+
you have considered.
|
|
29
|
+
validations:
|
|
30
|
+
required: false
|
|
31
|
+
- type: textarea
|
|
32
|
+
id: additional
|
|
33
|
+
attributes:
|
|
34
|
+
label: Additional context
|
|
35
|
+
description:
|
|
36
|
+
Add any other context or screenshots about the feature request here.
|
|
37
|
+
validations:
|
|
38
|
+
required: false
|
package/README.md
CHANGED
|
@@ -27,6 +27,8 @@ with valuable feedback from [Steffen](https://gist.github.com/steffen)\_
|
|
|
27
27
|
|
|
28
28
|
## Features
|
|
29
29
|
|
|
30
|
+
- :white_check_mark: npm version available
|
|
31
|
+
`npm i @zentered/issue-forms-body-parser`
|
|
30
32
|
- :white_check_mark: parse question/answer format into title/text as JSON
|
|
31
33
|
- :white_check_mark: parse line items and "tasks" with separate `checked`
|
|
32
34
|
attributes
|
|
@@ -86,6 +88,8 @@ See more examples in [md test cases](./test/test-issue-1.md) and
|
|
|
86
88
|
|
|
87
89
|
## Installation & Usage
|
|
88
90
|
|
|
91
|
+
### GitHub Actions
|
|
92
|
+
|
|
89
93
|
```yml
|
|
90
94
|
name: Issue Forms Body Parser
|
|
91
95
|
|
|
@@ -101,6 +105,34 @@ jobs:
|
|
|
101
105
|
- run: echo "${{ JSON.stringify(steps.parse.outputs.data) }}"
|
|
102
106
|
```
|
|
103
107
|
|
|
108
|
+
### NPM
|
|
109
|
+
|
|
110
|
+
The parser is available as a standalone library:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
npm i @zentered/issue-forms-body-parser
|
|
114
|
+
# OR yarn add @zentered/issue-forms-body-parser
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Usage:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
import bodyParser from '@zentered/issue-forms-body-parser'
|
|
121
|
+
const issueData = await bodyParser(issue.body)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Development & Testing
|
|
125
|
+
|
|
126
|
+
You can use [act](https://github.com/nektos/act) to test this Action locally.
|
|
127
|
+
|
|
128
|
+
`npm run build && act issue -e test/issue.json`
|
|
129
|
+
|
|
130
|
+
or run:
|
|
131
|
+
|
|
132
|
+
`npm test`
|
|
133
|
+
|
|
134
|
+
to test the parser.
|
|
135
|
+
|
|
104
136
|
## Links
|
|
105
137
|
|
|
106
138
|
- [Creating issue forms](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#creating-issue-forms)
|