Skip to Content
Native GitPull Request and Review

Working with Pull Requests

Pull requests are essential features in Git workflows, used to merge features or bug fixes between branches while enforcing review processes. They represent the cornerstone of collaboration in Git-based development. APIGit provides a GitHub-like experience for managing pull requests.

Accessing Pull Requests

Global Pull Request View

Click Pull Requests in the top bar to review pull requests across your repositories. The list on the left filters them: In your repositories, Assigned to you, Created by you, Review requested and Reviewed by you. Switch between Open and Closed at the top.

Global Pull Requests list with its filters and two open pull requests

Repository-Specific Pull Requests

When working within a specific API repository, navigate to the repository’s Pull Requests tab to see pull requests specific to that repository.

Pull Requests tab of a repository with the Labels and New pull request buttons

Creating a Pull Request

  1. Click the New pull request button in the upper right corner of the repository pull request list
  2. Choose the base branch, which receives the changes, and the compare branch, which holds them
  3. Enter a title and a description
  4. Check the commits and files of the comparison in the tabs at the bottom of the page
  5. Click Create Pull Request

Create pull request page comparing docs/webhooks with main

Collaborating on Pull Requests

When you click on a pull request, you’ll enter its detail page where you can:

  • Discuss through the Conversation tab
  • Request reviewers and set assignees
  • Add labels to categorize the request
  • Review commits included in the pull request
  • Examine file changes through diffs
  • Approve the pull request, request changes, or merge it

The tabs are Conversation, Commits, Governance (organization repositories) and File Changed.

Discussion and Assignment

Under the Conversation tab, you can discuss any aspect of the pull request with your team.

Conversation tab with the description, timeline events and the Reviewers, Assignees and Labels panel

On the right side of the conversation panel, the Reviewers, Assignees and Labels sections each have a gear icon to change them. Each reviewer shows the state of their review. You can remove a pending review request, and resend a request to someone who has already reviewed.

Use the Close Pull Request button below the comment box to close a pull request without merging it, and Reopen to open it again.

Timeline

The conversation includes a timeline of what happened on the pull request: labels, assignees, review requests, reviews, title and target branch changes, closing and reopening, the merge and the deletion of the branch.

Pushes appear as well. A push shows added N commits with the list of commits, and a force push shows force-pushed from the old commit to the new one. Click a commit to see its diff.

Commit Review

Under the Commits tab, you can see all commits included in this pull request.

Commits tab listing two commits of a pull request

Governance Rules Check

Under the Governance tab, which is shown for organization repositories, you can review any API governance violations for the changed files.

Governance tab with the changed specification and its rule violations

File Changed Review

Under the File Changed tab, you can review all file changes included in the pull request. Select a file in the Changed Files tree, choose the Unified or Split layout, and tick Viewed to track your progress.

File Changed tab with the Changed Files tree, a diff and the Review Changes button

Submitting a Review

Click Review Changes in the upper right corner of the File Changed tab, write your review comments, choose one of the options, and click Submit review:

  • Comment: Submit general feedback without explicit approval
  • Approve: Submit feedback and approve merging these changes
  • Request Changes: Submit feedback that must be addressed before merging

Review Changes dialog with the Comment, Approve and Request Changes options

Merging a Pull Request

The merge box at the end of the Conversation tab shows whether the pull request can be merged.

Merge box listing three reasons a pull request is blocked: missing approvals, an out-of-date branch and a protected file

MessageMeaning
This pull request can be merged automatically.Choose a merge style, optionally edit the merge description, and merge.
Merging is blockedOne or more branch protection requirements are not met. Each blocker is listed.
Checking whether this pull request can be merged…The check is running. The box updates by itself.
The mergeability check failed.The server could not test the merge. This is usually temporary. Click Retry check.
This pull request can’t be merged automatically.The listed files have conflicts. Click View command line instructions for the steps to merge them locally.
Nothing to merge.The branch is already included in the target branch.
This pull request is closed.Reopen it to merge it.

A pull request can be blocked because it does not have enough approvals, an official reviewer requested changes, official review requests are still open, its branch is out of date, or it changes protected files.

The merge button is a split button. Its arrow selects the merge style from the styles allowed for the repository: Create merge commit, Rebase then fast-forward, Rebase then create merge commit, Create squash commit or Fast-forward only.

If the box says This branch is out-of-date with the base branch, update the branch with Update branch by merge or Update branch by rebase.

After the merge, the box offers Delete Branch to remove the source branch.

Advanced Configuration: Pull Request Settings

If you need to customize pull request behavior for different branches, you can do so in the repository’s settings.

Navigate to Settings → Branches to create branch protection rules, where you can configure:

  • Number of required approvals for pull requests
  • Who can approve and who can merge
  • When a merge is blocked
  • Who can push to the branch

Add Branch Protection Rule dialog

These settings allow you to enforce your team’s development and review standards throughout the pull request process.

Last updated on