File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1- @microsoftgraph /msgraph-devx-python-write
1+ * @ microsoftgraph/msgraph-devx-python-write
Original file line number Diff line number Diff line change 11# Copyright (c) Microsoft Corporation.
22# Licensed under the MIT License.
33
4- # File initially created using https://github.com/MIchaelMainer/policyservicetoolkit/blob/main/branch_protection_export.ps1.
5-
64name : msgraph-sdk-python-core-branch-protection
75description : Branch protection policy for the msgraph-sdk-python-core repository
86resource : repository
@@ -37,6 +35,7 @@ configuration:
3735 # existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
3836 requiredStatusChecks :
3937 - CodeQL
38+ - check-build-matrix
4039 # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
4140 requiresStrictStatusChecks : true
4241 # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
@@ -72,6 +71,7 @@ configuration:
7271 # existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
7372 requiredStatusChecks :
7473 - CodeQL
74+ - check-build-matrix
7575 # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
7676 requiresStrictStatusChecks : true
7777 # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
Original file line number Diff line number Diff line change 4848 AZURE_CLIENT_ID : ${{ secrets.AZURE_CLIENT_ID }}
4949 AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
5050 AZURE_CLIENT_SECRET : ${{ secrets.AZURE_CLIENT_SECRET }}
51+
52+ # The check-build-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure.
53+ # Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks.
54+ check-build-matrix :
55+ runs-on : ubuntu-latest
56+ needs : build
57+ if : always()
58+ steps :
59+ - name : All build matrix options are successful
60+ if : ${{ !(contains(needs.*.result, 'failure')) }}
61+ run : exit 0
62+ - name : One or more build matrix options failed
63+ if : ${{ contains(needs.*.result, 'failure') }}
64+ run : exit 1
You can’t perform that action at this time.
0 commit comments