Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

permissions:
contents: read
pull-requests: write

jobs:
lint-and-test:
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down