From mergify
Enforces Mergify PR merge protections: Depends-On headers for dependencies, Merge-After timestamps for delays, CLI commands for repo-wide freezes. Use for PR chains, cross-repo coordination, scheduled merges.
npx claudepluginhub mergifyio/mergify-cli --plugin mergifyThis skill uses the workspace's default tool permissions.
Merge protections control when PRs are allowed to merge:
Validates Mergify config files like .mergify.yml, simulates actions on GitHub PRs, and helps write/edit configurations for merge queues and workflow rules.
Monitors PR health on recurring schedules: merge conflicts, CI/CD failures in GitHub Actions/Buildkite/Vercel/Fly.io, review comment triage/resolution, merge readiness. One-shot triage mode.
Reviews open Dependabot PRs, classifies by risk (patch/minor/major/security/lockfile-only), merges safe ones via GitHub CLI, and advises on others. Use for dependency update triage.
Share bugs, ideas, or general feedback.
Merge protections control when PRs are allowed to merge:
| Protection | Scope | How |
|---|---|---|
| Depends-On | Per-PR dependency chain | Depends-On: header in PR body |
| Merge-After | Per-PR time gate | Merge-After: header in PR body |
| Scheduled Freezes | Repository-wide or conditional | CLI commands (mergify freeze) |
Depends-On and Merge-After are built-in — just add the header to the PR description (or commit message body when using mergify stack push) and Mergify enforces them automatically, no .mergify.yml configuration needed. Freezes are managed via CLI commands.
Block a PR from merging until one or more other PRs are merged first.
Add one or more Depends-On: lines to the PR body:
Depends-On: #123
Depends-On: https://github.com/org/other-repo/pull/456
Depends-On: org/other-repo#789
All three formats are supported — use #NNN for same-repo, full URL or org/repo#NNN for cross-repo.
Depends-On: lines are allowed (one per line)mergify stack pushThe stack tool automatically adds Depends-On: #NNN between consecutive PRs in a stack. For dependencies outside the stack (cross-repo or unrelated PRs), add the header manually to the commit message body — it will be copied to the PR description on push.
Postpone merging until a specified date and time.
Add a Merge-After: line to the PR body:
Merge-After: 2025-09-01T09:00:00Z
Merge-After: 2025-09-01 # date only (midnight UTC)
Merge-After: 2025-09-01T09:00:00 # no timezone (assumed UTC)
Merge-After: 2025-09-01T09:00:00Z # explicit UTC
Merge-After: 2025-09-01T09:00:00+02:00 # with UTC offset
Merge-After: 2025-09-01T09:00:00[Europe/Paris] # with IANA timezone
If no timezone is specified, UTC is assumed.
Both headers can be used together on the same PR:
This PR updates the billing API to support the new pricing model.
Depends-On: org/billing-service#42
Merge-After: 2025-06-15T10:00:00[US/Eastern]
The PR will not merge until PR #42 in billing-service is merged and the specified time has passed.
Scheduled freezes temporarily halt merging of pull requests matching specific conditions. Use them for deployment windows, incident response, maintenance periods, or any situation where merges should be paused.
mergify freeze list # List all scheduled freezes
mergify freeze list --json # Machine-readable JSON output
mergify freeze create OPTIONS # Create a new scheduled freeze
mergify freeze update FREEZE_ID OPTIONS # Update an existing freeze
mergify freeze delete FREEZE_ID # Delete a freeze
All commands require a Mergify or GitHub token:
--token / -t (env: MERGIFY_TOKEN or GITHUB_TOKEN) -- defaults to gh auth token--repository / -r -- Repository full name (auto-detected from git remote)--api-url / -u (env: MERGIFY_API_URL) -- Mergify API URL (default: https://api.mergify.com)# Emergency freeze (starts now, no end time)
mergify freeze create \
--reason "Production incident - halting all merges" \
--timezone "US/Eastern"
# Scheduled maintenance window
mergify freeze create \
--reason "Weekend deployment freeze" \
--timezone "Europe/Paris" \
--start "2024-12-20T18:00:00" \
--end "2024-12-23T08:00:00"
# Freeze with conditions (only freeze merges to main)
mergify freeze create \
--reason "Release freeze for v2.0" \
--timezone "UTC" \
-c "base=main"
# Freeze with exclusions (allow hotfix PRs through)
mergify freeze create \
--reason "Code freeze" \
--timezone "UTC" \
-c "base=main" \
-e "label=hotfix"
Required options:
--reason -- Human-readable reason for the freeze--timezone -- IANA timezone name (e.g., Europe/Paris, US/Eastern, UTC)Optional options:
--start -- Start time in ISO 8601 format (default: now)--end -- End time in ISO 8601 format (default: no end, emergency freeze)--condition / -c -- Matching condition (repeatable, e.g., -c 'base=main')--exclude / -e -- Exclude condition (repeatable, e.g., -e 'label=hotfix')# Table view
mergify freeze list
# JSON output for scripting
mergify freeze list --json
The table shows: ID, reason, start/end times with timezone, matching conditions, and active/scheduled status.
# Extend a freeze
mergify freeze update FREEZE_ID --end "2024-12-24T08:00:00"
# Change the reason
mergify freeze update FREEZE_ID --reason "Extended: waiting for hotfix"
# Set exclusions (replaces the full exclusion list, does not append)
mergify freeze update FREEZE_ID -e "label=emergency"
The FREEZE_ID is the UUID shown in mergify freeze list.
# Delete a scheduled (not yet active) freeze
mergify freeze delete FREEZE_ID
# Delete an active freeze (reason required)
mergify freeze delete FREEZE_ID --reason "Incident resolved"
If the freeze is currently active, a --reason for deletion is required.
# Stop all merges immediately
mergify freeze create \
--reason "Incident #1234 - API outage" \
--timezone UTC
# Once resolved, delete the freeze
mergify freeze list --json # Get the freeze ID
mergify freeze delete FREEZE_UUID --reason "Incident #1234 resolved"
Create the freeze before each deployment window and delete it after:
mergify freeze create \
--reason "Deploy window" \
--timezone "US/Pacific" \
--start "2024-12-20T14:00:00" \
--end "2024-12-20T16:00:00"
mergify freeze create \
--reason "Sprint freeze" \
--timezone UTC \
-c "base=main" \
-e "label=hotfix" \
-e "label=security"