From c02ba848641e4cf555a7ff2a3f26597b3265e245 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Sun, 1 Jun 2025 11:51:49 -0700 Subject: [PATCH] user pr number --- .github/workflows/check-format.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-format.yml b/.github/workflows/check-format.yml index ad90d57b3..d3d4c0d6b 100644 --- a/.github/workflows/check-format.yml +++ b/.github/workflows/check-format.yml @@ -47,9 +47,9 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Get PR URL + - name: Get PR number id: pr - run: echo "PR_URL=$(jq -r .pull_request.url "$GITHUB_EVENT_PATH")" >> $GITHUB_ENV + run: echo "PR_NUMBER=$(jq -r .pull_request.number "$GITHUB_EVENT_PATH")" >> $GITHUB_ENV - name: Close PR using GitHub CLI if: | @@ -58,5 +58,5 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh pr close "$PR_URL" --delete-branch --comment "❌ Formatting check failed — PR auto-closed. + gh pr close "$PR_NUMBER" --delete-branch --comment "❌ Formatting check failed — PR auto-closed. Please run \`npm run format\` and push again."