![]() |
VOOZH | about |
Create an automation to have Bits Code start a session when a trigger fires—such 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.
With Bits Code automations, you can:
To set up a Bits Code automation, each of the following must be true:
bits_dev_write) permission in Datadog.You can create a custom automation, or use a Datadog-provided automation template.
By default, newly created automations have an Active status, and appear in the My Automations list.
To create a custom Bits Code automation:
Find Datadog-provided automation templates in the Automation Templates section. These may include:
Click a template tile to be taken to the new automation form. You must configure an output before creating the automation.
A trigger defines when an automation runs and what Bits Code acts on. A trigger is built from up to three components:
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.
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.
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 and lookback window you define (in the New findings within field).
When setting up a product finding trigger, you can configure additional filters, which vary by product. For example:
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.
A schedule trigger controls when an automation runs. It can be used in combination with a product finding or a custom prompt. When setting a schedule, you can choose from:
Every day at 09:00 am).Mo, We, Fr at 03:00 pm).An output defines what Bits Code does after a session completes. An automation can have one or more outputs, including opening a pull or merge request and generating a Slack notification.
You can configure your automation to:
As the author of a Bits Code automation, you are the author of all pull or merge requests it generates.
You can configure your automation to send a Slack message summarizing the session 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.
When you add a Slack message output, by default, Bits Code sends the message to the channel configured for the affected service in Catalog. You can set a fallback Slack channel, which is used when no channel is set in Catalog.
On Automations, view the automations you created on the My Automations tab. Switch to All to see automations created by anyone in your organization.
You can pause or resume any automation, but you can only edit or delete automations you created.
Additional helpful documentation, links, and articles:
| |