From b8b335fee2b4f8f698a4ac4e1b4bc5d712f80d63 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 12 Nov 2025 21:45:49 +0100 Subject: [PATCH] chore(ci): use github app to handle issue closed comments --- .github/workflows/issue-closed-comment.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/issue-closed-comment.yml b/.github/workflows/issue-closed-comment.yml index 0137ef645..7a595194e 100644 --- a/.github/workflows/issue-closed-comment.yml +++ b/.github/workflows/issue-closed-comment.yml @@ -8,11 +8,18 @@ jobs: comment-on-issue-closure: runs-on: ubuntu-latest steps: + - name: Generate GitHub App token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.BOT_APP_ID }} + private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }} + - name: Check if issue was closed by commit id: check-commit uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ steps.generate-token.outputs.token }} script: | const issueNumber = context.payload.issue.number; @@ -56,7 +63,7 @@ jobs: if: steps.check-commit.outputs.closed_by_commit == 'true' uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ steps.generate-token.outputs.token }} script: | const issueNumber = context.payload.issue.number; const commitSha = '${{ steps.check-commit.outputs.commit_sha }}';