From d19ab15421ee3516c3943925df204cb8b5e62fa8 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:52:53 +0200 Subject: [PATCH] post reminder comment only once (#33848) fix Co-authored-by: ydshieh --- .github/workflows/slow_ci_remainder.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/slow_ci_remainder.yml b/.github/workflows/slow_ci_remainder.yml index b2d1a49f65..b479f152da 100644 --- a/.github/workflows/slow_ci_remainder.yml +++ b/.github/workflows/slow_ci_remainder.yml @@ -32,20 +32,8 @@ jobs: - run: | echo ${{ steps.find_comment.outputs.comment-id }} - - name: Delete previous comment (if found) - if: steps.find_comment.outputs.comment-id != '' - uses: actions/github-script@v6 - with: - result-encoding: string - github-token: ${{ secrets.comment_bot_token }} - script: | - github.rest.issues.deleteComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: ${{ steps.find_comment.outputs.comment-id }}, - }) - - - name: Add comment + - name: Add comment if not present + if: steps.find_comment.outputs.comment-id == '' uses: thollander/actions-comment-pull-request@v2 with: message: |