@zentered/issue-forms-body-parser 1.1.1 → 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/README.md +20 -0
- package/package.json +2 -2
- 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,22 @@ 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
|
+
|
|
104
124
|
## Development & Testing
|
|
105
125
|
|
|
106
126
|
You can use [act](https://github.com/nektos/act) to test this Action locally.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zentered/issue-forms-body-parser",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Parser for GitHub Issue Form body, also available as GitHub Action",
|
|
6
6
|
"keywords": [
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"*.{js,json,md}": [
|
|
50
50
|
"prettier --write"
|
|
51
51
|
],
|
|
52
|
-
"*.
|
|
52
|
+
"*.js": [
|
|
53
53
|
"eslint --cache --fix"
|
|
54
54
|
]
|
|
55
55
|
},
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
**Describe the bug**
|
|
10
|
-
A clear and concise description of what the bug is.
|
|
11
|
-
|
|
12
|
-
**To Reproduce**
|
|
13
|
-
Steps to reproduce the behavior:
|
|
14
|
-
|
|
15
|
-
1. Go to '...'
|
|
16
|
-
2. Click on '....'
|
|
17
|
-
3. Scroll down to '....'
|
|
18
|
-
4. See error
|
|
19
|
-
|
|
20
|
-
**Expected behavior**
|
|
21
|
-
A clear and concise description of what you expected to happen.
|
|
22
|
-
|
|
23
|
-
**Additional context**
|
|
24
|
-
Add any other context about the problem here.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature request
|
|
3
|
-
about: Suggest an idea for this project
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
**Is your feature request related to a problem? Please describe.**
|
|
10
|
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
11
|
-
|
|
12
|
-
**Describe the solution you'd like**
|
|
13
|
-
A clear and concise description of what you want to happen.
|
|
14
|
-
|
|
15
|
-
**Describe alternatives you've considered**
|
|
16
|
-
A clear and concise description of any alternative solutions or features you've considered.
|
|
17
|
-
|
|
18
|
-
**Additional context**
|
|
19
|
-
Add any other context or screenshots about the feature request here.
|