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 Deployment Status
uses: dev-herald/comment@v1
with:
api-key: ${{ secrets.DEV_HERALD_API_KEY }}
pr-number: ${{ github.event.pull_request.number }}
template: DEPLOYMENT
template-data: |
{ ... }The Solution
Add sticky-id to update the same comment every time:
# ✅ Updates in place
- name: Post Deployment Status
uses: dev-herald/comment@v1
with:
api-key: ${{ secrets.DEV_HERALD_API_KEY }}
pr-number: ${{ github.event.pull_request.number }}
template: DEPLOYMENT
sticky-id: deployment-status # 👈 Add this
template-data: |
{ ... }Multiple Sticky Comments
Use different IDs for different signals:
sticky-id: deployment-status # For deployments
sticky-id: bundle-size # For bundle analysis
sticky-id: migration-progress # For migration trackingEach 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