diff --git a/.github/actions/setup-bot/action.yml b/.github/actions/setup-bot/action.yml index 0be2f43bf..f8d683615 100644 --- a/.github/actions/setup-bot/action.yml +++ b/.github/actions/setup-bot/action.yml @@ -22,7 +22,7 @@ runs: steps: - name: Generate a GitHub App Token id: generate-token - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 with: app-id: ${{ inputs.app-id }} private-key: ${{ inputs.private-key }} diff --git a/.github/workflows/frontend-validation.yml b/.github/workflows/frontend-validation.yml index 370e58ab8..3cdd3c63d 100644 --- a/.github/workflows/frontend-validation.yml +++ b/.github/workflows/frontend-validation.yml @@ -85,6 +85,26 @@ jobs: echo "to see what still needs fixing manually." echo "============================================" exit 1 + - name: Remove frontend check comment on success + if: steps.frontend-check.outcome == 'success' && github.event_name == 'pull_request' + continue-on-error: true + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + with: + script: | + const marker = ''; + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + const existing = comments.find(c => c.body.includes(marker)); + if (existing) { + await github.rest.issues.deleteComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: existing.id, + }); + } - name: Upload frontend build artifacts uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: