Custom PR Comments
Use the comment field to post freeform markdown on pull requests. No templates, no validation — just write your markdown and it shows up in the PR.
This is the simplest way to get started with Dev Herald. See the Quick Start guide for a minimal example.
Basic usage
- name: Post Markdown Comment
uses: dev-herald/comment@v1
with:
api-key: ${{ secrets.DEV_HERALD_API_KEY }}
pr-number: ${{ github.event.pull_request.number }}
sticky-id: build-status
comment: |
## Build Complete! 🎉
✅ All checks passed
📦 Build artifacts readyTemplates vs. markdown
| Feature | Templates | Markdown |
|---|---|---|
| Structure | Pre-defined schema | Freeform |
| Validation | Schema-validated | None |
| Flexibility | Fixed format | Full control |
Use templates when you want consistent formatting across your team. Use markdown when you need full control or are prototyping a new comment type.
Dynamic content
Use GitHub Actions expressions to inject data from your workflow:
comment: |
## Deployment Complete
**Environment:** ${{ github.event.inputs.environment }}
**Version:** ${{ steps.version.outputs.tag }}
**Deployed by:** @${{ github.actor }}
[View Logs](${{ steps.deploy.outputs.logs_url }})Sticky markdown comments
Add a sticky-id on almost every markdown comment. That id updates the same comment on every push, and it is what you send later to delete the comment when the run has nothing left to report.
A markdown comment without a sticky-id is posted once and stays on the pull request. See Sticky Comments.
comment: |
## CI Status: ✅ All checks passed
sticky-id: build-statusSee Sticky Comments for details.
Markdown support
Dev Herald supports all the markdown that GitHub does — headings, lists, tables, code blocks, links, and task lists.