chore: Upsert comment (#9546)

When analyzer reruns we want it to update the comment - this will reduce
the number of comments overall.
This commit is contained in:
Nikolay Vitkov 2023-01-19 14:06:37 +01:00 committed by GitHub
parent 8d2f65f278
commit 7a4650d6ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,9 +140,16 @@ jobs:
repo: context.repo.repo, repo: context.repo.repo,
labels: ["invalid"] labels: ["invalid"]
}) })
- name: Add comment - name: Find Comment Id
uses: peter-evans/find-comment@v2
id: find-comment-id
with:
issue-number: ${{ github.event.issue.number }}
comment-author: 'github-actions[bot]'
- name: Upsert comment
uses: peter-evans/create-or-update-comment@v2 uses: peter-evans/create-or-update-comment@v2
with: with:
comment-id: ${{ steps.find-comment-id.outputs.comment-id }}
issue-number: ${{ github.event.issue.number }} issue-number: ${{ github.event.issue.number }}
body: ${{ needs.analyze-issue.outputs.errorMessage }} body: ${{ needs.analyze-issue.outputs.errorMessage }}
@ -164,9 +171,16 @@ jobs:
repo: context.repo.repo, repo: context.repo.repo,
labels: ["not-reproducible", "needs-feedback"] labels: ["not-reproducible", "needs-feedback"]
}) })
- name: Add comment - name: Find Comment Id
uses: peter-evans/find-comment@v2
id: find-comment-id
with:
issue-number: ${{ github.event.issue.number }}
comment-author: 'github-actions[bot]'
- name: Upsert comment
uses: peter-evans/create-or-update-comment@v2 uses: peter-evans/create-or-update-comment@v2
with: with:
comment-id: ${{ steps.find-comment-id.outputs.comment-id }}
issue-number: ${{ github.event.issue.number }} issue-number: ${{ github.event.issue.number }}
body: | body: |
This issue was not reproducible. Please check that your example runs locally and the following: This issue was not reproducible. Please check that your example runs locally and the following: