Mergify| Docs

Rebase

Rebase the pull request on top of its base branch.


The rebase action makes Mergify rebase the pull request on top of its base branch. This is useful when you want to ensure that your pull request is always up-to-date with the latest changes from the base branch.

Parameters

Key nameValue typeDefault
autosquashbooleantrue

When set to True, commits starting with fixup!, squash! and amend!are squashed during the rebase.

bot_account

template

To rebase, Mergify needs to impersonate a GitHub user. You can specify the account to use with this option. If no bot_account is set, Mergify picks the pull request author. The user account must have already been logged in Mergify dashboard once.

Examples

Here's an example of how to use the rebase action:

pull_request_rules:
- name: continuously rebase pull request when it's labeled with `rebase`
conditions:
- label=rebase
actions:
rebase:

Note that this will rebase the pull request as long as it has the label.

If you wanted to do rebase only once, you would also need to remove the label.

pull_request_rules:
- name: rebase pull request once when it's labeled with `rebase`
conditions:
- label=rebase
actions:
rebase: {}
label:
remove:
- rebase
Edit on GitHub

Company

  • About Us
  • Careers
  • Customers
  • Media Kit

Products

Community

Help