From ac732170ba209473aff42413bc1d076f52bd4b87 Mon Sep 17 00:00:00 2001 From: crazy hugsy Date: Mon, 24 Apr 2023 08:38:03 -0700 Subject: [PATCH] [ci] coverage use dedicated token --- .github/workflows/coverage.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a5933c6cc..f755a9b2c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,6 +1,8 @@ name: CI Coverage -on: [pull_request] +on: + pull_request: + types: [opened, edited] jobs: coverage: @@ -38,13 +40,14 @@ jobs: SCORE_NEW: ${{ steps.get_coverage.outputs.new_coverage_score }} SCORE_DIFF: ${{ steps.get_coverage.outputs.diff_score }} with: + github-token: ${{ secrets.COVERAGE_REPORT_TOKEN }} script: | const comment = `## 🤖 Coverage Update * Commit: ${process.env.COMMIT} * Current Coverage: ${process.env.SCORE_OLD}% * New Coverage: ${process.env.SCORE_NEW}% - * Diff: ${process.env.SCORE_DIFF} + * Diff: ${process.env.SCORE_DIFF} `; const { owner, repo, number } = context.issue; await github.rest.issues.createComment({ owner, repo, issue_number: number, body: comment });