test_insights

Put a test in a state

Changed on

Put a test in a state for a branch, pipeline and job.

post/ci/{owner}/repositories/{repository}/test-states

Request

  • Base URL: https://api.mergify.com/v1
  • URL: https://api.mergify.com/v1/ci/{owner}/repositories/{repository}/test-states
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Path parameters

repositorystring required

The name of the repository

ownerstring required

The owner of the repository

Request body

state'quarantined' required
test_namestring required

The fully qualified name of the test.

reasonstring required

Why the test is put in this state.

issue_urlstring nullable

Link to where the fix of the test is tracked, such as an issue in your issue tracker. Must be an http or https URL.

branch_namestring nullable

Branch the state applies to. Every branch when not specified.

pipeline_namestring nullable

Pipeline the state applies to. Every pipeline when not specified.

job_namestring nullable

Job the state applies to. Every job when not specified.

unquarantine_when_healthyboolean

For the quarantined state: unquarantine the test once it recovers, when Mergify no longer detects it as flaky or broken.

Response

Successful Response

idstring uuid required

The ID of the created test state.

Changes