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 thecatchblock to detect when a user’s script fails toreturna string (causing aTypeError [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 | |
| Downstream Steps Using result Output | ✅ Unaffected — still receives error message in JSON |
Full Changelog: v1.1.0...v1.1.1