Releases: aguilita1/github-script-post-comment
v1.1.4
What's Changed
- moved ext_script.js to temp folder to avoid collision with user code @aguilita1 in #5
Full Changelog: v1.1.3...v1.1.4
v1.1.3
What's Changed
Enhancements & Fixes by @aguilita1 in #2
- Organized test cases for clearer reporting of linting, positive tests, and negative tests
- Adjusted output formatting for improved readability
- Added validation to ensure
bodyreturned from user scripts is a string - Fixed linting errors
- Added Dependabot configuration for automated dependency updates
Dependency Updates
- Bump
actions/upload-artifactfrom 4 to 5 by @dependabot in #4 - Bump
actions/checkoutfrom 4 to 5 by @dependabot in #3
New Contributors
- @dependabot[bot] made their first contribution in #4
Full Changelog: v1.1.2...v1.1.3
v1.0.0
Initial release of composite action. This action extends actions/github-script and makes it easy to quickly write
a script in your workflow that uses the GitHub API and the workflow run context
then posts comment to Pull Request and GitHub Summary.
Full Changelog: https://github.com/aguilita1/github-script-post-comment/commits/v1.0.0
v1.1.2
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.
- Added Continuous Integration Workflow: A new CI workflow has been implemented to ensure code quality and stability.
- Added test cases
- Improved Error Handling: The action now includes robust error handling to help users debug common issues.
- Hint for Missing Return Value: A specific check has been added to detect when a user's script does not return a string value.
- Clearer Error Message: If this error occurs, the action will now provide a helpful hint explaining the issue and an example of how to correctly format the
returnstatement. This helps prevent errors like ERR_INVALID_ARG_TYPE and guides users to a solution.
🔧 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 |
New Contributors
- @aguilita1 made their first contribution in #1
Full Changelog: v1.1.1...v1.1.2
V1.1.1
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
v1.1.0
What's Changed
This release introduces several enhancements to make the GitHub Script with Post action more configurable, flexible, and integration-friendly.
✨ New Features
-
🧩 Post Target Control — Added new input
post-target
You can now choose where results are posted:github-step-summary— append output only to the workflow summarypull-request— comment directly on the pull requestboth(default) — post to both locations
-
🔁 Pass-Through Inputs for
actions/github-script
The action now fully supports all upstream configuration options such as:github-tokendebuguser-agentpreviewsresult-encodingretriesretry-exempt-status-codesbase-url
This allows users to fine-tune GitHub API behavior directly.
-
📤 Output Result Handling
The result of your custom JavaScript is now automatically captured and exposed as an output namedresult.
Downstream workflow steps can easily access it via:${{ steps.<id>.outputs.result }}
⚙️ Example Usage
- name: Run custom JavaScript and post results
id: post
uses: aguilita1/[email protected]
with:
post-target: pull-request
script: |
return "✅ Custom script executed successfully!";You can then reference the result in later steps:
- name: Log result
run: echo "Output: ${{ steps.post.outputs.result }}"🧾 Summary
This update enhances flexibility, improves output handling, and makes the action fully compatible with upstream actions/github-script configuration options — paving the way for more advanced automation workflows.
Full Changelog: v1.0.0...v1.1.0