Skip to content

Releases: aguilita1/github-script-post-comment

v1.1.4

25 Oct 20:39
9db9c82

Choose a tag to compare

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

25 Oct 18:27
ca72629

Choose a tag to compare

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 body returned from user scripts is a string
  • Fixed linting errors
  • Added Dependabot configuration for automated dependency updates

Dependency Updates

New Contributors

Full Changelog: v1.1.2...v1.1.3

v1.0.0

23 Oct 17:41
9db9c82

Choose a tag to compare

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

24 Oct 18:15
d8db2db

Choose a tag to compare

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 return statement. 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 ⚠️ Now produce a clearer hint message instead of a stack trace
Downstream Steps Using result Output ✅ Unaffected — still receives error message in JSON

New Contributors

Full Changelog: v1.1.1...v1.1.2

V1.1.1

24 Oct 12:09
f0ffd67

Choose a tag to compare

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

v1.1.0

23 Oct 23:05
a48ef4f

Choose a tag to compare

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 summary
    • pull-request — comment directly on the pull request
    • both (default) — post to both locations

    [View commit → df47b38](df47b38)

  • 🔁 Pass-Through Inputs for actions/github-script
    The action now fully supports all upstream configuration options such as:

    • github-token
    • debug
    • user-agent
    • previews
    • result-encoding
    • retries
    • retry-exempt-status-codes
    • base-url
      This allows users to fine-tune GitHub API behavior directly.

    [View commit → db90677](db90677)

  • 📤 Output Result Handling
    The result of your custom JavaScript is now automatically captured and exposed as an output named result.
    Downstream workflow steps can easily access it via:

    ${{ steps.<id>.outputs.result }}

    [View commit → a48ef4f](a48ef4f)

⚙️ 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