Repository navigation
Asigna los issues a quien abre el PR que los cierra - #30
Merged
Merged
Conversation
A new workflow assigns each issue a PR closes ("Closes #12" or a link
from the PR sidebar) to whoever opened the PR. GitHub won't assign
someone without write access who hasn't taken part in the issue, so in
that case it asks them on the issue to leave a comment, and assigns them
when they do. It uses pull_request_target so it works for PRs from forks,
and never checks out the PR's code.
The PR template suggested "Cierra #123", which GitHub doesn't recognise
(#26 never got linked to #10); it now says "Closes #123".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué cambia
Asignación automática de issues. Cuando un PR cierra un issue (con
Closes #12en la descripción o enlazado desde la barra lateral del PR), el issue se asigna a quien ha abierto el PR. Así en la lista de issues se ve quién está con cada cosa.GitHub no deja asignar a alguien sin permiso de escritura que no haya participado en el issue: la API lo ignora sin avisar. En ese caso el bot deja un comentario en el issue pidiéndole que escriba algo, y en cuanto lo hace se lo asigna.
El workflow usa
pull_request_targetpara funcionar también con PRs desde forks. Es seguro porque nunca descarga ni ejecuta el código del PR: solo lee los datos del PR y del issue.Plantilla de PR. Decía «Cierra #123», pero GitHub solo entiende las palabras clave en inglés. Por eso #26 nunca quedó enlazado a #10. Ahora dice «Closes #123», y CONTRIBUTING lo explica.
Cómo lo he comprobado
pull_request_targetsolo corre desdemain, así que la primera prueba real será el siguiente PR que se abra después de fusionar este.