-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Relates to #25 (comment)
It'd be good to be able to customise the text of the comment left by the action.
I figure it should be possible to let the user pass a string argument which can be used as the message for the marocchino/sticky-pull-request-comment step, with the current message string being the default argument.
The user could be able to use this argument to opt-out of the comment, e.g. it could skip the step if the comment is false or if it's an empty string. That behaviour might even make it possible for the user to change whether or not they want to post a comment based on various conditions. Possible use case: user wants to use their own comment/notification mechanism.
I was initially worried about code injection (https://docs.github.com/en/enterprise-cloud@latest/actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections), given that I'd have to pass a string containing variables to be interpolated, but I don't think this is actually a problem at all because the user will write that string in their workflow file and the variables will be interpolated there.
I'm not clear on how to get env variables into the string that will only be known at runtime, though (e.g. ${{ env.pagesurl }} in the current string. Might Just Work with no changes needed, might need some thought.