engineering_analytics
engineering_analytics

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, opens a tracking issue that 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.

post/api/projects/{project_id}/engineering_analytics/quarantine/request/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/engineering_analytics/quarantine/request/
  • Auth: HTTP bearer

Path parameters

project_idstring required

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

Request body

operation'quarantine' | 'extend' | 'remove' required
  • quarantine - Quarantine
  • extend - Extend
  • remove - Remove
selectorstring required

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

repostring nullable

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

reasonstring

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

ownerstring

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

issuestring

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

expiresstring date nullable

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

mode'run' | 'skip'
  • run - Run
  • skip - Skip

Response

The opened pull request, plus the tracking issue for a new quarantine.

pr_urlstring required

URL of the opened pull request that edits the quarantine file.

issue_urlstring required

URL of the tracking issue filed for a new quarantine; empty for extend and remove.

branchstring required

Branch the pull request was opened from.

Changes

No recorded changes to this operation across all 1 revision of this API.