Scheduled Freeze
Schedule merge queue freezes for maintenance or release windows.
Get scheduled freezes #
/repos/{owner}/{repository}/scheduled_freeze
Get all the ongoing or scheduled freezes for the repository specified in the path
repository
string
required
The name of the repository
min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
200 Successful Response
Example Response
{
"scheduled_freezes": [
{
"id": "string",
"reason": "string",
"start": "2024-01-15T09:00:00Z",
"end": "2024-01-15T09:00:00Z",
"timezone": "string",
"matching_conditions": null,
"exclude_conditions": null
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X GET "https://api.mergify.com/v1/repos/:owner/:repository/scheduled_freeze" \
-H "Authorization: Bearer <token>"
Create a scheduled freeze #
/repos/{owner}/{repository}/scheduled_freeze
Create a scheduled freeze for the repository specified in the path
repository
string
required
The name of the repository
min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
The reason for the scheduled freeze.
When the scheduled freeze begins (date and time in ISO 8601 format without TZ). Begins now if the attribute is null.
When the scheduled freeze ends (date and time in ISO 8601 format without TZ).
Timezone where the freeze is expected to happen.
List of conditions used to match pull requests that need to be frozen during the scheduled freeze. Defaults to an empty list, which matches all pull requests.
List of conditions used to exclude pull requests from the scheduled freeze. Pull requests matching these conditions will not be frozen.
201 Successful Response
Example Response
{
"id": "string",
"reason": "string",
"start": "2024-01-15T09:00:00Z",
"end": "2024-01-15T09:00:00Z",
"timezone": "string",
"matching_conditions": [
{
"and": null,
"or": null,
"not": {}
}
],
"exclude_conditions": [
{
"and": null,
"or": null,
"not": {}
}
]
}
403 Forbidden
404 Not found
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X POST "https://api.mergify.com/v1/repos/:owner/:repository/scheduled_freeze" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"reason": "string",
"start": "2024-01-15T09:00:00Z",
"end": "2024-01-15T09:00:00Z",
"timezone": "string",
"matching_conditions": [
{
"and": null,
"or": null,
"not": {}
}
],
"exclude_conditions": [
{
"and": null,
"or": null,
"not": {}
}
]
}'
Update a scheduled freeze #
/repos/{owner}/{repository}/scheduled_freeze/{freeze_id}
Update an existing scheduled freeze on the repository specified in the path. Only the fields provided in the request body will be updated.
freeze_id
string <uuid>
required
The scheduled freeze `id`
repository
string
required
The name of the repository
min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
The reason for the scheduled freeze.
When the scheduled freeze begins (date and time in ISO 8601 format without TZ). Can only be updated if the scheduled freeze has not yet begun. Set to null to start now.
When the scheduled freeze ends (date and time in ISO 8601 format without TZ). Set to null for an indefinite freeze.
Timezone where the freeze is expected to happen.
List of conditions used to match pull requests that need to be frozen during the scheduled freeze.
List of conditions used to exclude pull requests from the scheduled freeze. Pull requests matching these conditions will not be frozen.
200 Successful Response
Example Response
{
"id": "string",
"reason": "string",
"start": "2024-01-15T09:00:00Z",
"end": "2024-01-15T09:00:00Z",
"timezone": "string",
"matching_conditions": [
{
"and": null,
"or": null,
"not": {}
}
],
"exclude_conditions": [
{
"and": null,
"or": null,
"not": {}
}
]
}
400 The scheduled freeze `start` attribute cannot be updated, because the scheduled freeze has already started
403 Forbidden
404 The scheduled freeze with the given id does not exist
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X PATCH "https://api.mergify.com/v1/repos/:owner/:repository/scheduled_freeze/:freeze_id" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"reason": "string",
"start": "2024-01-15T09:00:00Z",
"end": "2024-01-15T09:00:00Z",
"timezone": "string",
"matching_conditions": [
{
"and": null,
"or": null,
"not": {}
}
],
"exclude_conditions": [
{
"and": null,
"or": null,
"not": {}
}
]
}'
Delete a scheduled freeze #
/repos/{owner}/{repository}/scheduled_freeze/{freeze_id}
Delete an existing scheduled freeze on the repository specified in the path
freeze_id
string <uuid>
required
The scheduled freeze `id`
repository
string
required
The name of the repository
min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
The reason for the deletion
204 Successful Response
403 Forbidden
404 The scheduled freeze with the given id does not exist
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X DELETE "https://api.mergify.com/v1/repos/:owner/:repository/scheduled_freeze/:freeze_id" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"delete_reason": "string"
}'
Delete a scheduled freeze #
/repos/{owner}/{repository}/scheduled_freeze/{freeze_id}/delete
Delete an existing scheduled freeze on the repository specified in the path
freeze_id
string <uuid>
required
The scheduled freeze `id`
repository
string
required
The name of the repository
min length: 1 · max length: 100 · pattern: ^[\w\-\.]+$
owner
string
required
The owner of the repository
min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$
The reason for the deletion
204 Successful Response
403 Forbidden
404 The scheduled freeze with the given id does not exist
409 Conflict
422 `CONFIGURATION_INVALID`: The repository's Mergify configuration is invalid. `extended_repository` names the repository its `extends` points to when the error is in that repository's configuration file, and is null otherwise, including when the error only appears once the two configurations are merged. The route's other 422s carry no `error_code`.
CI_ADMIN_ROLE_REQUIRED CI_ID_TOKEN_AUDIENCE_REFUSED CI_ID_TOKEN_EXCHANGE_NOT_ENABLED CI_ID_TOKEN_EXPIRED CI_ID_TOKEN_INVALID CI_ID_TOKEN_ISSUER_REFUSED CI_ID_TOKEN_ISSUER_UNAVAILABLE CI_ID_TOKEN_NO_MATCHING_TRUST_POLICY CI_ID_TOKEN_NO_TRUST_POLICY CI_ID_TOKEN_REPOSITORY_NOT_INSTALLED CI_TOKEN_SCOPES_TARGET_REFUSED CI_TRACES_UPLOAD_UNUSABLE CI_TRUST_POLICY_NAME_TAKEN COMMAND_RESTRICTED CONFIGURATION_BRANCH_REFUSED CONFIGURATION_INVALID CONFIGURATION_REFUSED_BY_REPOSITORY_RULES CONFIGURATION_SIGNED_COMMITS_REQUIRED DEFAULT_BRANCH_NOT_FOUND GITHUB_ACCOUNT_SUSPENDED GITHUB_APP_ACCESS_LOST GITHUB_RATE_LIMITED GITHUB_UPSTREAM_REQUEST_FORBIDDEN GITHUB_UPSTREAM_REQUEST_REJECTED GITHUB_UPSTREAM_UNAVAILABLE ID_TOKEN_KEY_ROTATION_REFUSED INTEGRATION_NOT_CONFIGURED IP_ALLOW_LIST_NOT_CONFIGURED MERGE_QUEUE_DISABLED MERGE_QUEUE_SETTING_INVALID_BRANCH_PATTERN MERGE_QUEUE_SETTING_NOT_AVAILABLE NO_LOGIN_IN_PROGRESS ORGANIZATION_MEMBERS_ONLY PIPELINE_NAME_TAKEN PIPELINE_NOT_FOUND PIPELINE_RUN_NOT_FOUND PIPELINE_SECRETS_KEY_ALREADY_ADDED PIPELINE_SECRETS_KEY_IN_USE PIPELINE_SECRETS_KEY_LIMIT_REACHED PIPELINE_SECRETS_KEY_NOT_ACTIVE PIPELINE_SECRETS_KEY_NOT_FOUND PIPELINE_SECRETS_KEY_REPORTED PIPELINE_SECRET_LIMIT_REACHED PIPELINE_SECRET_NAME_TAKEN PIPELINE_SECRET_NOT_FOUND PIPELINE_SECRET_NOT_SEALED_TO_ACTIVE_KEYS PIPELINE_SECRET_VERSION_CHANGED PULL_REQUEST_ALREADY_QUEUED PULL_REQUEST_NOT_FOUND PULL_REQUEST_NOT_QUEUEABLE PULL_REQUEST_NOT_QUEUED RETRY_RULE_NOT_FOUND SAML_ENFORCEMENT_NOT_AUTHORIZED SETTING_MANAGED_BY_ENV SETUP_ALREADY_DONE SETUP_TOKEN_MISMATCH SUBSCRIPTION_API_UNAVAILABLE SUBSCRIPTION_INACTIVE SUBSCRIPTION_TOKEN_INVALID TEST_ALREADY_QUARANTINED TEST_BRANCH_NOT_TRACKED TEST_RETRY_NOT_CONFIGURED TEST_STATE_OVERLAPExample Response
{
"detail": "string",
"error_code": "CI_ADMIN_ROLE_REQUIRED",
"documentation_url": "string",
"extended_repository": "string"
}
Example Request
curl -X POST "https://api.mergify.com/v1/repos/:owner/:repository/scheduled_freeze/:freeze_id/delete" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"delete_reason": "string"
}'
Was this page helpful?
Thanks for your feedback!