chore(ci): use github app to handle issue closed comments

This commit is contained in:
kolaente
2025-11-12 21:45:49 +01:00
parent 1b995024a9
commit b8b335fee2

View File

@@ -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 }}';