Skip to content

Commit 60ab224

Browse files
docs: add GitLab support to AI writeback page (#744)
Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
1 parent 7d56e7c commit 60ab224

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

guides/ai-agents/ai-writeback.mdx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: Ask an AI agent to edit your dbt project in chat and open a pull re
88
Lightdash support to enable it for your organization.
99
</Warning>
1010

11-
AI writeback lets you ask an AI agent in chat or Slack to change something in the dbt repository that backs your project — rename a metric, add a dimension, edit a model's SQL, fix a YAML description — and have the agent open a pull request with the change.
11+
AI writeback lets you ask an AI agent in chat or Slack to change something in the dbt repository that backs your project — rename a metric, add a dimension, edit a model's SQL, fix a YAML description — and have the agent open a pull request (or GitLab merge request) with the change.
1212

1313
This is the same writeback capability you would normally trigger from the Custom Metric or SQL Runner menus, surfaced inside the conversation with your AI agent.
1414

@@ -33,8 +33,10 @@ For other kinds of changes, the agent will pick a different tool:
3333
## Prerequisites
3434

3535
- The **AI writeback** feature flag must be enabled for your organization.
36-
- Your project's dbt connection must be a **GitHub** repository. GitLab, Bitbucket, Azure DevOps, and local dbt projects are not supported.
37-
- The Lightdash **GitHub App** must be installed on the repository so the agent can open pull requests.
36+
- Your project's dbt connection must be a **GitHub** or **GitLab** repository. Bitbucket, Azure DevOps, dbt Cloud, and local dbt projects are not supported.
37+
- The matching Lightdash app must be installed for the repository so the agent can open requests:
38+
- **GitHub** — install the Lightdash GitHub App on the repository.
39+
- **GitLab** — connect the Lightdash GitLab App for your organization (self-hosted GitLab is supported via the project's `host_domain`).
3840
- You need at least [project Developer](/references/workspace/roles) permissions on the project.
3941

4042
## How it works
@@ -44,10 +46,15 @@ When you ask the agent for a change that belongs in the repo, it calls a tool ca
4446
1. Spawns a separate, sandboxed writeback agent with no memory of your chat.
4547
2. Hands that agent a self-contained instruction generated from your request.
4648
3. The writeback agent edits the relevant files, runs `lightdash compile` to validate the result, and pushes a new branch.
47-
4. A pull request is opened against your repository's default branch and the URL is returned to you in chat.
49+
4. A pull request (GitHub) or merge request (GitLab) is opened against your repository's default branch and the URL is returned to you in chat.
4850

4951
The tool call is synchronous and can take a few minutes. The agent will tell you a pull request is being prepared while it waits.
5052

53+
<Note>
54+
GitHub commits are signed by the Lightdash GitHub App. GitLab commits are
55+
pushed over OAuth and are unsigned.
56+
</Note>
57+
5158
## Using it in chat
5259

5360
Phrase your request as a direct change to the repo and, where possible, name the file, model, or field you want touched. The more specific you are, the more reliably the writeback agent finds the right place to edit.
@@ -86,9 +93,10 @@ When the pull request is ready, the agent posts the URL in the thread. Open it,
8693
| Situation | Result |
8794
| --- | --- |
8895
| Feature flag is off | The tool isn't available. The agent answers normally without offering to open a pull request. |
89-
| Project's dbt connection isn't GitHub | The agent tells you the project must be connected to GitHub for writeback. |
96+
| Project's dbt connection isn't GitHub or GitLab | The agent tells you the project must be connected to a supported git host for writeback. |
9097
| GitHub App isn't installed on the repo | The agent surfaces a setup error. Install the Lightdash GitHub App on the repository (from your project's dbt connection settings) and try again. |
91-
| Writeback agent makes no file changes | No pull request is opened. The agent reports back that nothing needed to change. |
98+
| GitLab App isn't connected for the organization | The agent surfaces a `GitLab App is not installed` error. Connect the Lightdash GitLab App for your organization and try again. |
99+
| Writeback agent makes no file changes | No pull request or merge request is opened. The agent reports back that nothing needed to change. |
92100

93101
## Related
94102

0 commit comments

Comments
 (0)