Scheduling Freezes
Temporarily block merging during maintenance, release, or blackout windows.
A freeze holds back the pull requests it matches until the freeze ends. You schedule one ahead of a window where nothing should land, or start one on the spot, from the dashboard or the CLI.
When to use a freeze
Section titled When to use a freezeUse a freeze for a release you are stabilizing, a high-traffic event, an audit window, or an incident.
What a freeze blocks
Section titled What a freeze blocksWithout the merge queue, an active freeze leaves the
Mergify Merge Protections check pending on every matching pull request, and
its summary names the freeze holding it back: waiting for that freeze to end,
or, when the freeze has no end date, waiting for someone to remove it. Pull
requests matching the freeze’s exclude conditions are left alone (see
Allowing exceptions), as are drafts, closed pull
requests, and conflicting ones unless a queue rule can
merge them anyway.
When the merge queue is enabled, the freeze is reported in that check but is not what decides its conclusion. The queue holds the merge back, not the tests:
Creating a scheduled freeze
Section titled Creating a scheduled freeze
In the dashboard under Merge Protections → Scheduled Freezes, click
Schedule a Freeze, then:
-
Give the freeze a reason. It is required, and it names the freeze wherever Mergify reports it
-
Under
Schedule, setStarts,Endsand theTimezonethey are read in. LeaveEndsempty for a freeze that lasts until you remove it -
Under
Scope, add the conditions a pull request must match to be blocked, or leave it empty to freeze every pull request on the repository. UnderExceptions, add the conditions that let a pull request through anyway -
Click
Save Freeze; the freeze appears underUpcominguntil it starts
Manual instant freeze
Section titled Manual instant freezeFreeze Now opens the same editor without a start date: pull requests matching
Scope are blocked the moment you save.
Recurring merge windows
Section titled Recurring merge windowsA freeze covers a single window: it has one start and one end, and nothing
repeats it. To block merges on a recurring basis, such as outside working hours
or every weekend, write a merge protection
rule with a schedule condition instead:
merge_protections: - name: Merge during working hours description: Only merge between 9am and 5pm, Monday to Friday if: - base = main success_conditions: - schedule = Mon-Fri 09:00-17:00[America/Chicago]Outside the window the rule is pending, so the Mergify Merge Protections
check holds the pull request back the same way an active freeze does; the rule
passes again once the window reopens. See
schedule for the accepted formats.
Allowing exceptions
Section titled Allowing exceptionsTo let specific pull requests through a freeze, use exclude conditions. They
are combined with a logical AND: a pull request escapes the freeze only when it
matches all of them. Exclude conditions label=hotfix and label=urgent let
through pull requests carrying both labels, not those carrying only one.
Set them when you create or edit a freeze, in the dashboard’s Exceptions
section or from the CLI with the -e flag (see Creating a
freeze below).
Managing freezes with the CLI
Section titled Managing freezes with the CLIThe freeze CLI reference lists every command, flag and
option.
Listing freezes
Section titled Listing freezesmergify freeze listCreating a freeze
Section titled Creating a freezeCreate a time-bounded freeze:
mergify freeze create \ --reason "Release stabilization" \ --timezone UTC \ --start 2030-01-15T18:00:00 \ --end 2030-01-15T22:00:00--start and --end are read in the timezone you pass with --timezone, and
Mergify rejects a freeze that starts or ends in the past. Omit both for an
emergency freeze that starts now and lasts until you delete it.
Restrict which pull requests are affected with matching conditions (-c) and
let specific ones through with exclude conditions (-e):
mergify freeze create \ --reason "Freeze main branch" \ --timezone UTC \ -c "base=main" \ -e "label=hotfix"Here the freeze applies to pull requests targeting main, except those labeled
hotfix, which can still merge.
Updating a freeze
Section titled Updating a freezeModify an existing freeze by its ID:
mergify freeze update <freeze_id> \ --end 2030-01-16T06:00:00Deleting a freeze
Section titled Deleting a freezeRemove a freeze by its ID:
mergify freeze delete <freeze_id>Was this page helpful?
Thanks for your feedback!