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 1
1
# Copyright (c) Microsoft Corporation.
2
2
# Licensed under the MIT License.
3
3
4
- # File initially created using https://github.com/MIchaelMainer/policyservicetoolkit/blob/main/branch_protection_export.ps1.
5
-
6
4
name : msgraph-sdk-python-core-branch-protection
7
5
description : Branch protection policy for the msgraph-sdk-python-core repository
8
6
resource : repository
@@ -37,6 +35,7 @@ configuration:
37
35
# existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
38
36
requiredStatusChecks :
39
37
- CodeQL
38
+ - check-build-matrix
40
39
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
41
40
requiresStrictStatusChecks : true
42
41
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
@@ -72,6 +71,7 @@ configuration:
72
71
# existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
73
72
requiredStatusChecks :
74
73
- CodeQL
74
+ - check-build-matrix
75
75
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
76
76
requiresStrictStatusChecks : true
77
77
# 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 48
48
AZURE_CLIENT_ID : ${{ secrets.AZURE_CLIENT_ID }}
49
49
AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
50
50
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