> ## Documentation Index
> Fetch the complete documentation index at: https://lightdash-06-24-docs-simplify-date-zoom-usage-description.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Pull requests

> Track the pull requests Lightdash opens in your dbt project from write-backs, the SQL runner, the source editor, and AI agents — including their live status, source, and author — all from one place in your project settings.

Whenever Lightdash writes changes back to your dbt project, it does so by opening a pull request (or merge request) in GitHub or GitLab. The **Pull requests** view in project settings collects all of these pull requests in one place, so you can see what's in flight, what's been merged, and where each change came from — without having to dig through your git provider.

<Info>
  * Pull requests are only available for dbt projects connected to **GitHub** or **GitLab**. The view is hidden if your project doesn't have a GitHub or GitLab integration.
  * You need to be at least a [`project Developer`](/references/workspace/roles) to view pull requests.
</Info>

## Accessing pull requests

To view the pull requests for your project:

1. Click on the `settings` icon in the navigation bar
2. Navigate to `project settings`
3. Select `pull requests` from the menu

The table lists every pull request Lightdash has opened for the project, newest first.

<Frame>
  <img src="https://mintcdn.com/lightdash-06-24-docs-simplify-date-zoom-usage-description/sfejEfp0hAJasybk/images/guides/developer/pull-requests.png?fit=max&auto=format&n=sfejEfp0hAJasybk&q=85&s=db98680b780edf6bbb6e52ad3fdfaec6" alt="The Pull requests table in project settings, showing each write-back pull request with its created time, user, title, source tag, state, and links" width="2356" height="1398" data-path="images/guides/developer/pull-requests.png" />
</Frame>

## Understanding the pull requests table

Each row represents a pull request Lightdash created on your behalf. The table shows:

* **State**: whether the pull request is `open`, `merged`, or `closed`. This status is fetched live from GitHub or GitLab, so it always reflects the current state of the pull request — even if it was merged or closed outside of Lightdash.
* **Created**: when Lightdash opened the pull request, shown as a relative time.
* **User**: the Lightdash user who triggered the write-back. If the user has since been removed from the organization, this is left blank.
* **Title & source**: the title of the pull request, alongside a tag showing which feature created it (see [Sources](#sources) below).
* **Pull request link**: opens the pull request directly in GitHub or GitLab.
* **Thread link**: for pull requests opened by an [AI agent](/guides/ai-agents), a link back to the agent thread that produced the change.

If a project has no pull requests yet, the table shows an empty state.

### Sources

The **source** tag tells you which part of Lightdash opened the pull request:

| Source               | Created by                                                                                                              |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **Custom metric**    | Writing back a [Custom Metric](/guides/developer/dbt-write-back#write-back-metrics-from-custom-metrics) to dbt          |
| **Custom dimension** | Writing back a [Custom Dimension](/guides/developer/dbt-write-back#write-back-dimensions-from-custom-dimensions) to dbt |
| **SQL runner**       | Writing back a model from the [SQL runner](/guides/developer/sql-runner)                                                |
| **Source editor**    | Editing your dbt project files from within Lightdash                                                                    |
| **AI agent**         | A write-back triggered by a [Lightdash AI agent](/guides/ai-agents)                                                     |

### Live status

The title and state of each pull request are resolved on demand from your git provider, batched per repository. The stored pull request link always remains usable, so even if the live status can't be fetched — for example, if the pull request was deleted, or Lightdash has lost access to the repository — you can still open the pull request directly from the table.

## Pull request author

By default, pull requests Lightdash opens are authored by the Lightdash GitHub bot, regardless of which user triggered the write-back. The **User** column in the pull requests table still records the Lightdash user who triggered it.

If you want commits and pull requests in GitHub to be attributed to you personally, you can link your GitHub account in your personal profile settings:

1. Click on the `settings` icon in the navigation bar.
2. Open `profile` under your personal settings.
3. In the **My GitHub account** card, click `Connect GitHub account` and authorize Lightdash on GitHub.

Once linked, any write-back you trigger — from the SQL runner, source editor, custom metrics or dimensions, or an AI agent — opens the pull request authored as your GitHub user instead of the Lightdash bot. You can unlink the account at any time from the same card to revert to bot-authored pull requests.

<Info>
  * Linking your GitHub account is currently gated by a feature flag. [Contact Lightdash support](mailto:support@lightdash.com) to enable it for your organization.
  * Personal GitHub linking is only available for **GitHub**. GitLab write-backs are always authored by the Lightdash bot.
  * The Lightdash GitHub App must still be installed on the target repository. Your linked account only opens pull requests on repositories you have access to in GitHub.
</Info>

## Permissions

Viewing pull requests requires the `view source code` permission, which is granted to [`project Developer`](/references/workspace/roles) and above. See [roles and permissions](/references/workspace/roles) for more information about access levels.
