@zentered/issue-forms-body-parser 1.1.0 → 1.1.1

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.
@@ -0,0 +1,13 @@
1
+ name: e2e test
2
+
3
+ on: issues
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v3
10
+ - name: Issue Forms Body Parser
11
+ id: parse
12
+ uses: ./
13
+ - run: echo "${{ toJSON(steps.parse.outputs.data) }}"
package/README.md CHANGED
@@ -101,6 +101,18 @@ jobs:
101
101
  - run: echo "${{ JSON.stringify(steps.parse.outputs.data) }}"
102
102
  ```
103
103
 
104
+ ## Development & Testing
105
+
106
+ You can use [act](https://github.com/nektos/act) to test this Action locally.
107
+
108
+ `npm run build && act issue -e test/issue.json`
109
+
110
+ or run:
111
+
112
+ `npm test`
113
+
114
+ to test the parser.
115
+
104
116
  ## Links
105
117
 
106
118
  - [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)
package/dist/index.js CHANGED
@@ -53293,7 +53293,7 @@ async function run() {
53293
53293
  const parsedContent = await parseMD(github.context.payload.issue.body)
53294
53294
 
53295
53295
  if (parsedContent !== undefined) {
53296
- core.setOutput('payload', parsedContent)
53296
+ core.setOutput('data', parsedContent)
53297
53297
  } else {
53298
53298
  core.setFailed(`There was no valid payload found in the issue.`)
53299
53299
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zentered/issue-forms-body-parser",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "private": false,
5
5
  "description": "Parser for GitHub Issue Form body, also available as GitHub Action",
6
6
  "keywords": [
package/src/index.js CHANGED
@@ -9,7 +9,7 @@ async function run() {
9
9
  const parsedContent = await parse(github.context.payload.issue.body)
10
10
 
11
11
  if (parsedContent !== undefined) {
12
- core.setOutput('payload', parsedContent)
12
+ core.setOutput('data', parsedContent)
13
13
  } else {
14
14
  core.setFailed(`There was no valid payload found in the issue.`)
15
15
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "action": "opened",
3
+ "issue": {
4
+ "body": "### List Item Checked\n\n* [x] I agree to follow this project's\n [Code of Conduct](https://berlincodeofconduct.org)\n"
5
+ }
6
+ }