Skip to content

Commit 2e2aece

Browse files
authored
chore: update code-coverage to use apix-bot and make sticky comments (#3449)
1 parent c12986f commit 2e2aece

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.github/workflows/code-health.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,18 @@ jobs:
139139
echo "| | Difference | ${diff}% |"
140140
} > comment.md
141141
cat "comment.md" >> "$GITHUB_STEP_SUMMARY"
142+
- name: set Apix Bot token
143+
id: app-token
144+
uses: mongodb/apix-action/token@v4
145+
with:
146+
app-id: ${{ secrets.APIXBOT_APP_ID }}
147+
private-key: ${{ secrets.APIXBOT_APP_PEM }}
142148
- name: Comment PR
143-
uses: actions/github-script@v7
144-
with:
145-
script: |
146-
const fs = require('fs');
147-
const comment = fs.readFileSync('comment.md', 'utf8');
148-
await github.rest.issues.createComment({
149-
owner: context.repo.owner,
150-
repo: context.repo.repo,
151-
issue_number: context.issue.number,
152-
body: comment
153-
});
149+
uses: marocchino/[email protected]
150+
with:
151+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
152+
recreate: true
153+
path: comment.md
154154
- name: Check coverage threshold
155155
run: |
156156
if (( $(echo "${{ steps.compare.outputs.diff }} < 0" | bc -l) )); then

0 commit comments

Comments
 (0)