Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Crebs committed Jan 22, 2025
1 parent 9c25c73 commit aff2279
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,24 @@ jobs:
outputs:
libs: ${{ steps.test-orchestrator.outputs.libs }}
steps:
- name: Member Check
if: ${{ github.event.pull_request.author_association != 'MEMBER' }}
- name: Check Write Permissions
uses: octokit/[email protected]
id: check_permissions
with:
route: GET /repos/${{ github.repository }}/collaborators/${{ github.actor }}/permission
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Debug Permissions Response
run: |
echo "Pull Request not triggered by a MSDK team member. Someone from the team needs to rerun this workflow AFTER it has been deemed safe."
exit 1
echo "Permissions raw responsen: ${{ steps.check_permissions.outputs.data }}"
- name: Validate Write Permissions
run: |
permission=$(echo "${{ fromJson(steps.check_permissions.outputs.data).permission }}")
echo "User ${{ github.actor }} has permissions: $permissions"
if [[ "$permission" != "write" && "$permission" != "admin" ]]; then
echo "User ${{ github.actor }} does not have sufficient permissions (write or admin) to proceed."
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
with:
Expand Down

0 comments on commit aff2279

Please sign in to comment.