provider engineering_analyticsengineering_analytics POST /api/projects/{project_id}/engineering_analytics/quarantine/request/
@utdk/posthog /api/projects/{project_id}/engineering_analytics/quarantine/request/
Quarantine, extend, or unquarantine a flaky test
Opens a pull request that edits the repository's checked-in .test_quarantine.json — and, for a new quarantine, a tracking issue the PR links but does not close. The file stays the source of truth that CI enforces; this never bypasses it. A quarantine only affects CI runs that start after the PR merges.
project_id path required
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
string

Try it

Authentication
Configure credentials for PostHog API
engineeringAnalyticsQuarantineRequest
POST/api/projects/{project_id}/engineering_analytics/quarantine/request/
Opens a pull request that edits the repository's checked-in .test_quarantine.json — and, for a new quarantine, a tracking issue the PR links but does not close. The file stays the source of truth that CI enforces; this never bypasses it. A quarantine only affects CI runs that start after the PR merges.

Parameters

required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Input

required

What to do: 'quarantine' (add or replace an entry and file a tracking issue), 'extend' (re-stamp an existing entry's expiry, reusing its issue), or 'remove' (delete the entry). All three open a pull request. * `quarantine` - QUARANTINE * `extend` - EXTEND * `remove` - REMOVE

required

Test selector to act on: an exact test id, a file, a directory, a class prefix, or 'product:<dashed-name>'.

Optional 'owner/name' repository override; defaults to the team's most active repo.

Why the test is quarantined. Required for quarantine and extend; ignored by remove.

GitHub team or user handle responsible for the fix, e.g. '@PostHog/team-x'. Required for quarantine and extend.

Existing tracking issue URL, carried forward on extend and remove. Ignored by quarantine, which files a fresh issue.

ISO date the quarantine expires (at most 30 days out). Defaults to 14 days from today. Ignored by remove.

'run' (the test still executes but cannot fail the suite) or 'skip' (not run at all). Defaults to 'run'. * `run` - RUN * `skip` - SKIP

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.engineeringAnalyticsQuarantineRequest()