GitHub repository medium builtIn

Description

Keep your pull request in sync with the base branch. You can give users the ability to always update a pull request branch when it is not up to date with the base branch. Whenever there are new changes available in the base branch, present an “update branch” option in the pull request. Control how and when users are prompted to update their branches if there are new changes available in the base branch. Learn more: https://docs.github.com/en/enterprise-cloud@latest/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches https://docs.github.com/en/enterprise-cloud@latest/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch

Recommendation

1. Go to Repository Settings. 
2. In the 'General' section of the sidebar, go to 'Pull Requests' section. 
3. Ensure the 'Always suggest updating pull request branches' setting is enabled.

Policy Rule

{
  "target": "GHRepository",
  "if": {
    "allOf": [
      {
        "resource": "GHRepository",
        "property": "AllowUpdateBranch",
        "operator": "equals",
        "value": true
      }
    ]
  },
  "then": {
    "effect": "Audit"
  }
}
Rule Details
  • Rule ID: DOS5065
  • Code: GH_Repository_Policies_PullRequests_Enable_Always_Suggest_Updating_PR_Branches
  • Platform: GitHub
  • Category: repository
  • Severity: medium
  • Type: builtIn