What is a Pull Request? - Definition & Meaning
A pull request (PR) is a request to merge code changes into the main branch after team review. Learn how pull requests work.
Definition
A pull request (PR), also called a merge request, is a mechanism in version control systems where a developer proposes merging code changes from a feature branch into the main branch. Before the merge takes place, team members review the changes and automated checks are executed.
Technical Explanation
Pull requests contain a diff that shows the exact changes compared to the target branch. CI/CD pipelines are automatically triggered when a PR is opened or updated, running tests, linting, and build checks. Reviewers can place inline comments on specific code lines. Branch protection rules enforce that PRs require a minimum number of approvals and that all checks pass before merging is allowed. Merge strategies include merge commit, squash merge, and rebase merge, each with their own pros and cons for git history.
How Refront Uses This
Refront automatically links pull requests to tickets via branch naming conventions and GitHub integration. When an AI agent picks up a task through Cursor, a feature branch is created and a PR is opened upon completion. The PR status is visible in real-time in the ticket overview, allowing project managers to track progress.
Examples
- •A developer opens a pull request with three new components and asks two colleagues for a review.
- •The CI pipeline blocks the merge because a unit test fails, requiring the developer to fix the error first.
- •An AI agent automatically opens a PR with a bugfix after analyzing the ticket description.
Related Terms
Frequently Asked Questions
What is the difference between a pull request and a merge request?
They are functionally identical. GitHub uses the term "pull request," while GitLab uses "merge request." Both refer to the request to merge code changes after review.
How large should a pull request be?
Smaller PRs (fewer than 400 lines) are easier to review and lead to faster feedback. Large PRs increase the risk of missed bugs and slow down the review process. Split large work into multiple smaller PRs.
When should you close a pull request without merging?
A PR can be closed when the approach is outdated, the feature is no longer needed, or when it is better to start fresh. It is good practice to document a reason when closing.
Ready to get started?
Try Refront for free and discover how AI automates your workflow.