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
actions:
  update:

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.