posthog/PostHog CI Metrics

Track workflow duration, success rates, and CI performance in PostHog

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
posthog-tokenYour PostHog API token - see project settings section "Project API Key"yes
posthog-api-hostYour PostHog API hostnohttps://us.i.posthog.com
eventThe event name to capture e.g. "GitHubActionCompleted". Optional when only creating an annotation.no
propertiesProperties to add to the event - as a JSON string. Must be possible to `JSON.parse(properties)`no
capture-run-durationCapture run duration via GitHub API (adds duration_seconds and run metadata)nofalse
capture-job-durationsCapture timing and status for each job in the workflow (emits one event per job)nofalse
github-tokenGitHub token for API access (required for capture-run-duration, capture-job-durations, and status-job)no
runnerOptional runner label to include in properties (e.g., 'depot')no
status-jobJob name to check for workflow status (e.g., 'Django Tests Pass'). Captures that job's conclusion.no
annotationCreate a PostHog annotation with this text (e.g., 'Deployed to production'). Can be used standalone or alongside event capture.no
annotation-tokenAPI key for the annotations REST API — a personal API key with the annotation:write scope. Defaults to posthog-token. Set this explicitly when capturing an event AND creating an annotation in the same step, because event ingestion uses the project API key while annotations need a personal key.no
annotation-scopeAnnotation scope: 'project' (default) or 'organization'noproject
annotation-hiddenIf 'true', hide the annotation from the PostHog UI (charts and the annotations list) while keeping it readable via the API and MCP. Use for high-frequency markers like deployments. Defaults to 'false'.nofalse
annotation-api-hostHost for the PostHog app API used to create annotations — the app host (e.g. https://us.posthog.com, https://eu.posthog.com, or a self-hosted host), NOT the event ingestion host in posthog-api-host. Not restricted to PostHog Cloud.nohttps://us.posthog.com
annotation-project-idProject to create the annotation in. Defaults to '@current' (the project the token belongs to).no@current
annotation-dedupeIf 'true', skip creating the annotation when a matching one already exists (idempotent re-runs). Match is by annotation-dedupe-key, or the full annotation text if no key is set. Defaults to 'false'.nofalse
annotation-dedupe-keyContent prefix used to detect an existing annotation when annotation-dedupe is true. Defaults to the full annotation text. Use a stable prefix (e.g. 'Deployed repo@sha to env') so a volatile suffix like a PR list doesn't defeat dedupe.no

no outputs