updateπŸ”—

The update action updates the pull request against its base branch. It works by merging the base branch into the head branch of the pull request.

../../_images/update-branch.png

Tip

You do not need to use this action if you use the queue action. The merge queue automatically update the pull requests it processes as necessary, making sure they are test with up-to-date code before being merged.

OptionsπŸ”—

Key Name

Value Type

Default

Value Description

bot_account

Template

Mergify can impersonate a GitHub user to update a pull request. If no bot_account is set, Mergify will update the pull request itself.

ExamplesπŸ”—

↑ Linear HistoryπŸ”—

As GitHub supports linear history in pull request settings, it is very handy to use a rule to keep your pull requests up-to-date. As you do not want to trigger your CI too often by always re-running it on every pull request β€” especially when there is still work in progress β€” you can limit this action to labeled pull requests.

pull_request_rules:
  - name: automatic update for PR marked as β€œReady-to-Goβ€œ
    conditions:
      - -conflict # skip PRs with conflicts
      - -draft # filter-out GH draft PRs
      - label="Ready-to-Go"
    actions:
      update:

When a pull request is not in conflict nor draft, and has the label Ready-to-Go, it will be automatically updated with its base branch.