From 9f9f42ab18721cedbd1b44b9fc484208db420d23 Mon Sep 17 00:00:00 2001 From: Philip Gichuhi Date: Thu, 30 Nov 2023 18:14:53 +0300 Subject: [PATCH] Add branch protection configs for 1.x SDK --- .../msgraph-sdk-php-branch-protection.yml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/policies/msgraph-sdk-php-branch-protection.yml b/.github/policies/msgraph-sdk-php-branch-protection.yml index f520bab5550..ed4a94782ce 100644 --- a/.github/policies/msgraph-sdk-php-branch-protection.yml +++ b/.github/policies/msgraph-sdk-php-branch-protection.yml @@ -9,6 +9,37 @@ resource: repository configuration: branchProtectionRules: + - branchNamePattern: support/1.x + # Specifies whether this branch can be deleted. boolean + allowsDeletions: false + # Specifies whether forced pushes are allowed on this branch. boolean + allowsForcePushes: false + # Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean + dismissStaleReviews: true + # Specifies whether admins can overwrite branch protection. boolean + isAdminEnforced: false + # Indicates whether "Require a pull request before merging" is enabled. boolean + requiresPullRequestBeforeMerging: true + # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required + requiredApprovingReviewsCount: 1 + # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean + requireCodeOwnersReview: true + # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines. + requiresCommitSignatures: false + # Are conversations required to be resolved before merging? boolean + requiresConversationResolution: true + # Are merge commits prohibited from being pushed to this branch. boolean + requiresLinearHistory: false + # Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status + requiredStatusChecks: + #- static analysis issues fixed in 2.x. + # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean + requiresStrictStatusChecks: true + # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. + restrictsPushes: false + # Restrict who can dismiss pull request reviews. boolean + restrictsReviewDismissals: false + - branchNamePattern: dev # This branch pattern applies to the following branches as of 08/30/2023: # dev