peter-evans / create-or-update-comment

A GitHub action to create or update an issue or pull request comment
MIT License
684 stars 113 forks source link

Feature Request: Publish to npm #317

Closed dr3 closed 7 months ago

dr3 commented 7 months ago

Thanks for great repo!

I have a custom JS action where I want to have commenting functionality, would you consider publishing this repo to NPM?

That way I can call createOrUpdateComment util function directly, rather than having to push values to the env before commenting via the action

Happy to publish a fork myself if you dont want to, but of course would prefer you retained the control over it!

peter-evans commented 7 months ago

Hi @dr3

Not sure if I want to support using this as a library. It would likely need some refactoring to make it work nicely, plus some custom packaging to remove main.ts and the main() call.

My suggestion would be to go ahead and make the fork. Once you have it working, if you show me the fork I'll take a look at the changes and see if I want to make them here and support it. What do you think?

dr3 commented 7 months ago

Thats fair @peter-evans!

On reflection I think npm publishing would be useful with the addition of a method to find comment with matching identifier, if exists edit/delete, else create. However for now I think best to close this issue, cheers though!