mergify-merge-protections

Control when pull requests merge using Mergify dependencies, time gates, and scheduled freezes.

32|11|Updated May 17, 2021
One-click install
npx skills add https://github.com/Mergifyio/mergify-cli --skill mergify-merge-protections-mergifyio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mergify-merge-protections
Source: https://github.com/Mergifyio/mergify-cli/tree/main/skills/mergify-merge-protections
Command: npx skills add https://github.com/Mergifyio/mergify-cli --skill mergify-merge-protections-mergifyio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams need to control when pull requests merge — blocking a PR until another lands, delaying a merge until a release window, or halting all merges during incidents — without manual coordination or custom CI scripting. ## Core Features & Use Cases - PR Dependencies (Depends-On): Add Depends-On: headers to a PR body to block merging until referenced PRs merge, supporting same-repo (#123), cross-repo (org/repo#456), and full URL formats. - Delayed Merges (Merge-After): Add a Merge-After: header with an ISO 8601 timestamp to postpone merging until a specific date and time, with IANA timezone support. - Scheduled Freezes: Use mergify freeze CLI commands to create, list, update, and delete repository-wide or conditional freezes with matching conditions (-c 'base=main') and exclusions (-e 'label=hotfix'). - Use Case: During a production incident, run mergify freeze create --reason "Incident #1234" --timezone UTC to halt all merges immediately, then delete the freeze with a reason once resolved. ## Quick Start Add a Depends-On header referencing the blocking PR to my pull request description, or create an emergency merge freeze for this repository using the mergify CLI.

Frequently Asked Questions about mergify-merge-protections

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I block a pull request until another PR merges?

Add a Depends-On header to the PR body, such as Depends-On: #123 for the same repo or Depends-On: org/repo#456 for cross-repo. Mergify enforces the dependency automatically with no .mergify.yml configuration required.

How do I schedule a merge freeze with the mergify CLI?

Run mergify freeze create with --reason and --timezone, optionally adding --start and --end in ISO 8601 format. Use -c for matching conditions like base=main and -e for exclusions like label=hotfix.

What timestamp formats does Merge-After support?

Merge-After accepts ISO 8601 formats: date only, datetime without timezone (assumed UTC), explicit UTC with Z, UTC offsets like +02:00, and IANA timezones like [Europe/Paris]. If no timezone is given, UTC is assumed.

Can I allow hotfix PRs through during a merge freeze?

Yes, add exclusion conditions when creating the freeze, for example mergify freeze create --reason "Code freeze" --timezone UTC -c "base=main" -e "label=hotfix". PRs matching the exclusion labels bypass the freeze.

What are the limitations of Depends-On dependencies?

All referenced PRs must be in repositories with Mergify enabled and belong to the same GitHub organization. Circular dependencies and self-references are silently ignored, and multiple Depends-On lines are allowed one per line.

How do I delete an active mergify freeze?

Run mergify freeze delete with the freeze UUID from mergify freeze list. If the freeze is currently active, you must also provide a --reason explaining the deletion, such as the incident being resolved.