-
Couldn't load subscription status.
- Fork 16
security: Add branch protection (Github Policy Service) #236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
christinalau0
merged 6 commits into
Azure:master
from
christinalau0:gh-policy-branch-protection
Apr 19, 2024
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2faf97c
Add branch protection github policy
christinalau0 00ab9cf
SDL Minimum Requirements
christinalau0 161569c
Add double quotes
christinalau0 3d10d63
Set default alias for master branch
christinalau0 fc527d4
Add whoCanPush
christinalau0 07e0498
Set requiresLinearHistory to true
christinalau0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT License. | ||
|
|
||
| # File initially created using https://github.com/MIchaelMainer/policyservicetoolkit/blob/main/branch_protection_export.ps1. | ||
|
|
||
| name: aks-engine-azurestack-branch-protection | ||
| description: Branch protection policy for the aks-engine-azurestack repository | ||
| resource: repository | ||
| configuration: | ||
| branchProtectionRules: | ||
|
|
||
| - branchNamePattern: "*release*" | ||
| # 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: 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: false | ||
| # Require approval of the most recent reviewable push. boolean | ||
| requireLastPushApproval: true | ||
| # Are merge commits prohibited from being pushed to this branch. boolean | ||
| requiresLinearHistory: true | ||
| # Require branches to be up to date before merging. boolean | ||
| requiresStrictStatusChecks: true | ||
| # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. | ||
| restrictsPushes: true | ||
| # Requires restrictsPushes. The user / team must have at least write (push) permissions otherwise it will be omitted in the applied rule | ||
| whoCanPush: | ||
| - aks-engine-azurestack # https://github.com/orgs/Azure/teams/aks-engine-azurestack | ||
| # Restrict who can dismiss pull request reviews. boolean | ||
| restrictsReviewDismissals: false | ||
|
|
||
| - branchNamePattern: "~default~" | ||
| # 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: false | ||
| # Require approval of the most recent reviewable push. boolean | ||
| requireLastPushApproval: true | ||
| # Are merge commits prohibited from being pushed to this branch. boolean | ||
| requiresLinearHistory: true | ||
| # 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: | ||
| - license/cla | ||
| - pr-e2e | ||
| # Require branches to be up to date before merging. boolean | ||
| requiresStrictStatusChecks: false | ||
| # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. | ||
| restrictsPushes: true | ||
| # Requires restrictsPushes. The user / team must have at least write (push) permissions otherwise it will be omitted in the applied rule | ||
| whoCanPush: | ||
| - aks-engine-azurestack # https://github.com/orgs/Azure/teams/aks-engine-azurestack | ||
| # Restrict who can dismiss pull request reviews. boolean | ||
| restrictsReviewDismissals: false | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.