From b84714b23bb36a824c4e75ba1fd7ade161a0562c Mon Sep 17 00:00:00 2001 From: Andrew Ross Date: Sat, 9 Sep 2023 08:40:24 -0700 Subject: [PATCH] Update single comment for check compatibility (#9954) Instead of appending a new comment every time check compatibility runs, this will instead update a single comment with the latest results. The history of previous runs is retained in the comment as GitHub allows you to view the edited revisions of any comment. This matches the behavior of the codecov workflow and should substantially reduce noise in PRs. Relates #9699 Signed-off-by: Andrew Ross Signed-off-by: Shivansh Arora --- .github/workflows/check-compatibility.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/check-compatibility.yml b/.github/workflows/check-compatibility.yml index dab8afd4ec1f2..4b8ef22351145 100644 --- a/.github/workflows/check-compatibility.yml +++ b/.github/workflows/check-compatibility.yml @@ -52,8 +52,18 @@ jobs: with: name: results.txt + - name: Find Comment + uses: peter-evans/find-comment@v2 + id: fc + with: + issue-number: ${{ github.event.number }} + comment-author: 'github-actions[bot]' + body-includes: 'Compatibility status:' + - name: Add comment on the PR uses: peter-evans/create-or-update-comment@v3 with: + comment-id: ${{ steps.fc.outputs.comment-id }} issue-number: ${{ github.event.number }} body-path: results.txt + edit-mode: replace