Skip to content

Choose a tag to compare

@aguilita1 aguilita1 released this 24 Oct 12:09
· 29 commits to main since this release
f0ffd67

What's Changed

This release fixes a usability defect in GitHub Script with Post action. When action script fails to return a string value script throws cryptic TypeError.

  • Improved error handling:
    Added logic in the catch block to detect when a user’s script fails to return a string (causing a TypeError [ERR_INVALID_ARG_TYPE] when writing to the GitHub summary).
    The action now prints a helpful message instructing users to end their script with a return statement, e.g.:

    return "✅ My script completed successfully.";
    

🧠 Example Output

When a user forgets to return a string:

✅ Executed user script successfully.
❌ Error processing OWASP Dependency Check Summary results: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string...
💡 Hint: Your script likely did not return a string.
Make sure your script ends with a 'return' statement that produces a string, for example:

return "✅ My script completed successfully.";


🔧 Developer Impact

Area Impact
Existing Scripts with Return Values ✅ No change
Scripts Without Return Values ⚠️ Now produce a clear hint message instead of a stack trace
Downstream Steps Using result Output ✅ Unaffected — still receives error message in JSON

Full Changelog: v1.1.0...v1.1.1