From 0902dcdaa40d7d009f934792e7fb69522b5879b7 Mon Sep 17 00:00:00 2001 From: Michael Lombardi Date: Tue, 5 Apr 2022 08:58:22 -0500 Subject: [PATCH] (MAINT) Add echo to live branch check This commit adds an echo to the GHA for validating that a PR author has authorization to submit a PR to the Live branch. It reports the username and discovered permissions before echoing that the author has permissions or throwing if they do not. --- .github/workflows/targeting-valid-branch.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/targeting-valid-branch.yml b/.github/workflows/targeting-valid-branch.yml index 2c61f3840757..67e5bec941cf 100644 --- a/.github/workflows/targeting-valid-branch.yml +++ b/.github/workflows/targeting-valid-branch.yml @@ -37,6 +37,7 @@ jobs: '--jq', '.data.repository.collaborators.edges[].permission' ) [string[]]$Permissions = gh @ApiParameters + echo "Author '${{ github.event.pull_request.user.login }}' has permissions: '$($Permissions -join ',')'" if ($Permissions -notcontains 'MAINTAIN' -and $Permissions -notcontains 'ADMIN') { throw "Author does not have permissions to target ${{ github.base_ref }}" } else {