Github Foundations · Free Practice Question Medium

Question 3

You are reviewing a pull request on GitHub. The changes introduced seem promising, but you've identified a few areas that need improvement. What actions can you take to effectively contribute to the code review process? (select three)

  • A

    indicate overall approval and readiness for merging

  • B

    request specific changes directly within the code

  • C

    comment on specific lines of code with detailed feedback

  • D

    provide suggestions for improvements before merging

Reveal correct answers

Correct answers: B, C, D

Explanation

You can comment on a pull request, approve the changes, or request improvements before approving.

You can review changes in a pull request one file at a time. While reviewing the files in a pull request, you can leave individual comments on specific changes. After you finish reviewing each file, you can mark the file as viewed. This collapses the file, helping you identify the files you still need to review. A progress bar in the pull request header shows the number of files you've viewed. After reviewing as many files as you want, you can approve the pull request or request additional changes by submitting your review with a summary comment.

********************

WRONG ANSWER:

  • While approving is a valid action, it is not suitable in this scenario where areas of improvement have been identified. Approving is more appropriate when you believe the changes are ready for merging without any concerns.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request

A. Indicating overall approval and readiness for merging without providing specific feedback or suggestions for improvement can lead to overlooking potential issues or missed opportunities for enhancement. It is essential to actively engage in the code review process by providing detailed feedback and requesting specific changes to ensure the quality of the codebase.

B. Requesting specific changes directly within the code helps communicate your expectations clearly to the author. By pointing out areas that need to be revised or improved, you guide the author in making the necessary modifications to meet the project's standards.

C. Commenting on specific lines of code with detailed feedback allows you to provide constructive criticism and suggestions for improvement directly within the context of the code changes. This helps the author understand the issues and make necessary adjustments.

D. Providing suggestions for improvements before merging ensures that any identified issues or areas for enhancement are addressed before the code is merged into the main branch. This proactive approach helps maintain code quality and prevents potential bugs or issues from being introduced.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need