About reviewing pull requests
It's best to review changes in a pull request one file at a time:
- Examine each individual file changed in the pull request.
- Leave comments on specific changes.
- After reviewing a file, mark it as Viewed to collapse it and track your progress.
- The progress bar in the pull request header shows how many files you've viewed.
- When you've finished, you can approve the pull request or request changes by submitting your review with a summary comment.
Understanding the purpose of the pull request
Understanding the motivation behind a pull request helps you keep your review targeted and meaningful. It also helps you provide feedback that aligns with the pull request author’s intent and the project's goals.
You have several options to better understand the context and rationale for proposed changes.
Using the pull request sidebar for context
In the pull request sidebar, you can find valuable context, including:
- Linked issues or discussions: Review these to understand the problems or goals that the pull request aims to address. You can also gather information about background, design decisions, or current debates.
- Linked projects or milestones: Review how this pull request fits within larger projects or upcoming releases.
Use this information to frame your review and check if the goals of the pull request align with the original intent.
Using Chat de Copiloto to understand the rationale
You can ask Chat de Copiloto for help understanding the pull request’s intent or clarifying any part of the change.
-
At the top right of the pull request page, click the button next to the search bar.
Chat de Copiloto is displayed, with the pull request attached as context to the prompt window.
-
In the prompt box, type a question and press Enter. For example, you could enter:
What problem does this pull request solve?Why were these changes needed?Summarize the goals of this PR based on the linked issue.How does this PR relate to issue ISSUE-URL?
Chat de Copiloto can help you clarify the bigger picture before you start line-level review.
Starting a review
-
En el nombre del repositorio, haz clic en Pull requests.

-
En la lista de solicitudes de incorporación de cambios, haga clic en la que quiera revisar.
-
En la solicitud de incorporación de cambios, haz clic en Archivos cambiados.
To change the format of the diff view in this tab, click and choose the unified or split view. The choice you make will apply when you view the diff for other pull requests.

You can also hide whitespace differences. The choice you make only applies to this pull request and will be remembered the next time you visit this page.
-
Optionally, filter the files to show only the files you want to review or use the file tree to navigate to a specific file.
-
Mantén el puntero sobre la línea de código donde quieres agregar un comentario y haz clic en el icono de comentario azul.

-
Opcionalmente, puede agregar un comentario en varias líneas. Para seleccionar un intervalo de líneas, haga clic en el número de línea de la primera línea en la que desea comentar y, a continuación, arrastre hacia abajo hasta la línea final o mantenga presionada la tecla Mayús y haga clic en el último número de línea. A continuación, puede hacer clic en el icono de comentario azul de la última línea en la que desea comentar. Como alternativa, puede hacer clic en el icono de comentario azul situado junto a la primera línea sobre la que desea comentar y, a continuación, arrastrarla hacia abajo hasta la última línea sobre la que desea comentar.
-
Teclea tu comentario en el campo de comentario.
-
Opcionalmente, para sugerir un cambio específico en una o varias líneas, haz clic en y, luego, edita el texto dentro del bloque de sugerencias.

-
Para comentar directamente un archivo, a la derecha de este, haz clic en y escribe el comentario.

-
When you're done, click Start a review. If you have already started a review, you can click Add review comment.
Before you submit your review, your line comments are pending and only visible to you. You can edit pending comments anytime before you submit your review. To cancel a pending review, including all of its pending comments, click Review changes, then click Abandon review.

Reviewing dependency changes
If the pull request contains changes to dependencies, you can use the dependency review for a manifest or lock file to see what has changed. You can also check whether the changes introduce security vulnerabilities. See Reviewing dependency changes in a pull request.
-
En la solicitud de incorporación de cambios, haz clic en Archivos cambiados.

-
On the right of the header for a manifest or lock file, display the dependency review by clicking the rich diff button.

-
Puede que también quieras revisar el diff origen, ya que podría haber cambios en el archivo de bloqueo o de manifiesto que no cambian de dependencia o podrían haber dependencias que GitHub no puede procesar, las cuales, como resultado, no aparecen en la revisión de dependencias.
Para regresar a la vista de diferencias de origen, haz clic en el botón .

Marking a file as viewed
After you finish reviewing a file, you can mark the file as viewed. The file will collapse. If the file changes after you view the file, it will be unmarked as viewed.
-
En la solicitud de incorporación de cambios, haz clic en Archivos cambiados.

-
On the right of the header of the file you've finished reviewing, select Viewed.

Submitting your review
After you've finished reviewing all the files you want in the pull request, submit your review.
-
En la solicitud de incorporación de cambios, haz clic en Archivos cambiados.

-
Encima del código cambiado, haga clic en Revisar cambios.

-
Teclea un comentario que resuma tu retroalimentación sobre los cambios propuestos.
-
Select the type of review you'd like to leave:
- Select Comment to leave general feedback without explicitly approving the changes or requesting additional changes.
- Select Approve to submit your feedback and approve merging the changes proposed in the pull request.
- Select Request changes to submit feedback that must be addressed before the pull request can be merged.
-
Haga clic en Enviar revisión.
Sugerencia
- La opción Solicitud de cambios es puramente informativa y no impedirá la combinación a menos que se configure un conjunto de reglas o una regla de protección de rama clásica con la opción "requerir una solicitud de incorporación de cambios". Si está configurada y un colaborador con acceso de
admin,ownerowriteal repositorio envía una revisión de solicitud de cambios, la solicitud de incorporación de cambios no se puede combinar hasta que el mismo colaborador envíe otra revisión en la que se aprueben las modificaciones en la solicitud de incorporación de cambios. - Los propietarios y administradores del repositorio pueden fusionar una solicitud de extracción, incluso si no recibió una revisión de aprobación o si un revisor que solicitó modificaciones abandonó la organización o no está disponible.
- Si están habilitadas las revisiones requeridas y el descarte de una revisión en espera, y se sube una confirmación de modificación de código a la rama de una solicitud de extracción aprobada, se descarta la aprobación. La solicitud de extracción se debe volver a revisar y aprobar antes de que se pueda fusionar.
- Cuando varias solicitudes de extracción abiertas tienen una rama de encabezado que apunta a la misma confirmación, no podrás fusionarlas si una o ambas tienen una revisión pendiente o rechazada.
- Los autores de solicitudes de cambios no pueden aprobar las suyas propias.