Skip to content

Commit

Permalink
Update single comment for check compatibility
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 opensearch-project#9699

Signed-off-by: Andrew Ross <[email protected]>
  • Loading branch information
andrross committed Sep 9, 2023
1 parent 0a0a42e commit 00ccc13
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 00ccc13

Please sign in to comment.