Publish a package based on a PR comment
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
No se nombran archivos ni pruebas. Empieza evaluando el desencadenador de comentarios de GitHub y los permisos del workflow; después, sigue la consulta de metadatos de Octokit propuesta, el checkout del head-ref del fork, el comando de build y el punto de entrada npx pkg-pr-new publish. La tarea estará terminada cuando se publique en el comentario una URL de instalación segura y compartible para los repositorios compatibles.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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: https://github.com/colinhacks/zod/pull/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
mmkalnotcolinhacks) - 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:
@pkg-pr-new publish
build: yarn install && yarn build
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?
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.9k
- Forks
- 130
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 6
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de stackblitz-labs/pkg.pr.new
-
A preview build is labelled with the head sha but built from the merge ref, and nothing says soAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
stackblitz-labs/pkg.pr.new#557 · 1 comentario · 1 reacción ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
stackblitz-labs/pkg.pr.new#531 · 2 comentarios ·
-
--template does not resolve pnpm catalog: references before uploading to StackBlitzPosiblemente ocupada @kunalgoesbyken la tomó hace 5 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
stackblitz-labs/pkg.pr.new#489 · 1 comentario · 1 reacción ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
stackblitz-labs/pkg.pr.new#482 · 1 reacción ·
-
Abstract CLI From FunctionalityAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
stackblitz-labs/pkg.pr.new#343 · 1 comentario ·
Todos los issues de stackblitz-labs/pkg.pr.new
Issues similares
-
bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Export the Hemi Earn Router address and the Router and Agent ABIs from `@vetro-protocol/earn`Abiertohemi-earn
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
vetro-protocol/vetro-monorepo#1043 ·
Los mantenedores suelen responder en 1 día
-
stage 2: bare names resolve against PATH differently from the shell (empty and relative entries)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
STRML/omp-classifier#206 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
atlassian-labs/mermaid-diagrams-viewer#188 ·
Los mantenedores suelen responder en 1 día
-
dashboard enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Olanetsoft/agent-lookout#225 ·
Los mantenedores suelen responder en 1 día