mergify-merge-protections
Skill0 starsChanged 56 days agoMITView on GitHub
Use Mergify merge protections to control when PRs merge — PR dependencies (Depends-On header), delayed merges (Merge-After header), and scheduled freezes (CLI). ALWAYS use this skill when managing merge freezes, deployment windows, temporarily blocking merges, setting up PR dependencies, blocking a PR on another PR, coordinating cross-repo merges, scheduling a merge for a specific time, or adding Depends-On or Merge-After headers to PRs. Triggers on freeze, scheduled freeze, merge freeze, deployment freeze, halt merges, depends on, dependency, block merge, merge after, merge later, schedule merge, delayed merge, cross-repo, merge protection.
- Reads credentials
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- FlatbreadLabs/flatbreadedited, first seen Sep 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- FlatbreadLabs/flatbread★ 6798% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository156 other files it gives its agents.
- AGENTS.mdAGENTS.md
- aes-agentSkill
- aes-capabilitiesSkill
- aes-contractSkill
- aes-docsSkill
- aes-lint-arwakySkill
- aes-migrationSkill
- aes-rootSkill
- aes-surfaceSkill
- aes-taxonomySkill
- aes-testing-suiteSkill
- aes-utilitySkill
- omnirouteSkill
- xai-apiSkill
- android-emulator-linux-gpsSkill
- chromium-profile-provisioningSkill
- flatpak-chromium-automationSkill
- qwen-web-arwaky-devSkill
- qwen-webSkill
- agent-tool-collectionSkill
- coding-agent-delegationSkill
- computer-useSkill
- hermes-agentSkill
- hermes-home-cleanupSkill
- hermes-messaging-gatewaysSkill
- merge-reconcilerSkill
- codegraphSkill
- cleanup-consolidateSkill
- codacy-analysis-cliSkill
- codacy-cloud-cliSkill
- codacy-code-reviewSkill
- codebase-inspectionSkill
- coderabbit-reviewSkill
- configure-codacy-cloudSkill
- configure-codacySkill
- fix-bypassSkill
- fix-markdown-inline-htmlSkill
- harness-source-auditSkill
- no-mistakesSkill
- ponytail-auditSkill
- ponytail-debtSkill
- ponytail-gainSkill
- ponytail-helpSkill
- ponytail-reviewSkill
- ponytailSkill
- report-linter-false-positiveSkill
- setup-coverageSkill
- architecture-diagramSkill
- ascii-artSkill
- ascii-videoSkill
- baoyu-infographicSkill
- comfyuiSkill
- excalidrawSkill
- humanizerSkill
- manim-videoSkill
- no-ai-slopSkill
- p5jsSkill
- popular-web-designsSkill
- pretextSkill
- sketchSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Add one or more Depends-On: lines to the PR body:
- Very specific: line 32
All three formats are supported — use #NNN for same-repo, full URL or org/repo#NNN for cross-repo.
- Distinctive: line 36
All referenced PRs must be in repositories with Mergify enabled
- Distinctive: line 37
All referenced PRs must belong to the same GitHub organization
- Very specific: line 57
Add a Merge-After: line to the PR body:
- Distinctive: line 73
If no timezone is specified, UTC is assumed.
- Very specific: line 110
All commands require a Mergify credential.
- Very specific: line 191
If the freeze is currently active, a --reason for deletion is required.
- Distinctive: line 208
Create the freeze before each deployment window and delete it after:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mergify Merge Protections
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.
Depends-On
Block a PR from merging until one or more other PRs are merged first.
Syntax
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#789All three formats are supported — use #NNN for same-repo, full URL or org/repo#NNN for cross-repo.
Rules
- All referenced PRs must be in repositories with Mergify enabled
- All referenced PRs must belong to the same GitHub organization
- Circular dependencies and self-references are silently ignored
- Multiple
Depends-On:lines are allowed (one per line)
With mergify stack push
The 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.
When to suggest
- Feature spanning multiple repos (e.g., API change + client update)
- Schema migration must merge before application code
- Shared library update must land before consumers
Merge-After
Postpone merging until a specified date and time.
Syntax
Add a Merge-After: line to the PR body:
Merge-After: 2025-09-01T09:00:00ZSupported timestamp formats (ISO 8601)
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 timezoneIf no timezone is specified, UTC is assumed.
When to suggest
- Coordinated release: multiple PRs should merge together at a specific time
- Merge during a maintenance window or off-peak hours
- Embargo: PR is ready but should not ship before a date
Combining Depends-On and Merge-After
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
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.
Commands
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 freezeAuthentication
All commands require a Mergify credential. Run mergify auth login once, or:
--token/-t(env:MERGIFY_TOKEN) -- Mergify credential. Falls back to the credentialmergify auth loginstored, then toGITHUB_TOKEN/gh auth token, both deprecated for the Mergify API.--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)
Creating a Freeze
# 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')
Listing Freezes
# Table view
mergify freeze list
# JSON output for scripting
mergify freeze list --jsonThe table shows: ID, reason, start/end times with timezone, matching conditions, and active/scheduled status.
Updating a Freeze
# 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.
Deleting a Freeze
# 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.
Common Patterns
Emergency freeze during an incident
# 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"Recurring deployment window
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"Freeze with exceptions for critical fixes
mergify freeze create \
--reason "Sprint freeze" \
--timezone UTC \
-c "base=main" \
-e "label=hotfix" \
-e "label=security"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

