Sticky Comments
Update existing PR comments in place instead of creating new ones on every CI run.
The Problem
Without a sticky-id, each CI run creates a new comment, flooding your PR:
# ❌ Creates duplicate comments
- name: Post Test Results
uses: dev-herald/comment@v1
with:
api-key: ${{ secrets.DEV_HERALD_API_KEY }}
pr-number: ${{ github.event.pull_request.number }}
template: TEST_RESULTS
template-data: |
{ ... }The Solution
Add sticky-id to update the same comment every time:
# ✅ Updates in place
- name: Post Test Results
uses: dev-herald/comment@v1
with:
api-key: ${{ secrets.DEV_HERALD_API_KEY }}
pr-number: ${{ github.event.pull_request.number }}
template: TEST_RESULTS
sticky-id: test-results # 👈 Add this
template-data: |
{ ... }Multiple Sticky Comments
Use different IDs for different signals:
sticky-id: test-results # For test results
sticky-id: deployment-status # For deployments
sticky-id: bundle-size # For bundle analysisEach updates independently. Use descriptive, consistent IDs.
Works Everywhere
Sticky comments work with both templates and markdown:
# With templates
template: DEPLOYMENT
sticky-id: deployment-status
# With markdown
comment: "## Status: ✅"
sticky-id: build-statusLast updated on