Skip to content

Commit 50bd4e6

Browse files
clreaumedatadog-bitsburaizu
authored
Bits Code: add GitLab support (#37572)
* Add GitLab setup instructions in tabs * Mention GitLab on Bits Code overview page * Add Supported source code platforms section * Fix GitLab Dedicated classification and wording * Link Setup page to supported platforms section * Add GitLab Dedicated to supported platforms * Link Developer role and group to GitLab docs * Link only group, not article, in GitLab tab * Reword token scopes and link to GitLab docs * Generalize PR collaboration section to source code providers * Fix broken [14] reference: define on Setup, drop from overview * Reword GitLab step and link service account * Repoint Datadog link to [6], drop duplicate [14] * Define [14] reference for Datadog link on Setup * Use 'providers' instead of 'platforms' for SCM consistency * Restore [14]->[6] link consolidation on Setup * Use pull/merge request terminology for GitLab * Use consistent PRs/MRs plural in pull/merge terminology * Scope PR troubleshooting entry to GitHub * Lil tweaks Co-authored-by: Cara Reaume <35357020+clreaume@users.noreply.github.com> * Adding merge request language to Automations * Clarifying supported plans * Incorporating feedback from Bryce! * Just fixing one stray header with a slash * Apply another round of suggestions from code review Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com> Co-authored-by: Cara Reaume <35357020+clreaume@users.noreply.github.com> --------- Co-authored-by: datadog-bits <no-reply@dtdg.co> Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com>
1 parent 47e4e12 commit 50bd4e6

3 files changed

Lines changed: 186 additions & 152 deletions

File tree

content/en/bits_ai/bits_ai_dev_agent/_index.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,25 @@ further_reading:
1414

1515
## Overview
1616

17-
Bits Code is a generative AI coding assistant that uses Datadog observability data to automatically diagnose and fix issues in your code. It integrates with GitHub to create production-ready pull requests, then iterates on changes using CI logs and developer feedback.
17+
Bits Code is a generative AI coding assistant that uses Datadog observability data to automatically diagnose and fix issues in your code. It integrates with [source code providers](#supported-source-code-providers) to create production-ready pull or merge requests, then iterates on changes using CI logs and developer feedback.
1818

1919
{{< img src="bits_ai/dev_agent/sessions_overview.png" alt="A tab titled 'Sessions' shows a text field with suggestions underneath" style="width:100%;" >}}
2020

2121
Each time Bits Code investigates an issue or generates a fix, it creates a [session](#sessions), which captures the agent's analysis, actions, and any resulting code changes across supported Datadog products. Set up [automations][28] to have Bits Code run sessions on a schedule or in response to signals from other Datadog products, such as a new APM Recommendation or flaky test.
2222

23-
To get started with Bits Code, [set up the GitHub integration][6] and complete any additional configuration. Then, [start your first session](#start-a-session).
23+
To get started with Bits Code, [set up a source code integration][6] and complete any additional configuration. Then, [start your first session](#start-a-session).
2424

2525
Learn how your Bits Code usage is billed on [AI Credits][27].
2626

27+
## Supported source code providers
28+
Bits Code supports the following source code providers:
29+
- **GitHub**: GitHub.com and [GitHub Enterprise Cloud][30]
30+
- **GitLab**: GitLab.com
31+
32+
The following plans are not supported:
33+
- **Self-hosted plans**, such as GitHub Enterprise Server and GitLab Self-Managed.
34+
- **Cloud-hosted plans on dedicated domains**, such as [GitHub Enterprise Cloud with data residency][31] and [GitLab Dedicated][32]. Bits Code supports only providers on the standard GitHub.com and GitLab.com domains.
35+
2736
## Sessions
2837
A session captures a segment of work with Bits Code, including its analysis and code changes. Start, view, and manage your sessions at **Bits AI** > **Bits Code** > [**Sessions**][7].
2938

@@ -38,7 +47,7 @@ After [completing setup][6], do one of the following to start a Bits Code sessio
3847
A session can also be created when another Bits AI agent (like [Bits Chat][16] or [Bits Investigation][17]) hands off a coding task to Bits Code.
3948

4049
### View and manage sessions
41-
On **[Sessions][7]**, view your past sessions in the **My Sessions** panel. A session appears here if you initiated it or interacted with it in some way, like participating in the conversation or creating an associated PR.
50+
On **[Sessions][7]**, view your past sessions in the **My Sessions** panel. A session appears here if you initiated it or interacted with it in some way, like participating in the conversation or creating an associated PR or MR.
4251

4352
Click a session to view its details and continue working with Bits Code. To remove a session from your **My Sessions** list, click <i class="icon-archive-wui"></i> (**Archive for everyone**) or <i class="icon-eye-slashed-wui"></i> (**Unwatch session**).
4453

@@ -74,18 +83,18 @@ Use the freeform prompt field at [**Sessions**][7] to work with Bits Code on gen
7483

7584
### Automations
7685

77-
[Automations][28] run Bits Code sessions automatically, on a schedule or in response to signals from Datadog products like Error Tracking, APM, or Code Security. After a session completes, Bits Code delivers the results as a pull request, a draft PR, or a Slack notification.
86+
[Automations][28] run Bits Code sessions automatically, on a schedule or in response to signals from Datadog products like Error Tracking, APM, or Code Security. After a session completes, Bits Code delivers the results as a pull or merge request (optionally in draft mode) or a Slack notification.
7887

7988
You can build automations from triggers (a product finding, a custom prompt, a schedule, or a combination) and configure one or more outputs. Datadog-provided templates are also available to help you get started. Create and manage automations at **Bits AI** > **Bits Code** > [**Automations**][29].
8089

81-
### Pull request collaboration
90+
### Pull or merge request collaboration
8291

83-
Bits Code integrates with GitHub to:
84-
- Create pull requests, generating titles and descriptions based on your repository's pull request template
85-
- Iterate on pull requests in response to comments; mention `@Datadog` in a comment to prompt Bits for updates
92+
Bits Code integrates with [source code providers](#supported-source-code-providers) to:
93+
- Create pull or merge requests, generating titles and descriptions based on your repository's pull or merge request template
94+
- Iterate on pull or merge requests in response to comments; mention `@Datadog` in a comment to prompt Bits for updates
8695
- Monitor CI logs and fix failures
8796

88-
Bits Code never auto-merges PRs. See all the PRs that Bits Code is working on in **Bits AI** > **Bits Code** > **[Sessions][7]**.
97+
Bits Code never auto-merges PRs or MRs. See all the PRs or MRs that Bits Code is working on in **Bits AI** > **Bits Code** > **[Sessions][7]**.
8998

9099
## Limitations
91100

@@ -107,7 +116,6 @@ Bits Code never auto-merges PRs. See all the PRs that Bits Code is working on in
107116
[10]: /profiler/automated_analysis/
108117
[12]: /containers/
109118
[13]: /containers/bits_ai_kubernetes_remediation
110-
[14]: https://app.datadoghq.com/code/settings
111119
[15]: /security/code_security/static_analysis/ai_enhanced_sast/#remediation
112120
[16]: /bits_ai/bits_chat/
113121
[17]: /bits_ai/bits_ai_sre/
@@ -121,3 +129,6 @@ Bits Code never auto-merges PRs. See all the PRs that Bits Code is working on in
121129
[27]: /account_management/billing/ai_credits/
122130
[28]: /bits_ai/bits_ai_dev_agent/automations/
123131
[29]: https://app.datadoghq.com/code/automations
132+
[30]: https://docs.github.com/en/enterprise-cloud@latest/admin/overview/about-github-enterprise-cloud
133+
[31]: https://docs.github.com/en/enterprise-cloud@latest/admin/overview/about-github-enterprise-cloud#about-data-residency
134+
[32]: https://docs.gitlab.com/subscriptions/gitlab_dedicated/

content/en/bits_ai/bits_ai_dev_agent/automations.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ further_reading:
99
---
1010

1111
## Overview
12-
Create an automation to have Bits Code start a [session][1] when a trigger fires, such as a new Code Security finding or a recurring schedule, then deliver the results as a pull request or Slack notification.
12+
Create an automation to have Bits Code start a [session][1] when a trigger firessuch as a new Code Security finding or a recurring schedule. Bits Code delivers the results as a pull or merge request, or a Slack notification.
1313

1414
{{< img src="bits_ai/dev_agent/automations/list.png" alt="Under an 'Automate with Bits' title, a table with columns like Name, Author, and Last Run has four rows." style="width:100%;" >}}
1515

1616
With Bits Code automations, you can:
1717

1818
- Generate code fixes on a schedule, without starting each session manually
1919
- Have Bits Code respond to signals from other Datadog products, such as a new APM Recommendation, a flaky test, or a Code Security finding
20-
- Route the resulting code changes directly to a pull request or notify a team in Slack
20+
- Route the resulting code changes directly to a pull or merge request, or notify a team in Slack
2121

2222
## Prerequisites
2323
To set up a Bits Code automation, each of the following must be true:
@@ -44,8 +44,8 @@ To create a custom Bits Code automation:
4444
### Create an automation from a template
4545
Find Datadog-provided automation templates in the **Automation Templates** section. These may include:
4646

47-
- **Create PRs based on APM Recommendations**: Generates pull requests based on APM Recommendations for a specific service.
48-
- **Fix frequent errors for a repo**: Uses the [**Custom Prompt**](#custom-prompt-trigger) trigger to instruct Bits Code to scan the last 24 hours of logs, find the most frequent error, and open a pull request with a fix.
47+
- **Create PRs based on APM Recommendations**: Generates pull or merge requests based on APM Recommendations for a specific service.
48+
- **Fix frequent errors for a repo**: Uses the [**Custom Prompt**](#custom-prompt-trigger) trigger to instruct Bits Code to scan the last 24 hours of logs, find the most frequent error, and open a pull or merge request with a fix.
4949

5050
Click a template tile to be taken to the new automation form. You must configure an [output](#outputs) before creating the automation.
5151

@@ -58,7 +58,7 @@ A trigger defines when an automation runs and what Bits Code acts on. A trigger
5858

5959
Click **Add Trigger** to add a component. You can combine a product finding with a schedule, a custom prompt with a schedule, or use a product finding on its own.
6060

61-
To limit how many Bits Code sessions the automation can create in a given period (for example, `5 runs per Week`), click **Add Trigger** > **Set max runs**. One automation execution may produce more than one session. Use this setting to control the volume of pull requests or notifications an automation produces.
61+
To limit how many Bits Code sessions the automation can create in a given period (for example, `5 runs per Week`), click **Add Trigger** > **Set max runs**. One automation execution may produce more than one session. Use this setting to control the volume of pull or merge requests, or Slack notifications, an automation produces.
6262

6363
### Product finding trigger
6464
A product finding trigger runs the automation in response to new issues in another Datadog product (for example, Error Tracking or Code Security). You can use a product finding trigger by itself, which runs the automation whenever there is a new finding, or with a [schedule](#schedule-trigger) and lookback window you define (in the **New findings within** field).
@@ -69,7 +69,7 @@ When setting up a product finding trigger, you can configure additional filters,
6969
- **Flaky Tests** supports filtering by **Repository**, **Branch** (defaults to the repository's default branch), and **Status**.
7070
- **Code Security (SAST)** supports filtering by **Repository**, **Severity**, **Rule to remediate**, and a toggle to **Filter out findings identified as false positives by Bits AI**.
7171

72-
<div class="alert alert-warning">Each finding that triggers an automation is tied to a single session. Multiple findings cannot be fixed in a single session or pull request.</div>
72+
<div class="alert alert-warning">Each finding that triggers an automation must have its own session, and related pull or merge request. Multiple findings cannot be fixed in a single session.</div>
7373

7474
### Custom prompt trigger
7575
A custom prompt tells Bits Code what to do each time the automation runs, in freeform text, against a chosen repository. Use a custom prompt for recurring maintenance tasks that aren't tied to a specific Datadog signal, such as updating dependencies or refreshing documentation.
@@ -80,17 +80,17 @@ A schedule trigger controls when an automation runs. It can be used in combinati
8080
- **Custom Schedule**: Choose specific days of the week and a time of day (for example, `Mo, We, Fr at 03:00 pm`).
8181

8282
## Outputs
83-
An output defines what Bits Code does after a [session][1] completes. An automation can have one or more outputs, including [opening a pull request](#pull-request-output) and [generating a Slack notification](#slack-message-output).
83+
An output defines what Bits Code does after a [session][1] completes. An automation can have one or more outputs, including [opening a pull or merge request](#pull-or-merge-request-output) and [generating a Slack notification](#slack-message-output).
8484

85-
### Pull request output
85+
### Pull or merge request output
8686
You can configure your automation to:
87-
- **Create a PR**: Open a pull request with the proposed changes
88-
- **Draft a PR**: Open a draft pull request with the proposed changes
87+
- **Create a PR or MR**: Open a pull or merge request with the proposed changes
88+
- **Draft a PR or MR**: Open a draft pull or merge request with the proposed changes
8989

90-
As the author of a Bits Code automation, you are the author of all pull requests it generates.
90+
As the author of a Bits Code automation, you are the author of all pull or merge requests it generates.
9191

9292
### Slack message output
93-
You can configure your automation to send a Slack message summarizing the [session][1] and code changes. If you use a pull request output in addition to a Slack output, Bits Code includes a link to the pull request in the Slack message.
93+
You can configure your automation to send a Slack message summarizing the [session][1] and code changes. If you use a pull or merge request output in addition to a Slack output, Bits Code includes a link to the pull or merge request in the Slack message.
9494

9595
When you add a Slack message output, by default, Bits Code sends the message to the channel configured for the affected service in [Catalog][5]. You can set a fallback Slack channel, which is used when no channel is set in Catalog.
9696

0 commit comments

Comments
 (0)