post reminder comment only once (#33848)

fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2024-10-01 12:52:53 +02:00
committed by GitHub
parent fbde09c8c9
commit d19ab15421

View File

@@ -32,20 +32,8 @@ jobs:
- run: | - run: |
echo ${{ steps.find_comment.outputs.comment-id }} echo ${{ steps.find_comment.outputs.comment-id }}
- name: Delete previous comment (if found) - name: Add comment if not present
if: steps.find_comment.outputs.comment-id != '' 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
uses: thollander/actions-comment-pull-request@v2 uses: thollander/actions-comment-pull-request@v2
with: with:
message: | message: |