# Generate a PR

**Generate a PR** turns a recommendation into a pull request.
DBGorilla writes the change to a branch in the GitHub repository linked to the database and opens a
pull request.
DBGorilla does not merge the pull request.

:::note[How this page was verified]

Verified against production on 29 October 2026, using pull requests the DBGorilla GitHub App opened
from recommendations.  That covers the branch, the account that opened the pull request, its title
and description, and that it stayed unmerged.  Staging was not tested because it has no GitHub App.
The button's behaviour while a pull request is being generated has not been verified.

:::

The button is on a recommendation's page, next to **Complete** and **Ignore**.

## Turn it on

Link a GitHub repository to the database first.
[GitHub pull request reviews](/docs/integrations/github-pull-request-reviews/) covers installing the
DBGorilla GitHub App, connecting it to your workspace and linking the repository.

The button remains disabled until a repository is linked.
Hovering over it shows "Connect a GitHub repository to this component first."

Owner, Admin, Analyst and Developer can all use it.

## Generate a pull request

1. Open the component and choose **Advisor**.
2. Open a recommendation.
3. Choose **Generate a PR**.

The button disappears once DBGorilla starts generating the pull request.
If generation fails, the button comes back so you can try again.

The branch is named `dbgorilla/recommendation-` followed by the recommendation's number.
The DBGorilla GitHub App opens the pull request.  GitHub shows the App as `dbgorilla[bot]`, and the same account authors the commit.
The pull request is titled with the commit's subject line.
Its description links back to the recommendation, so you can review the evidence and reasoning.

## Review and merge it

Review the pull request as you would any other change.
Read the diff, let your checks run, and merge it when you are satisfied.
DBGorilla reviews it like any other pull request, so its summary comment and the **DBGorilla Review** status appear on it.

## Related

- [Pull request reviews](/docs/integrations/pull-request-reviews/): what the review on the pull request contains.
- [GitHub pull request reviews](/docs/integrations/github-pull-request-reviews/): install the App and
  link a repository.
- [Security FAQ](/docs/security/faq/): what DBGorilla can do in your repositories.