Templates
Dev Herald provides pre-built comment templates for common automated signals in your CI pipeline. Templates handle formatting and structure — you pass in the data.
Use templates with the template and template-data inputs on the dev-herald/comment action. Add a sticky-id to update the comment in place on every push.
Available templates
Deployment Status
Surface deployment information directly in PRs — preview URLs, deployment status, and build artifacts.
- 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
template-data: |
{
"projectName": "My App",
"deploymentStatus": "Ready",
"previewLink": "https://preview-pr-123.myapp.com",
"deploymentLink": "https://vercel.com/deployments/abc123",
"showTimestamp": true
}Required fields: projectName, deploymentStatus
Optional fields: projectLink, deploymentLink, previewLink, commentsLink, showTimestamp
See the Vercel Preview Comments guide for a full workflow example.
Migration Progress
Track incremental migrations (e.g., JavaScript → TypeScript, old library → new library) with before/after metrics.
- name: Post Migration Progress
uses: dev-herald/comment@v1
with:
api-key: ${{ secrets.DEV_HERALD_API_KEY }}
pr-number: ${{ github.event.pull_request.number }}
template: MIGRATION
sticky-id: migration-progress
template-data: |
{
"migrations": [
{
"from": "JavaScript",
"to": "TypeScript",
"summary": "✅ This PR converted 5 more files to TypeScript",
"whyItMatters": "Improves type safety and developer experience",
"metric": {
"unit": "files",
"before": 120,
"after": 115,
"delta": -5
}
}
],
"showTimestamp": true
}Required fields: migrations (array with from, to, summary, and metric)
Optional fields: whyItMatters, showTimestamp
Custom Table
Create structured tables for any data — bundle sizes, coverage reports, performance metrics, and more. Each cell is markdown (GitHub-Flavored Markdown: links, bold, `code`, and more). Literal pipe characters in your markdown are automatically escaped so the table layout stays valid.
- name: Post Bundle Size Analysis
uses: dev-herald/comment@v1
with:
api-key: ${{ secrets.DEV_HERALD_API_KEY }}
pr-number: ${{ github.event.pull_request.number }}
template: CUSTOM_TABLE
sticky-id: bundle-analysis
template-data: |
{
"title": "Bundle Size Analysis",
"headers": ["Package", "Size", "Change", "Status"],
"rows": [
{
"cells": [
{ "markdown": "[main.js](https://example.com/chunk-main)" },
{ "markdown": "245 KB" },
{ "markdown": "-12 KB ⬇️" },
{ "markdown": "✅ **Improved**" }
]
},
{
"cells": [
{ "markdown": "vendor.js" },
{ "markdown": "890 KB" },
{ "markdown": "+5 KB ⬆️" },
{ "markdown": "⚠️ Watch" }
]
}
],
"showTimestamp": true
}Required fields: headers, rows (at least one row with cells; each cell has markdown)
Optional fields: title, showTimestamp
See Bundle Change Comments for a workflow that computes and posts bundle diffs.
Template data validation
All templates use Zod schemas for validation. If you provide invalid data, Dev Herald returns a detailed error message explaining what’s wrong.
Next steps
- Learn about Sticky Comments to update comments in place
- Browse use cases for end-to-end workflow examples