Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 14 additions & 23 deletions src/content/docs/integrations/dependabot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,17 @@ intervention.
There are two primary ways to automate the merging of Dependabot PRs with
Mergify:

### 1. Direct Merge or Merge Queue
### 1. Using the Merge Queue

You can set up a pull request rule to automatically merge Dependabot PRs or
place them in the merge queue.
You can set up a queue rule to automatically enqueue Dependabot PRs into the
merge queue using [`autoqueue`](/merge-queue/rules#autoqueueing-pull-requests).

```yaml
pull_request_rules:
- name: Automatically merge Dependabot PRs
conditions:
queue_rules:
- name: default
autoqueue: true
queue_conditions:
- author = dependabot[bot]
actions:
merge:
# Or use queue: to use the merge queue
```

### 2. PR Approval
Expand All @@ -53,19 +51,18 @@ pull_request_rules:

Dependabot provides specific labels for the type of dependency update, such as
`dependabot-dependency-name`, `dependabot-dependency-type`, and
`dependabot-update-type`. You can use these labels in your Mergify rules to
`dependabot-update-type`. You can use these in your queue rule conditions to
filter which Dependabot PRs to auto-merge. For instance, you might only want to
auto-merge minor version bumps:

```yaml
pull_request_rules:
- name: Auto merge minor version bumps
conditions:
queue_rules:
- name: default
autoqueue: true
merge_method: merge
queue_conditions:
- author = dependabot[bot]
- dependabot-update-type = version-update:semver-minor
actions:
queue:
method: merge
```

## Batching Dependency Updates
Expand All @@ -81,18 +78,12 @@ For example, you could set up a merge queue to batch those PRs 10 by 10:
queue_rules:
# If you have other queue rules defined, add this at the end so it is processed last
- name: dep-update
autoqueue: true
batch_size: 10
# Wait for up to 30 minutes for the batch to fill up
batch_max_wait_time: 30 min
queue_conditions:
- author = dependabot[bot]

pull_request_rules:
- name: Automatically queue Dependabot PRs
conditions:
- author = dependabot[bot]
actions:
queue:
```

## Disable Dependabot's Automatic Rebase
Expand Down
24 changes: 8 additions & 16 deletions src/content/docs/integrations/renovate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@ submits automated pull requests.
There are two primary ways to automate the merging of Renovate PRs with
Mergify:

### 1. Direct Merge or Merge Queue
### 1. Using the Merge Queue

You can set up a pull request rule to automatically merge Renovate PRs or
place them in the merge queue.
You can set up a queue rule to automatically enqueue Renovate PRs into the
merge queue using [`autoqueue`](/merge-queue/rules#autoqueueing-pull-requests).

```yaml
pull_request_rules:
- name: Automatically merge Renovate PRs
conditions:
queue_rules:
- name: default
autoqueue: true
queue_conditions:
- author = renovate[bot]
actions:
merge:
# Or use queue: to use the merge queue
```

### 2. PR Approval
Expand Down Expand Up @@ -60,18 +58,12 @@ For example, you could set up a merge queue to batch those PRs 10 by 10:
queue_rules:
# If you have other queues defined, add this at the end so it is processed last
- name: dep-update
autoqueue: true
batch_size: 10
# Wait for up to 30 minutes for the batch to fill up
batch_max_wait_time: 30 min
queue_conditions:
- author = renovate[bot]

pull_request_rules:
- name: Automatically queue Renovate PRs
conditions:
- author = renovate[bot]
actions:
queue:
```

With Mergify and Renovate working together, you can ensure your project's
Expand Down
24 changes: 9 additions & 15 deletions src/content/docs/integrations/snyk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ allowing for a thorough review.
file](/configuration/file-format) file in the repository root.

```yaml
pull_request_rules:
- name: Automatic merge Snyk PRs on Status Checks passing
conditions:
queue_rules:
- name: default
autoqueue: true
merge_method: merge
queue_conditions:
- author = snyk-bot
- base = main
actions:
merge:
method: merge
```

This configuration ensures that Snyk PRs are automatically merged when
they meet the defined conditions.
This configuration uses [`autoqueue`](/merge-queue/rules#autoqueueing-pull-requests)
to automatically enqueue and merge Snyk PRs when they meet the defined
conditions.

## Batching Dependency Updates

Expand All @@ -86,18 +86,12 @@ For example, you could set up a merge queue to batch those PRs 10 by 10:
queue_rules:
# If you have other queue rules defined, add this at the end so it is processed last
- name: dep-update
autoqueue: true
batch_size: 10
# Wait for up to 30 minutes for the batch to fill up
batch_max_wait_time: 30 min
queue_conditions:
- author = snyk-bot

pull_request_rules:
- name: Automatically queue Snyk PRs
conditions:
- author = snyk-bot
actions:
queue:
```

## Tips for Efficient Dependency Upgrades
Expand Down
79 changes: 35 additions & 44 deletions src/content/docs/migrate/bulldozer.mdx
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
---
title: Migrate from Bulldozer to Mergify
description: Map Bulldozer configuration and behaviors to Mergify rules and merge queue.
description: Move from Bulldozer automerge to Mergify's Merge Queue for safer, faster merges.
---

[Bulldozer](https://github.com/palantir/bulldozer) focuses on automerging pull
requests based on labels, reviews, and status checks. Mergify covers that and
more, with a powerful rule engine and a production‑grade merge queue.
requests based on labels, reviews, and status checks. Mergify's [Merge
Queue](/merge-queue) covers that and more, with automatic PR updates,
prioritization, batching, and parallel checks.

This page shows a practical, minimal‑diff path to move from Bulldozer to
Mergify.
This page shows a practical path to move from Bulldozer to Mergify's Merge
Queue.

:::tip[Need help?]

Weve migrated many teams from Bulldozer. [Reach
out](mailto:[email protected]) and well review your Bulldozer configuration
We've migrated many teams from Bulldozer. [Reach
out](mailto:[email protected]) and we'll review your Bulldozer configuration
and propose an equivalent Mergify setup.

:::

## Typical Migration Plan

1. Keep your labels and branch protections asis
2. Translate Bulldozer settings to one or two Mergify rules
3. Start with a dry‑run or lowimpact setup and expand gradually
1. Keep your labels and branch protections as-is
2. Set up a Mergify merge queue with conditions matching your Bulldozer config
3. Start with a low-impact setup and expand gradually

## Common Bulldozer config → Mergify
## Common Bulldozer config → Mergify Merge Queue

Example Bulldozer snippet:

Expand All @@ -38,59 +39,49 @@ merge:
- "ci/circleci: ete-tests"
```

Equivalent Mergify:
Equivalent Mergify merge queue:

```yaml title=.mergify.yml
pull_request_rules:
- name: Automerge when ready
conditions:
queue_rules:
- name: default
merge_method: squash
autoqueue: true
queue_conditions:
- base = main
- label = merge when ready
- head ~= ^feature/
- "check-success = ci/circleci: ete-tests"
actions:
merge:
method: squash
```

Notes:
- Checks map to `check-success = <name>` (or `check-skipped`, `check-neutral`)
- Required labels map to `label = <name>` conditions
- Approvals map to review count or specific reviewers
- The merge queue keeps PRs updated automatically — no manual rebases needed

## Enabling the Merge Queue (optional but recommended)

If you rely on Bulldozer plus manual rebases to keep PRs up‑to‑date, [Mergify’s
Merge Queue](/merge-queue) removes that toil — with even more optimizations.
## Going Further with Merge Queue

Add a queue rule and switch to queueing instead of immediate merge:
Once you have basic automerge working, you can take advantage of features
Bulldozer doesn't offer:

```yaml title=.mergify.yml
queue_rules:
- name: default
autoqueue: true
queue_conditions:
- base = main
- check-success = ci
```
- [Priorities](/merge-queue/priority) — urgent PRs jump ahead in the queue

- The queue keeps PRs updated and merges them only after passing on the latest
version of the base branch
- [Batches](/merge-queue/batches) — merge multiple PRs at once to reduce CI
load

- You can set [priorities](/merge-queue/priority),
[batches](/merge-queue/batches), and [parallel
checks](/merge-queue/parallel-checks) later
- [Parallel checks](/merge-queue/parallel-checks) — test multiple queue
entries simultaneously

## Feature parity quick table

- Merge methods: squash/merge/rebase → supported
- Merge methods: squash/merge/rebase → supported via `merge_method`

- Delete branch after merge → [`delete_head_branch`
action](/workflow/actions/delete_head_branch)
- Delete branch after merge → use GitHub's "Automatically delete head branches"
repository setting

- Rebase/update before merge →
[`rebase`](/workflow/actions/rebase)/[`update`](/workflow/actions/update)
actions or merge queue `update_method`
- Rebase/update before merge → automatic in merge queue

- Require labels → conditions `label = `
- Require labels → `label =` in `queue_conditions`

- Restrict by authors/paths → conditions `author =`, `files ~=`, etc.
- Restrict by authors/paths → `author =`, `files ~=`, etc. in
`queue_conditions`
84 changes: 12 additions & 72 deletions src/content/docs/workflow.mdx
Original file line number Diff line number Diff line change
@@ -1,90 +1,30 @@
---
title: Introducing Mergify Workflow Automation
description: An overview of Mergify Workflow Automation and its capabilities to supercharge your pull request process.
title: Workflow Automation
description: An overview of Mergify Workflow Automation and its capabilities to automate your pull request process.
---

Mergify Workflow Automation is a sophisticated system designed to revolutionize
your pull request process. It empowers development teams to automate tasks and
processes using a rule-based approach. This ensures efficiency, consistency,
and adherence to project standards.
Mergify Workflow Automation is a rule-based system that automates pull request
tasks using `pull_request_rules` in your Mergify configuration file.

## Why Use Mergify Workflow Automation?

1. **Automate Repetitive Tasks**: Frequent tasks such as labeling, assigning,
or merging pull requests can be automated, freeing up developers to focus on
code and innovative solutions.

2. **Consistent Standards**: Ensure that each pull request adheres to your
project's guidelines, with automated checks and balances in place.

3. **Flexible and Powerful**: The system is based on rules that you define,
offering flexibility to cater to your project's unique needs.

4. **Real-time Feedback**: Instantly inform contributors about the status of
their pull requests, ensuring clarity and quick response times.

5. **Easier On-boarding**: Make it easy for any developer to understand your
repository rules by crafting your rules in an easy-to-read YAML format.

## State-Based, Edge-Triggered System
## How It Works

Mergify evaluates the state of a pull request rather than individual events.

This means it checks the current status of a pull request and acts based on
defined conditions. This behavior is known as "edge triggering."

An action will only by re-triggered for a pull request if the state flips back
An action will only be re-triggered for a pull request if the state flips back
from being unmatched to matched.

For instance, consider a rule that specifies a pull request should be merged if
it has at least two approved reviews and all CI checks pass. Even if the second
approval and CI success come at different times, Mergify will act once the
entire state of the pull request matches the rule.

```yaml
pull_request_rules:
- name: merge automatically when CI passes and PR is approved
conditions:
- "#approved-reviews-by >= 2"
- check-success = my-favorite-ci
actions:
merge:
```

On the other hand, a rule that posts a comment when a pull request is in
conflict with its base branch will only be triggered when the pull request
becomes in conflict, or when it becomes in conflict again — not every push to
its base branch.

```yaml
pull_request_rules:
- name: merge automatically when CI passes and PR is approved
conditions:
- conflict
actions:
comment:
message: Your PR is in conflict, {{author}}. You should fix it.
```

This makes sure the system does not *spam* the pull request.

:::note
Mergify never evaluates rules for pull request drafts it creates to
Mergify never evaluates rules for pull request drafts it creates while
processing the [merge queue](/merge-queue).
:::

## Getting Started
## Reference

To begin with Mergify, you'll need to [setup Mergify on your GitHub
repository](/integrations/github). You can then [set up rules for your
repository](writing-your-first-rule).
- [Rule Syntax](/workflow/rule-syntax) for the `pull_request_rules` format

Each rule will contain conditions (e.g., pull request state, number of reviews)
and actions (e.g., merge, label). When a pull request meets the conditions of a
rule, the specified actions are automatically executed.
- [Actions](/workflow/actions) for the full list of available actions

Mergify Workflow Automation is more than just a tool – it's a game changer for
developers and teams who seek efficiency, consistency, and automation in their
pull request process. By introducing state-based, edge-triggered rules, Mergify
provides unparalleled control over your project's workflows. Dive in, set up
your first rule, and experience the transformation firsthand.
- [Configuration File](/configuration/file-format) for the overall config
structure
Loading