This is the list of event types that we currently send.
For guidance on how to listen to these events, take a look at Svix's guide to consuming webhooks.
Triggered when a PR is canceled
{
"action": "canceled",
"author": "mmatheson",
"http_details_url": "https://app.trunk.io/gh/trunk-io/mergequeue/merge/main/8762",
"pr_number": 1234,
"repository": {
"host": "github.com",
"name": "mergequeue",
"owner": "trunk-io"
},
"status": "canceled",
"target_branch": "main"
}
Triggered when a PR fails while in the merge queue
{
"action": "failed",
"author": "mmatheson",
"failure_reason": "TEST_RUN_REQUIRED_STATUS_FAILED",
"http_details_url": "https://app.trunk.io/gh/trunk-io/mergequeue/merge/main/8762",
"pr_number": 1234,
"repository": {
"host": "github.com",
"name": "mergequeue",
"owner": "trunk-io"
},
"status": "failed",
"target_branch": "main"
}
Triggered when a PR is merged
{
"action": "merged",
"author": "mmatheson",
"http_details_url": "https://app.trunk.io/gh/trunk-io/mergequeue/merge/main/8762",
"pr_number": 1234,
"repository": {
"host": "github.com",
"name": "mergequeue",
"owner": "trunk-io"
},
"status": "merged",
"target_branch": "main"
}
Triggered when a PR has passed any branch protection requirements and is ready to be tested in the merge queue
{
"action": "queued",
"author": "mmatheson",
"http_details_url": "https://app.trunk.io/gh/trunk-io/mergequeue/merge/main/8762",
"pr_number": 1234,
"repository": {
"host": "github.com",
"name": "mergequeue",
"owner": "trunk-io"
},
"status": "queued",
"target_branch": "main"
}
Triggered when a PR is submitted to Trunk Merge
{
"action": "submitted",
"author": "mmatheson",
"http_details_url": "https://app.trunk.io/gh/trunk-io/mergequeue/merge/main/8762",
"pr_number": 1234,
"repository": {
"host": "github.com",
"name": "mergequeue",
"owner": "trunk-io"
},
"status": "submitted",
"target_branch": "main"
}
Triggered when a PR has started testing in the merge queue
{
"action": "testing",
"author": "mmatheson",
"http_details_url": "https://app.trunk.io/gh/trunk-io/mergequeue/merge/main/8762",
"pr_number": 1234,
"repository": {
"host": "github.com",
"name": "mergequeue",
"owner": "trunk-io"
},
"status": "testing",
"target_branch": "main"
}
Emitted when the health status of a test case changes. Test status can transition between `healthy`, `flaky`, and `broken`. Learn how test health is detected: https://docs.trunk.io/flaky-tests/detection
{
"status_change": {
"current_status": {
"reason": " Inconsistent results on main",
"timestamp": "2024-11-22T20:04:33.127Z",
"value": "flaky"
},
"previous_status": "healthy"
},
"test_case": {
"codeowners": [
"@backend"
],
"failure_rate_last_7d": 0.1,
"file_path": "trunk/services/__tests__/distributed_lock.test.js",
"html_url": "https://app.trunk.io/trunk/flaky-tests/test/77681877-1608-5871-bf95-e02f8baa5a9a?repo=trunk-io%2Fanalytics-cli",
"id": "2bfedccc-7fda-442c-bcf9-5e01c6d046d3",
"most_common_failures": [
{
"last_occurrence": "2024-11-22T20:04:33.127Z",
"occurrence_count": 42,
"summary": "timeout"
}
],
"name": "DistributedLock #tryLock default throws on double unlock",
"pull_requests_impacted_last_7d": 42,
"quarantine": true,
"repository": {
"html_url": "https://github.com/trunk-io/analytics-cli"
},
"status": {
"reason": " Inconsistent results on main",
"timestamp": "2024-11-22T20:04:33.127Z",
"value": "flaky"
},
"test_suite": "DistributedLock",
"ticket": {
"html_url": "https://trunk-io.atlassian.net/browse/KAN-130"
}
}
}