> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datazone.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Pull Requests

> Review changes before they reach a branch: request reviewers, approve or request changes, and get an automatic review from Orion

# Pull Requests

A pull request proposes merging the changes on one branch of the [project repository](https://docs.datazone.co/reference/development/project.md) into another. Reviewers **approve** it or **request changes**, **Orion** reviews the diff automatically, and anyone who can write to the target branch merges it.

On a project's **Code** page, open the **Pull Requests** panel on the right to see the project's pull requests or create one.

![Pull Requests panel on the Code page](https://mintcdn.com/datazone/q7RQnBRIsRS138Ui/images/light/pull-request/pr-panel.png?fit=max\&auto=format\&n=q7RQnBRIsRS138Ui\&q=85\&s=e6e45b8202a2001c65b0186bf6bbd858)

## Creating a Pull Request

Click **Create Pull Request** and fill in:

| Field | Description |
| - | - |
| **Title** | A short summary of the change |
| **Description** | Optional, in Markdown |
| **Source Branch** | The branch with your changes |
| **Target Branch** | The branch to merge into |
| **Reviewers** | Who should review. Only members who can write to the target branch are listed |

![Create Pull Request dialog](https://mintcdn.com/datazone/q7RQnBRIsRS138Ui/images/light/pull-request/pr-create.png?fit=max\&auto=format\&n=q7RQnBRIsRS138Ui\&q=85\&s=50863f49b218d740a3c437de305f8d2a)

Requested reviewers get a notification, and Orion starts reviewing the changes.

## Reviewing

Reviewers open the pull request, check the **Files Changed** tab, and choose **Approve** or **Request changes**, with an optional comment. The author gets a notification either way.

![Files Changed tab of a pull request](https://mintcdn.com/datazone/q7RQnBRIsRS138Ui/images/light/pull-request/pr-files.png?fit=max\&auto=format\&n=q7RQnBRIsRS138Ui\&q=85\&s=3174032b1208d6bcc116f596e6866e76)

* A reviewer must be able to **write to the target branch**, since the same permission merges it. Anyone who can write to it may review, even if nobody requested them.
* The author cannot review their own pull request.
* Reviewers can be added or removed while the pull request is open.

An approval is given on a specific commit. When new commits are pushed to the source branch, the approval is marked **Outdated** and the reviewer is notified to review again.

## Merging

Anyone who can write to the target branch can merge, including the author. Approvals are not required: **Merge** is enabled when all of these are true:

* The pull request is open
* The branches have no conflicts
* No reviewer has requested changes. A reviewer who did must approve before the pull request can be merged, or be removed

When something is missing, the merge box says what. **Close** closes the pull request without merging.

![Reviewers and the merge box](https://mintcdn.com/datazone/q7RQnBRIsRS138Ui/images/light/pull-request/pr-merge.png?fit=max\&auto=format\&n=q7RQnBRIsRS138Ui\&q=85\&s=b92940d2683351c5e8f70a78bfb5c76c)

## Orion Review

When a pull request is created, Orion reads its diff and writes a **summary** and up to 10 **findings**, each pointing at a file and line with a severity: **Info**, **Warning** or **Critical**. The author is notified when the review is ready.

![Orion review with a summary and a finding](https://mintcdn.com/datazone/q7RQnBRIsRS138Ui/images/light/pull-request/pr-orion-review.png?fit=max\&auto=format\&n=q7RQnBRIsRS138Ui\&q=85\&s=0c9c2d0ddc215ba6a4e1c1fb8a74e6f2)

Orion's review is **advisory**: it never counts as an approval. It is not repeated automatically on new commits; the review then shows **Older commit**, and **Re-run** reviews the latest changes.

Orion uses the model set in **Settings → Orion AI → Default Configurations → Pull Request Review**, or the organisation's default model when nothing is set there. Without a model, or when the pull request changes nothing, the review is skipped.

## Notifications

The **bell** in the top bar lists what needs your attention: review requests, approvals and change requests on your pull requests, approvals outdated by new commits, merges, closes, and finished Orion reviews. **Mark all as read** clears it.

![Notifications in the top bar](https://mintcdn.com/datazone/q7RQnBRIsRS138Ui/images/light/pull-request/pr-notifications.png?fit=max\&auto=format\&n=q7RQnBRIsRS138Ui\&q=85\&s=29d991a51d46c124f7e43aa03bcdc94a)

## Permissions

Pull requests follow the repository permissions in [Policy](https://docs.datazone.co/reference/development/policy.md#exceptional-actions), checked on the branches involved:

| Operation | Required permission |
| - | - |
| Create a pull request | `project:pr_create` on the target branch |
| View a pull request | `project:read_repository` on the source and target branches |
| Review or merge | `project:write_repository` on the target branch |
| Close, change reviewers, re-run Orion | The author, or `project:write_repository` on the target branch |

> [card] [Branch Protection](https://docs.datazone.co/reference/development/policy.md#branch-protection)
>
> Protect `main` so that every change reaches it through a reviewed pull request


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.