What is a pull request, and what makes a good code review?
BeginnerConceptBranching, versioning & releases
Answer
In one line: A pull request (merge request in GitLab) is a request to merge changes from one branch into another, where teammates review the code and CI checks run before it's accepted.
What happens in a PR:
- The author pushes a branch and opens a PR with a description.
- CI runs automatically: build, tests, scans.
- Reviewers comment, ask questions and approve or request changes.
- The author updates the code.
- Once checks pass and approvals are given, the PR is merged (merge, squash or rebase).
What makes a good PR (author side):
- Small — ideally a few hundred lines at most; big PRs get shallow reviews.
- Clear description — what changed, why, how it was tested, screenshots or
terraform planoutput if relevant. - One purpose — don't mix a refactor, a feature and a dependency upgrade.
- Linked ticket for context.
What makes a good review (reviewer side):
- Check correctness, security, readability, tests, and operational impact (logging, config, rollback).
- For infrastructure PRs: read the
terraform plan— what will be created, changed or destroyed? - Be kind and specific: "This query runs inside a loop — could we fetch all rows once?" rather than "this is bad".
- Separate must-fix issues from optional suggestions ("nit:").
- Review quickly — a PR waiting two days slows the whole team.
Automation that helps:
- Branch protection: required reviews and passing checks.
CODEOWNERSto request the right reviewers automatically.- Linters and formatters, so humans don't argue about style.
Tip for interviews: mention small PRs, fast reviews and reviewing the Terraform plan for infra changes.