-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support reading body from a file #115
Conversation
PTAL @peter-evans |
@peter-evans this would really help if this get merged/reviewed. Thnx! @umanghome can you maybe sync your branch again? Then we can make use of the fork for now until this is merged (or not) Thnx! |
@umanghome Thank you for contributing this. Apologies for not looking at it sooner. This issue comes up occasionally for a few of the actions I maintain. I was really trying to avoid adding this feature to read input from files for a few reasons:
However, I don't see any sign that this will be fixed at an environment level, so I'm considering merging this. |
Thnx for the reply. Just a note that if you use the file based method and have multiline comments you don't require this
To make multiline work. But i agree that with your reasoning but i sadly also don't see that the env limitation with be fixed anytime soon. |
@umanghome, (and anyone else following this issue), do you need the input If nobody needs it then I will omit it until there is a need. |
@peter-evans I can remove it from the changes in this branch if you'd like. |
@umanghome Got it. Thanks for confirming. I'm going to merge this to a feature branch so I can make some tweaks and add a test. Then I'll merge it into |
Released as Thank you @umanghome |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [peter-evans/create-or-update-comment](https://togithub.com/peter-evans/create-or-update-comment) | action | major | `v1.4.5` -> `v4.0.0` | --- ### Release Notes <details> <summary>peter-evans/create-or-update-comment (peter-evans/create-or-update-comment)</summary> ### [`v4.0.0`](https://togithub.com/peter-evans/create-or-update-comment/releases/tag/v4.0.0): Create or Update Comment v4.0.0 [Compare Source](https://togithub.com/peter-evans/create-or-update-comment/compare/v3.1.0...v4.0.0) ⚙️ Updated runtime to Node.js 20 - The action now requires a minimum version of [v2.308.0](https://togithub.com/actions/runner/releases/tag/v2.308.0) for the Actions runner. Update self-hosted runners to v2.308.0 or later to ensure compatibility. #### What's Changed - build(deps): bump actions/setup-node from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/273](https://togithub.com/peter-evans/create-or-update-comment/pull/273) - build(deps-dev): bump [@​vercel/ncc](https://togithub.com/vercel/ncc) from 0.38.0 to 0.38.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/274](https://togithub.com/peter-evans/create-or-update-comment/pull/274) - build(deps-dev): bump eslint-plugin-jest from 27.4.2 to 27.4.3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/276](https://togithub.com/peter-evans/create-or-update-comment/pull/276) - build(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.18.5 to 18.18.6 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/277](https://togithub.com/peter-evans/create-or-update-comment/pull/277) - build(deps-dev): bump eslint from 8.51.0 to 8.52.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/275](https://togithub.com/peter-evans/create-or-update-comment/pull/275) - build(deps-dev): bump eslint-plugin-jest from 27.4.3 to 27.6.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/278](https://togithub.com/peter-evans/create-or-update-comment/pull/278) - build(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.18.6 to 18.18.8 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/279](https://togithub.com/peter-evans/create-or-update-comment/pull/279) - build(deps-dev): bump eslint from 8.52.0 to 8.53.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/280](https://togithub.com/peter-evans/create-or-update-comment/pull/280) - build(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.18.8 to 18.18.9 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/281](https://togithub.com/peter-evans/create-or-update-comment/pull/281) - build(deps-dev): bump prettier from 3.0.3 to 3.1.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/282](https://togithub.com/peter-evans/create-or-update-comment/pull/282) - build(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.18.9 to 18.18.12 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/283](https://togithub.com/peter-evans/create-or-update-comment/pull/283) - build(deps-dev): bump eslint from 8.53.0 to 8.54.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/284](https://togithub.com/peter-evans/create-or-update-comment/pull/284) - build(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.18.12 to 18.18.13 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/285](https://togithub.com/peter-evans/create-or-update-comment/pull/285) - build(deps-dev): bump eslint from 8.54.0 to 8.55.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/286](https://togithub.com/peter-evans/create-or-update-comment/pull/286) - build(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.18.13 to 18.19.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/287](https://togithub.com/peter-evans/create-or-update-comment/pull/287) - build(deps): bump chuhlomin/render-template from 1.8 to 1.9 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/288](https://togithub.com/peter-evans/create-or-update-comment/pull/288) - build(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.19.2 to 18.19.3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/289](https://togithub.com/peter-evans/create-or-update-comment/pull/289) - build(deps-dev): bump prettier from 3.1.0 to 3.1.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/290](https://togithub.com/peter-evans/create-or-update-comment/pull/290) - build(deps-dev): bump eslint-plugin-prettier from 5.0.1 to 5.1.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/292](https://togithub.com/peter-evans/create-or-update-comment/pull/292) - build(deps-dev): bump eslint from 8.55.0 to 8.56.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/293](https://togithub.com/peter-evans/create-or-update-comment/pull/293) - build(deps): bump actions/download-artifact from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/295](https://togithub.com/peter-evans/create-or-update-comment/pull/295) - build(deps-dev): bump eslint-plugin-prettier from 5.1.0 to 5.1.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/296](https://togithub.com/peter-evans/create-or-update-comment/pull/296) - build(deps-dev): bump eslint-plugin-jest from 27.6.0 to 27.6.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/297](https://togithub.com/peter-evans/create-or-update-comment/pull/297) - build(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.19.3 to 18.19.4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/298](https://togithub.com/peter-evans/create-or-update-comment/pull/298) - build(deps-dev): bump eslint-plugin-prettier from 5.1.2 to 5.1.3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/299](https://togithub.com/peter-evans/create-or-update-comment/pull/299) - build(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.19.4 to 18.19.6 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/300](https://togithub.com/peter-evans/create-or-update-comment/pull/300) - build(deps-dev): bump prettier from 3.1.1 to 3.2.3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/301](https://togithub.com/peter-evans/create-or-update-comment/pull/301) - build(deps-dev): bump eslint-plugin-jest from 27.6.1 to 27.6.3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/302](https://togithub.com/peter-evans/create-or-update-comment/pull/302) - build(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.19.6 to 18.19.7 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/303](https://togithub.com/peter-evans/create-or-update-comment/pull/303) - build(deps-dev): bump [@​types/node](https://togithub.com/types/node) from 18.19.7 to 18.19.8 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/304](https://togithub.com/peter-evans/create-or-update-comment/pull/304) - build(deps-dev): bump prettier from 3.2.3 to 3.2.4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/305](https://togithub.com/peter-evans/create-or-update-comment/pull/305) - feat: update runtime to node 20 by [@​peter-evans](https://togithub.com/peter-evans) in [https://github.com/peter-evans/create-or-update-comment/pull/306](https://togithub.com/peter-evans/create-or-update-comment/pull/306) **Full Changelog**: peter-evans/create-or-update-comment@v3.1.0...v4.0.0 ### [`v3.1.0`](https://togithub.com/peter-evans/create-or-update-comment/releases/tag/v3.1.0): Create or Update Comment v3.1.0 [Compare Source](https://togithub.com/peter-evans/create-or-update-comment/compare/v3.0.2...v3.1.0) #### What's Changed - Add truncate warning to body of comment by [@​ethanmdavidson](https://togithub.com/ethanmdavidson) and [@​peter-evans](https://togithub.com/peter-evans) in [https://github.com/peter-evans/create-or-update-comment/pull/272](https://togithub.com/peter-evans/create-or-update-comment/pull/272) - 46 dependency updates by [@​dependabot](https://togithub.com/dependabot) **Full Changelog**: peter-evans/create-or-update-comment@v3.0.2...v3.1.0 ### [`v3.0.2`](https://togithub.com/peter-evans/create-or-update-comment/releases/tag/v3.0.2): Create or Update Comment v3.0.2 [Compare Source](https://togithub.com/peter-evans/create-or-update-comment/compare/v3.0.1...v3.0.2) #### What's Changed - Truncate long comment bodies during comment update too by [@​Dermah](https://togithub.com/Dermah) in [https://github.com/peter-evans/create-or-update-comment/pull/205](https://togithub.com/peter-evans/create-or-update-comment/pull/205) - Update distribution by [@​actions-bot](https://togithub.com/actions-bot) in [https://github.com/peter-evans/create-or-update-comment/pull/210](https://togithub.com/peter-evans/create-or-update-comment/pull/210) - 23 dependency updates by [@​dependabot](https://togithub.com/dependabot) #### New Contributors - [@​Dermah](https://togithub.com/Dermah) made their first contribution in [https://github.com/peter-evans/create-or-update-comment/pull/205](https://togithub.com/peter-evans/create-or-update-comment/pull/205) **Full Changelog**: peter-evans/create-or-update-comment@v3.0.1...v3.0.2 ### [`v3.0.1`](https://togithub.com/peter-evans/create-or-update-comment/releases/tag/v3.0.1): Create or Update Comment v3.0.1 [Compare Source](https://togithub.com/peter-evans/create-or-update-comment/compare/v3.0.0...v3.0.1) #### What's Changed - fix: find-comment version by [@​ematipico](https://togithub.com/ematipico) in [https://github.com/peter-evans/create-or-update-comment/pull/164](https://togithub.com/peter-evans/create-or-update-comment/pull/164) - fix: truncate body when it exceeds the max length by [@​peter-evans](https://togithub.com/peter-evans) in [https://github.com/peter-evans/create-or-update-comment/pull/182](https://togithub.com/peter-evans/create-or-update-comment/pull/182) - 12 dependency updates by [@​dependabot](https://togithub.com/dependabot) #### New Contributors - [@​ematipico](https://togithub.com/ematipico) made their first contribution in [https://github.com/peter-evans/create-or-update-comment/pull/164](https://togithub.com/peter-evans/create-or-update-comment/pull/164) **Full Changelog**: peter-evans/create-or-update-comment@v3.0.0...v3.0.1 ### [`v3.0.0`](https://togithub.com/peter-evans/create-or-update-comment/releases/tag/v3.0.0): Create or Update Comment v3.0.0 [Compare Source](https://togithub.com/peter-evans/create-or-update-comment/compare/v2.1.1...v3.0.0) #### What's new - Now supports replacing reactions on a comment by setting input `reactions-edit-mode` to `replace`. The default behaviour has not changed and will `append` reactions. - Chose how the action should append the comment body with input `append-separator`. The default behaviour is to add a `newline`. Other options are `space` and `none`. - `body-file` is deprecated in favour of `body-path`. The behaviour is unchanged. #### What's Changed - v3 by [@​peter-evans](https://togithub.com/peter-evans) in [https://github.com/peter-evans/create-or-update-comment/pull/161](https://togithub.com/peter-evans/create-or-update-comment/pull/161) - Update some links in the README by [@​Kurt-von-Laven](https://togithub.com/Kurt-von-Laven) in [https://github.com/peter-evans/create-or-update-comment/pull/152](https://togithub.com/peter-evans/create-or-update-comment/pull/152) - 9 dependency updates by [@​dependabot](https://togithub.com/dependabot) #### New Contributors - [@​Kurt-von-Laven](https://togithub.com/Kurt-von-Laven) made their first contribution in [https://github.com/peter-evans/create-or-update-comment/pull/152](https://togithub.com/peter-evans/create-or-update-comment/pull/152) **Full Changelog**: peter-evans/create-or-update-comment@v2.1.1...v3.0.0 ### [`v2.1.1`](https://togithub.com/peter-evans/create-or-update-comment/releases/tag/v2.1.1): Create or Update Comment v2.1.1 [Compare Source](https://togithub.com/peter-evans/create-or-update-comment/compare/v2.1.0...v2.1.1) ⚙️ Fixes the recent Json5 vulnerability. #### What's Changed - 11 dependency updates by [@​dependabot](https://togithub.com/dependabot) **Full Changelog**: peter-evans/create-or-update-comment@v2.1.0...v2.1.1 ### [`v2.1.0`](https://togithub.com/peter-evans/create-or-update-comment/releases/tag/v2.1.0): Create or Update Comment v2.1.0 [Compare Source](https://togithub.com/peter-evans/create-or-update-comment/compare/v2.0.1...v2.1.0) ⭐ Adds input `body-file`, the path to a file containing the comment body. #### What's Changed - Replace set-output by [@​peter-evans](https://togithub.com/peter-evans) in [https://github.com/peter-evans/create-or-update-comment/pull/130](https://togithub.com/peter-evans/create-or-update-comment/pull/130) - Bump chuhlomin/render-template from 1.5 to 1.6 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/peter-evans/create-or-update-comment/pull/132](https://togithub.com/peter-evans/create-or-update-comment/pull/132) - Support reading body from a file by [@​umanghome](https://togithub.com/umanghome) in [https://github.com/peter-evans/create-or-update-comment/pull/115](https://togithub.com/peter-evans/create-or-update-comment/pull/115) - Add input body-file by [@​peter-evans](https://togithub.com/peter-evans) in [https://github.com/peter-evans/create-or-update-comment/pull/133](https://togithub.com/peter-evans/create-or-update-comment/pull/133) #### New Contributors - [@​umanghome](https://togithub.com/umanghome) made their first contribution in [https://github.com/peter-evans/create-or-update-comment/pull/115](https://togithub.com/peter-evans/create-or-update-comment/pull/115) **Full Changelog**: peter-evans/create-or-update-comment@v2.0.1...v2.1.0 ### [`v2.0.1`](https://togithub.com/peter-evans/create-or-update-comment/releases/tag/v2.0.1): Create or Update Comment v2.0.1 [Compare Source](https://togithub.com/peter-evans/create-or-update-comment/compare/v2.0.0...v2.0.1) ⚙️ Bumps `@actions/core` to transition away from [deprecated runner commands](https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/). #### What's Changed - Add workflow permissions by [@​peter-evans](https://togithub.com/peter-evans) in [https://github.com/peter-evans/create-or-update-comment/pull/120](https://togithub.com/peter-evans/create-or-update-comment/pull/120) - 9 dependency updates by [@​github-actions](https://togithub.com/github-actions) and https://github.com/dependabot **Full Changelog**: peter-evans/create-or-update-comment@v2.0.0...v2.0.1 ### [`v2.0.0`](https://togithub.com/peter-evans/create-or-update-comment/releases/tag/v2.0.0): Create or Update Comment v2.0.0 [Compare Source](https://togithub.com/peter-evans/create-or-update-comment/compare/v1.4.5...v2.0.0) #### What's new - Updated runtime to Node.js 16 - The action now requires a minimum version of v2.285.0 for the [Actions Runner](https://togithub.com/actions/runner/releases/tag/v2.285.0). - If using GitHub Enterprise Server, the action requires [GHES 3.4](https://docs.github.com/en/enterprise-server@3.4/admin/release-notes) or later. #### What's Changed - Use double quotes to preserve adjacent spaces correctly by [@​mfn](https://togithub.com/mfn) in [https://github.com/peter-evans/create-or-update-comment/pull/95](https://togithub.com/peter-evans/create-or-update-comment/pull/95) - Remove workflow by [@​peter-evans](https://togithub.com/peter-evans) in [https://github.com/peter-evans/create-or-update-comment/pull/101](https://togithub.com/peter-evans/create-or-update-comment/pull/101) - Update runtime to node 16 by [@​peter-evans](https://togithub.com/peter-evans) in [https://github.com/peter-evans/create-or-update-comment/pull/105](https://togithub.com/peter-evans/create-or-update-comment/pull/105) - 7 dependency updates by [@​actions-bot](https://togithub.com/actions-bot) and [@​dependabot](https://togithub.com/dependabot) #### New Contributors - [@​mfn](https://togithub.com/mfn) made their first contribution in [https://github.com/peter-evans/create-or-update-comment/pull/95](https://togithub.com/peter-evans/create-or-update-comment/pull/95) **Full Changelog**: peter-evans/create-or-update-comment@v1.4.5...v2.0.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/rolldown-rs/rolldown). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIzMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Ran into an issue where the body stored in the environment variable was throwing an error saying
Error: Argument list too long
(similar to #96).Added support for
file
andfileEncoding
arguments which can be passed in order to allow accessing the body directly from files, bypassing the need to store the body as a variable and escaping it. This also removes the restriction of the body content being too long to be supported bysh
.