diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index efc14b01..9381b803 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -@microsoftgraph/msgraph-devx-python-write +* @microsoftgraph/msgraph-devx-python-write diff --git a/.github/policies/msgraph-sdk-python-core.yml b/.github/policies/msgraph-sdk-python-core-branch-protection.yml similarity index 97% rename from .github/policies/msgraph-sdk-python-core.yml rename to .github/policies/msgraph-sdk-python-core-branch-protection.yml index a42b9b64..35be14b3 100644 --- a/.github/policies/msgraph-sdk-python-core.yml +++ b/.github/policies/msgraph-sdk-python-core-branch-protection.yml @@ -1,8 +1,6 @@ # 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: msgraph-sdk-python-core-branch-protection description: Branch protection policy for the msgraph-sdk-python-core repository resource: repository @@ -37,6 +35,7 @@ configuration: # existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status requiredStatusChecks: - CodeQL + - check-build-matrix # 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. @@ -72,6 +71,7 @@ configuration: # existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status requiredStatusChecks: - CodeQL + - check-build-matrix # 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. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8bdfd4b..31b659d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,3 +48,17 @@ jobs: AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + + # The check-build-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure. + # Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks. + check-build-matrix: + runs-on: ubuntu-latest + needs: build + if: always() + steps: + - name: All build matrix options are successful + if: ${{ !(contains(needs.*.result, 'failure')) }} + run: exit 0 + - name: One or more build matrix options failed + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1