Block out-of-date pull requests
  • Updated on 01 May 2019
  • 1 minute to read
  • Contributors
  • Share
  • Dark
    Light

Block out-of-date pull requests

  • Share
  • Dark
    Light

This rule ensures a pull request is always up to date with the base branch prior to merging or rebasing.

When teams collaborate on the same repository, a team member may inadvertently push code to the base branch when there are open pull requests, and thus cause the base branch to be ahead of the feature branch.

Use case(s)

  • Ensures the feature branch is synced and up to date with base branch code changes

When does this rule fail?

When base branch is ahead of the feature branch. This can occur when a pull request is under review - meaning the rule passed but new code was merged to the base branch. When this happens, a trigger automatically checks, and consequently fails, the rule.

3x-d015239-Screen_Shot_2018-12-24_at_17.36.25.png

3x-83e3c8f-Screen_Shot_2018-12-24_at_17.29.19.png

How to fix?

Pull the changes (merge or rebase) from the base branch to the feature branch

3x-1c968a2-Screen_Shot_2018-12-24_at_17.45.18.png


What's Next

Activate a policy
Was this article helpful?