Mergify Update Command
Update a pull request by merging its base branch into it.
The update command keeps pull requests current with their base branch. When
the base branch sees frequent changes, it’s not uncommon for pull requests to
become outdated.
Instead of manually merging the base branch, you can let the update command
take care of it.
Syntax
Section titled Syntax@Mergifyio updateRequirements
Section titled RequirementsWhatever your configuration says, Mergify adds its own requirements before it
updates: the pull request has to be open, free of conflict with its base branch,
not in a merge queue, and behind its base branch. The same requirements apply to
the update action.
When one of them does not hold, most often because the pull request is already
up to date, the command answers that there is nothing to do and stops there.
Unlike queue and backport, it does
not wait for the requirements to be met, so run it again once the pull request
has something to update.
Fork Pull Requests
Section titled Fork Pull Requestsupdate merges the base branch into the pull request rather than rewriting its
head branch, and it impersonates nobody unless you configure a
bot_account. Use it on pull requests
opened from a fork, where rebase refuses to run.
The merge commit still lands on the pull request’s head branch, which on a fork belongs to the author’s repository. When the base repository is public, the author has to have allowed maintainers to modify that branch; without it, the command reports that Mergify needs the author’s permission to update the branch, and only the author can unblock it, by enabling the setting or updating the branch themselves. GitHub documents it under allowing changes to a pull request branch created from a fork.
Mergify also checks which repository that head branch lives in, and writes the
branch only when it belongs to your repository or to a fork of it. Apart from a
head repository that has been deleted, this can only refuse a write when your
own repository is itself a fork: any other repository is the root of its own
fork network, so every head it sees descends from it. See the update
action for the cases it refuses.
Was this page helpful?
Thanks for your feedback!