Skip to content

Commit

Permalink
Update single comment for check compatibility (#9954)
Browse files Browse the repository at this point in the history
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 <andrross@amazon.com>
(cherry picked from commit c100c0c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Sep 9, 2023
1 parent f4bbb40 commit 8e652b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/check-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8e652b1

Please sign in to comment.