CodeBlanks Logo Icon CodeBlanks

Summary - Code review

Combine the review flow to approve and merge a PR.

Combine the review workflow

Reviewing a Pull Request, adding inline comments, and approving changes are connected steps. First, you evaluate the code and leave feedback on the lines where necessary.

Review changes
Add inline comments
Approve Pull Request
Merge Pull Request

Once the review is complete and the required approvals are obtained, the PR can be merged.

Practice Complete the PR review

Create a pullRequest object. Set comment to "Add input validation", review to "approved", and status to "merged". Finally, print the merge status using console.log.

Starter code

terminal
const pullRequest = {
    // İnceleme ve birleştirme bilgilerini ekle
};

// Birleştirme durumunu yazdır

Sample solution

terminal
const pullRequest = {
    comment: "Add input validation",
    review: "approved",
    status: "merged"
};

console.log(pullRequest.status);

Expected output

merged

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 What is the next action after the review is complete and the required approvals are obtained?

  • Clone the repository again
  • Merge the PR Correct answer
  • Delete all commits
  • Create a new GitHub account

Explanation: Once the required reviews and approvals are complete, the Pull Request can be merged.

2 Combine the review result

Question
const pullRequest = {
    comment: "Looks good",
    review: "approved",
    status: "____"
};
Answer
const pullRequest = {
    comment: "Looks good",
    review: "approved",
    status: "merge_ready"
};

Explanation: An approved and reviewed PR is ready to be merged.

3 Actions in the review process

Term Meaning
Review Inspect code changes
Comment Add line feedback
Approve Accept the changes
Merge Integrate PR changes

All lessons in Intermediate

20 Intermediate final

  1. Branch management
  2. Rebase
  3. Conflict
  4. PR flow