From 84e5ee87360a67a77cb98e9f27e1dafe6a834f2b Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 19 Aug 2024 22:09:50 +0000 Subject: [PATCH] list token permissions --- .github/workflows/genai-commander.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/genai-commander.yml b/.github/workflows/genai-commander.yml index c272a1ee26..9f173bd9c3 100644 --- a/.github/workflows/genai-commander.yml +++ b/.github/workflows/genai-commander.yml @@ -11,6 +11,16 @@ jobs: contents: write pull-requests: write steps: + - name: List GitHub Token Permissions + uses: actions/github-script@v4 + with: + script: | + const permissions = await github.request('GET /repos/{owner}/{repo}/collaborators/{username}/permission', { + owner: context.repo.owner, + repo: context.repo.repo, + username: context.actor + }); + console.log('Permissions:', permissions.data); - name: resolve pr sha id: sha uses: actions/github-script@v4