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: test-results # For test resultsEach updates independently. Use descriptive, consistent IDs across your workflows.
Works everywhere
Sticky comments work with signals, templates, and custom markdown:
# With templates
template: DEPLOYMENT
sticky-id: deployment-status
# With signals
signal: TEST_RESULTS
sticky-id: test-results
# With markdown
comment: "## Status: ✅"
sticky-id: build-statusHow Dev Herald tracks comments
Dev Herald stores a small amount of metadata (PR number, sticky ID, comment ID) to find and update the right comment on subsequent runs. No source code is stored. See Data & Privacy for details.
Last updated on