Skip to content

Commit

Permalink
chore: update code-coverage to use apix-bot and make sticky comments (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fmenezes authored Dec 4, 2024
1 parent c12986f commit 2e2aece
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,18 @@ jobs:
echo "| | Difference | ${diff}% |"
} > comment.md
cat "comment.md" >> "$GITHUB_STEP_SUMMARY"
- name: set Apix Bot token
id: app-token
uses: mongodb/apix-action/token@v4
with:
app-id: ${{ secrets.APIXBOT_APP_ID }}
private-key: ${{ secrets.APIXBOT_APP_PEM }}
- name: Comment PR
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const comment = fs.readFileSync('comment.md', 'utf8');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: comment
});
uses: marocchino/[email protected]
with:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
recreate: true
path: comment.md
- name: Check coverage threshold
run: |
if (( $(echo "${{ steps.compare.outputs.diff }} < 0" | bc -l) )); then
Expand Down

0 comments on commit 2e2aece

Please sign in to comment.