Skip to main content

Reviewing proposed changes in a pull request

Review commits, file changes, and diffs in pull requests to provide feedback, approve changes, or request updates before merging.

Tool navigation

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 공동 파일럿 채팅 to understand the rationale

You can ask 공동 파일럿 채팅 for help understanding the pull request’s intent or clarifying any part of the change.

  1. At the top right of the pull request page, click the button next to the search bar.

    공동 파일럿 채팅 is displayed, with the pull request attached as context to the prompt window.

  2. 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?

공동 파일럿 채팅 can help you clarify the bigger picture before you start line-level review.

Starting a review

  1. 리포지토리 이름에서 Pull requests를 클릭합니다.

    리포지토리의 기본 페이지  스크린샷 가로 탐색 모음에서 "끌어오기 요청"이라는 레이블이 있는 탭이 진한 주황색 윤곽선으로 표시되어 있습니다.

  2. 끌어오기 요청 목록에서 검토하려는 끌어오기 요청을 클릭합니다.

  3. 끌어오기 요청에서 파일 변경됨을 클릭합니다.

    끌어오기 요청 탭의 스크린샷. "변경된 파일" 탭이 진한 주황색으로 표시됩니다. 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.

    Screenshot of the "Files changed" tab for a pull request. The "Diff view" menu is outlined in dark orange.

    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.

  4. Optionally, filter the files to show only the files you want to review or use the file tree to navigate to a specific file.

  5. 설명을 추가할 코드 줄을 마우스로 가리키고 파란색 설명 아이콘을 클릭합니다.

    GitHub의 끌어오기 요청 스크린샷. 줄 번호 옆의 파란색 더하기 아이콘이 주황색 윤곽선으로 강조 표시됩니다.

  6. 선택적으로 여러 줄에 설명을 추가할 수 있습니다. 줄 범위를 선택하려면 메모할 첫 번째 줄의 줄 번호를 클릭한 다음 마지막 줄로 끌어다 놓거나 Shift 키를 누 채 마지막 줄 번호를 클릭합니다. 그런 다음 메모할 마지막 줄에서 파란색 메모 아이콘을 클릭할 수 있습니다. 또는 설명을 추가할 첫 번째 줄 옆에 있는 파란색 메모 아이콘을 클릭한 다음, 설명을 추가할 마지막 줄로 끌어다 놓을 수 있습니다.

  7. 주석 필드에 주석을 입력합니다.

  8. 필요에 따라 줄에 대한 특정 변경을 제안하려면 을 클릭한 다음, 제안 블록 내에서 텍스트를 편집합니다.

    리뷰 메모 상자의 스크린샷. 특정 변경 사항을 제안하는 파일 Diff 아이콘이 진한 주황색으로 표시됩니다.

  9. 파일에 직접 메모를 달려면 파일 오른쪽에서 을(를) 클릭하고 메모를 입력합니다.

    끌어오기 요청의 "변경된 파일" 페이지에 있는 이미지 파일의 스크린샷. 파일 오른쪽에 주석 아이콘이 주황색으로 표시됩니다.

  10. 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.

Screenshot of the comment field for a review. The "Abandon review" button is outlined in dark orange.

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.

  1. 끌어오기 요청에서 파일 변경됨을 클릭합니다.

    끌어오기 요청 탭의 스크린샷. "변경된 파일" 탭이 진한 주황색으로 표시됩니다.

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

    Screenshot of the "Files changed" tab of a pull request. The button to display the rich diff, labeled with a file icon, is outlined in dark orange.

  3. 종속성을 변경하지 않는 매니페스트 또는 잠금 파일이 변경되거나, GitHub가 구문 분석할 수 없고 결과적으로 종속성 검토에 표시되지 않는 종속성이 있을 수 있으므로 원본 diff도 검토할 수 있습니다.

    원본 diff 보기로 돌아가려면 단추를 클릭합니다.

    끌어오기 요청의 "파일 변경됨" 탭 스크린샷 코드 아이콘과 함께 표시되는 원본 Diff 표시 단추가 주황색 윤곽선으로 표시됩니다.

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.

  1. 끌어오기 요청에서 파일 변경됨을 클릭합니다.

    끌어오기 요청 탭의 스크린샷. "변경된 파일" 탭이 진한 주황색으로 표시됩니다.

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

    Screenshot of the header of a file. The "Viewed" option is outlined in dark orange.

Submitting your review

After you've finished reviewing all the files you want in the pull request, submit your review.

  1. 끌어오기 요청에서 파일 변경됨을 클릭합니다.

    끌어오기 요청 탭의 스크린샷. "변경된 파일" 탭이 진한 주황색으로 표시됩니다.

  2. 변경된 코드 위에서 변경 내용 검토를 클릭합니다.

    끌어오기 요청의 "파일 변경됨" 탭 스크린샷 "변경 내용" 단추가 진한 주황색 윤곽선으로 표시되어 있습니다.

  3. 제안된 변경 내용에 대한 피드백을 요약한 설명을 입력합니다.

  4. 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.
  5. 리뷰 제출을 클릭합니다.

  • 변경 요청 옵션은 정보 제공용으로만 제공되며, 규칙 집합이나 기존 분기 보호 규칙이 ‘끌어오기 요청 필요’ 옵션으로 설정되지 않은 경우 병합을 막지 않습니다. 구성 후 리포지토리에 admin, owner 또는 write 액세스 권한을 가진 협력자가 변경을 요청하는 검토를 제출하면, 동일한 협력자가 풀 리퀘스트의 변경 사항을 승인하는 다른 검토를 제출할 때까지 해당 풀 리퀘스트를 병합할 수 없습니다.
  • 리포지토리 소유자 및 관리자는 승인 검토를 받지 못했거나, 변경을 요청한 검토자가 조직을 떠났거나 연락할 수 없는 경우에도 끌어오기 요청을 병합할 수 있습니다.
  • 필요한 검토 및 부실 검토 해제를 모두 사용하고 코드 수정 커밋을 승인된 끌어오기 요청의 분기에 푸시하면 승인이 해제됩니다. 끌어오기 요청은 병합하기 전에 다시 검토하고 승인해야 합니다.
  • 열려 있는 여러 끌어오기 요청에 각각 동일한 커밋을 가리키는 헤드 분기가 있을 때 하나의 끌어오기 요청 또는 둘 다에 보류 중이거나 거부된 검토가 있는 경우 병합할 수 없습니다.
  • 끌어오기 요청 작성자는 본인이 생성한 끌어오기 요청을 승인할 수 없습니다.

Further reading