diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c2dcb6..ad5072f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: permissions: contents: read + pull-requests: write jobs: lint-and-test: diff --git a/action.yml b/action.yml index 7711c26..5e2971c 100644 --- a/action.yml +++ b/action.yml @@ -143,7 +143,7 @@ runs: console.error(`❌ Error processing ${{ inputs.label }} results:`, error); // Detect when user forgot to return a value (causing body = undefined) - if (error.code === 'ERR_INVALID_ARG_TYPE' && /The "data" argument must be of type string/i.test(error.message)) { + if (error.status === 'ERR_INVALID_ARG_TYPE' && /The "data" argument must be of type string/i.test(error.message)) { console.error(`💡 Hint: Your script returned a non-string value (e.g., object, array, or undefined) — or nothing at all.\n` + `Please return a string, or serialize your result using JSON.stringify.\n\n` + `For example:\n\n` diff --git a/package.json b/package.json index ce5b3b0..85ab168 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aguilita1/github-script-post-comment", - "version": "1.1.1", + "version": "1.1.2", "description": "GitHub Action to run custom JavaScript and post results to GitHub summary and Pull Request", "author": "Daniel I. Kelley", "license": "MIT",