Skip to content
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

Allow comment message to show npx over npm add #263

Open
manuel3108 opened this issue Oct 17, 2024 · 2 comments
Open

Allow comment message to show npx over npm add #263

manuel3108 opened this issue Oct 17, 2024 · 2 comments

Comments

@manuel3108
Copy link

manuel3108 commented Oct 17, 2024

This comment always looks something like this:

npm add https://pkg.pr.new/repo/package@1

We are building a CLI, and would love to have an option to make the comment display

npx https://pkg.pr.new/repo/package@1
@Aslemammad
Copy link
Member

Ohhh, that's nice! That's why we added --json support.

What do you think of https://github.com/stackblitz-labs/pkg.pr.new?tab=readme-ov-file#custom-github-messages-and-comments ?

It's more boilerplate but that's how we've been able to provide more control for the users so they can implement based on their own edge cases! Sorry for the late response.

@manuel3108
Copy link
Author

Mhmm, that looks like a lot of boilerplate code that we need to copy over and maintain. Would it be possible that you publish some helper methods as part of pkg-pr-new that would dramatically simplify working the api?

Most of the code you linked in the example would probably be the same for 85% of the users, so I was wondering if it would be useful to have a common abstraction? I think the output.json that you suggested seems like the right way to consume the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants