From 8e652b18be2702cca59ae6c1639244caaab16e14 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 9 Sep 2023 15:41:30 +0000 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 (cherry picked from commit c100c0c8328dd792abd285d1d9b6aeed6619dd60) Signed-off-by: github-actions[bot] --- .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