Skip to content

Instantly share code, notes, and snippets.

@pldubouilh
Last active December 20, 2022 13:39
Show Gist options
  • Save pldubouilh/caf485dd350982cd43644c62da9e242b to your computer and use it in GitHub Desktop.
Save pldubouilh/caf485dd350982cd43644c62da9e242b to your computer and use it in GitHub Desktop.
coverage stats on github PR comment
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: coverage bot
- name: Create comment
if: steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
**coverage bot**
commit ${{ github.event.pull_request.head.sha }} is at `${{ env.COVERAGE_STAT }}`
- name: Update comment
if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
commit ${{ github.event.pull_request.head.sha }} is at `${{ env.COVERAGE_STAT }}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment