From 9847a656e8f5b6f84d00d5fb9dac2f77231bd092 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Thu, 13 Mar 2025 12:46:30 +0800 Subject: [PATCH] Update ci.yml --- .github/workflows/ci.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e6f30beb..4286d6040 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,21 +27,15 @@ jobs: - run: npm install - - name: Get PR author - if: github.event_name == 'pull_request' - run: echo "PR_AUTHOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV - - - name: Get PR labels + - name: Fetch PR information if: github.event_name == 'pull_request' run: | + echo "PR_AUTHOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV + echo "PR_AUTHOR_ID=${{ github.event.pull_request.user.id }}" >> $GITHUB_ENV + LABELS=$(gh api --jq '[.labels[].name]' /repos/{owner}/{repo}/pulls/${{ github.event.number }}) echo "PR_LABELS=$LABELS" >> $GITHUB_ENV - env: - GH_TOKEN: ${{ github.token }} - - name: Get changed files - if: github.event_name == 'pull_request' - run: | FILES=$(gh api --jq '[.[] | select(.status != "removed") | .filename]' /repos/{owner}/{repo}/pulls/${{ github.event.number }}/files) echo "CHANGED_FILES=$FILES" >> $GITHUB_ENV env: