Skip to main content

Documentation Index

Fetch the complete documentation index at: https://trunk-4cab4936-mintlify-sync-trunk-docs-1778170107.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Trunk provides webhooks for you to build custom integrations to automate workflows, like notifying your team when a test becomes flaky or automatically creating tickets to investigate flaky tests. Trunk already provides a Jira integration, and more are planned. Webhooks lets you build custom integrations for use cases that are not supported out of the box. Svix powers webhooks for Trunk. You’ll be using Svix to configure webhooks and you should familiarize yourself with the Svix App Portal docs to learn more.

Supported Events

Trunk lets you create custom workflows with event-triggered webhooks. Flaky Test events are named with a test_case prefix. You can find all the events that Trunk supports in the event catalog:

Open resource

Open the referenced resource in a new tab.
Trunk publishes three Flaky Tests event types to Svix. Each event includes a full JSON schema with field descriptions visible in the Svix app portal.

test_case.monitor_status_changed

Emitted when a monitor activates or resolves for a test case.
FieldTypeDescription
typestringAlways test_case.monitor_status_changed
timestampstring (ISO 8601)When the event occurred
monitor.idstring (UUID)Unique identifier for the monitor
monitor.typestringThe type of monitor (e.g., pass_on_retry)
monitor.statusstringCurrent monitor status (active or resolved)
evidenceobjectData supporting the status change; structure varies by monitor type
repository.idstring (UUID)Unique identifier for the repository
repository.html_urlstringURL of the repository
test_case.idstring (UUID)Stable unique identifier for the test
test_case.namestringName of the test
test_case.classnamestringTest classname
test_case.file_pathstringFile path of the test
test_case.html_urlstringURL to the test detail page in Trunk
test_case.codeownersarray of stringsCode owners associated with the test
test_case.quarantinedbooleanWhether the test is quarantined
test_case.variantstringTest variant name

v2.test_case.status_changed

Emitted when a test case changes status (e.g., becomes flaky or is resolved), as triggered by a monitor.
FieldTypeDescription
typestringAlways v2.test_case.status_changed
timestampstring (ISO 8601)When the event occurred
previous_statusstringThe prior status of the test case
new_statusstringThe updated status of the test case
triggered_by.monitor_idstring (UUID)Unique identifier of the triggering monitor
triggered_by.monitor_typestringType of monitor that triggered the change
triggered_by.monitor_statusstringStatus of the monitor at the time of the trigger
repositoryobjectSee repository fields above
test_caseobjectSee test_case fields above

test_case.investigation_completed

Emitted when an AI-powered flaky test analysis finishes for a test case.
FieldTypeDescription
typestringAlways test_case.investigation_completed
investigation_idstring (UUID)Unique identifier for the investigation
confidencenumberOverall confidence score (0-1) for the findings
created_atstring (ISO 8601)When the investigation completed
markdown_summarystringMarkdown-formatted summary of findings and recommendations
failure_messagestringThe original failure message that triggered the investigation
factsarrayFacts discovered during the investigation
facts[].fact_typestringCategory of the fact (e.g., GIT_BLAME)
facts[].contentstringDetailed description with citations to supporting evidence
facts[].confidencenumberConfidence score (0-1) for this individual fact
repositoryobjectSee repository fields above
test_caseobjectSee test_case fields above
You can also find guides for specific examples here:
Send a Slack Messageslack-integration
Create a GitHub Issuegithub-issues-integration
Send a Microsoft Teams Messagemicrosoft-teams-integration
Create a Linear Issuelinear-integration