You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, loving pkg.pr.new so far! Has saved so much time fiddling already.
As discussed a bit via DM with @Aslemammad, I'm making an issue for the for-now pretty vague want I have of being able to publish a package based on my PRs, on other people's repos, even without them having pkg.pr.new installed.
Let's say I have a PR on someone else's repo that doesn't use pkg.pr.new (yet). Example: colinhacks/zod#3646. It would be great to still be able to get an easy shareable npm install ... command so that people can kick the tires on my proposal in their downstream projects, even without any interaction from the maintainer.
Since the PR is using my fork under mmkal, rather than colinhacks, and I have the pkg.pr.new GitHub app installed, in theory it may be possible for me to have a kind of shadow repo with an action which:
Is triggered by an @ comment on GitHub
receives the pull request URL for the comment
uses the octokit API to get pull request metadata
uses a GitHub actions workflow (defined... somewhere) to clone the head ref on the pull-request-creator's fork (i.e. in the above example the owner is mmkal not colinhacks)
runs a build command specified in the comment?
runs npx pkg-pr-new publish
replies to the comment with the URL
So in the above example, all I'd need to do to get an installable version of zod with my new feature would be to leave a comment along the lines of:
Several parts of this might be tricky or impossible, including triggering via an @ comment on someone else's repo, figuring out where exactly to define this GitHub Actions workflow so that it has the necessary permissions, and also the best way to share a build command (like npm run build, but would vary by project) via a comment.
There would also be lots of repos with complex setups that this wouldn't work for, but that's probably fine to start with.
Also would need to be careful that it's only possible for mmkal to trigger an action in mmkal's GitHub org to make sure nothing unsafe happens.
But it feels like most of this should be possible? What do you think?
The text was updated successfully, but these errors were encountered:
Definitely true, but usually this would be needed on repos that have unresponsive maintainers, or who don't want to use pkg.pr.new for some reason. Adding it to the target repo on top of whatever change is actually proposed requires persuading the owners to add two things now!
Hello, loving pkg.pr.new so far! Has saved so much time fiddling already.
As discussed a bit via DM with @Aslemammad, I'm making an issue for the for-now pretty vague want I have of being able to publish a package based on my PRs, on other people's repos, even without them having pkg.pr.new installed.
Let's say I have a PR on someone else's repo that doesn't use pkg.pr.new (yet). Example: colinhacks/zod#3646. It would be great to still be able to get an easy shareable
npm install ...
command so that people can kick the tires on my proposal in their downstream projects, even without any interaction from the maintainer.Since the PR is using my fork under
mmkal
, rather thancolinhacks
, and I have the pkg.pr.new GitHub app installed, in theory it may be possible for me to have a kind of shadow repo with an action which:mmkal
notcolinhacks
)npx pkg-pr-new publish
So in the above example, all I'd need to do to get an installable version of zod with my new feature would be to leave a comment along the lines of:
Several parts of this might be tricky or impossible, including triggering via an @ comment on someone else's repo, figuring out where exactly to define this GitHub Actions workflow so that it has the necessary permissions, and also the best way to share a build command (like
npm run build
, but would vary by project) via a comment.There would also be lots of repos with complex setups that this wouldn't work for, but that's probably fine to start with.
Also would need to be careful that it's only possible for
mmkal
to trigger an action inmmkal
's GitHub org to make sure nothing unsafe happens.But it feels like most of this should be possible? What do you think?
The text was updated successfully, but these errors were encountered: