Skip to content

Commit

Permalink
Update the last comment if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrosse committed Mar 11, 2024
1 parent 259186a commit 191f977
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,10 @@ jobs:
> coverage-comment.md
- name: Comment on pull request
run: gh pr comment ${{ github.event.number }} --body-file=coverage-comment.md
run: |
COMMENT_ID=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments -q '.[] | select(.user.login=="github-actions[bot]") | .id' | head -n 1)
if [ -z "$COMMENT_ID" ]; then
gh pr comment ${{ github.event.number }} --body-file=coverage-comment.md
else
gh pr comment ${{ github.event.number }} --body-file=coverage-comment.md --edit-last
fi

0 comments on commit 191f977

Please sign in to comment.