Skip to Content
FeaturesTemplates

Templates

Dev Herald provides pre-built comment templates for common automated signals in your CI pipeline. Templates handle formatting and structure, so you can focus on passing in your data.

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

Test Results

Display test suite results with pass/fail counts, duration, and links to full reports.

- 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 template-data: | { "summary": "All tests passed successfully!", "testSuites": [ { "name": "Unit Tests", "passed": 45, "failed": 0, "skipped": 2, "duration": "5.2s", "link": "https://ci.example.com/unit-tests" }, { "name": "Integration Tests", "passed": 23, "failed": 1, "duration": "12.8s" } ], "totalLink": "https://ci.example.com/full-report", "showTimestamp": true }

Required fields: testSuites (array with at least one suite)
Optional fields: summary, totalLink, showTimestamp

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, etc.

- 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": [ { "text": "main.js" }, { "text": "245 KB" }, { "text": "-12 KB ⬇️" }, { "text": "✅ Improved" } ] }, { "cells": [ { "text": "vendor.js" }, { "text": "890 KB" }, { "text": "+5 KB ⬆️" }, { "text": "⚠️ Watch" } ] } ], "showTimestamp": true }

Required fields: headers, rows (at least one row with cells)
Optional fields: title, showTimestamp

Template Data Validation

All templates use Zod schemas  for validation. If you provide invalid data, Dev Herald will return a detailed error message explaining what’s wrong.

Next Steps

  • Learn about Sticky Comments to update comments in place
  • See Guides for examples of transforming tool outputs into template data
Last updated on