posthog/PostHog Watcher

Triage GitHub issues with pi and optionally open straightforward fix PRs

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 7, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: posthog/posthog-watcher-action@dd71af80d9ffc6957a1bac044f13abb889c83518 # v0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
posthog-api-keyPostHog OAuth access token (pha_...) used by pi against the PostHog LLM gateway. Personal API keys (phx_...) are rejected by the gateway. Required for posthog/* models except in enqueue mode.no""
posthog-regionPostHog Cloud region (us, eu, or dev). Used with posthog/* models for the LLM gateway, and with fix-executor posthog-code to pick the PostHog Code tasks REST API host.nous
openai-api-keyOpenAI API key used by pi. Required for openai/* models except in enqueue mode.no""
fix-executorFix execution engine. pi runs the guarded local repair loop; posthog-code delegates the whole fix to PostHog Code's cloud sandbox, which opens the PR itself. WARNING - posthog-code bypasses this action's fix guardrails (repair loop, reproduction checks, max-changed-files/max-diff-lines, independent review gate, GitHub-signed commits, validation-command, PR template).nopi
posthog-code-api-keyPostHog personal API key (phx_...) for the PostHog Code tasks REST API. Required when fix-executor is posthog-code. This is a different credential from posthog-api-key (the pha_ LLM gateway token).no""
posthog-code-project-idPostHog project id for the PostHog Code tasks REST API. Required when fix-executor is posthog-code. The API host comes from posthog-region and the cloud model from the model input (posthog/* ids map directly; other providers fall back to claude-opus-4-8).no""
posthog-code-runtime-adapterPostHog Code runtime adapter for delegated cloud runs.noclaude
posthog-code-poll-interval-msPoll interval in milliseconds while waiting for a delegated PostHog Code run to finish.no15000
posthog-code-timeout-msOverall timeout in milliseconds for a delegated PostHog Code run before the action requests cancellation.no1800000
github-tokenGitHub token for issue labels, comments, branches, and PRsno${{ github.token }}
modelpi model identifier. openai/* models call OpenAI directly, posthog/* models route through the PostHog LLM gateway.noopenai/gpt-5.6-terra:high
issue-numberIssue number to process. Defaults to the issue from the event payload.no""
modeauto, triage, investigate, fix, commit-review, pr-review, sweep, enqueue, or drain-queuenoauto
allow-fixWhether the action may create a fix branch and draft PRnofalse
allow-closeWhether trusted maintainer close/apply-close commands may close high-confidence issuesnofalse
allow-security-aiWhether suspected security-sensitive reports may be sent to pi/OpenAI. Defaults to false.nofalse
require-fix-commandRequire a trusted watcher fix command before opening or updating fix PRsnofalse
command-mentionGitHub mention that triggers watcher issue-comment commandsno@posthog-watcher
block-feature-fixesRequire explicit fix intent before opening fix PRs for feature requestsnotrue
dry-runLog intended GitHub mutations without applying themnofalse
labelsComma-separated allowlist of labels the agent may add, or * to use all repository labels except managed labelsno*
managed-label-prefixPrefix for labels exclusively managed by this actionnoposthog-watcher:
sync-managed-labelsWhether to remove stale labels with managed-label-prefix before adding current managed labelsnotrue
max-commentsMaximum issue comments to include in contextno20
max-changed-filesMaximum changed files allowed for an autogenerated PRno5
max-diff-linesMaximum diff lines allowed for an autogenerated PRno500
max-repair-attemptsMaximum pi repair attempts before giving up on a fix PR. Hard-capped at 3.no2
max-related-itemsMaximum related same-repo issues/PRs to include as advisory triage contextno5
validation-commandOptional shell command to validate an autogenerated fix before opening a PRno""
reproduction-commandOptional shell command expected to fail before an issue fix and pass after itno""
require-reproductionRequire a failing reproduction before issue fix PR attempts. Uses reproduction-command, or validation-command after pi adds a minimal regression check.nofalse
fix-pr-review-teamOptional team reviewer slug or org/team (for example acme/platform-reviewers) for generated fix PRs. Empty means no team review request.no""
allow-pr-reviewWhether pr-review mode may post code reviews (summary comment + inline diff comments) on pull requests. Only same-repo PRs are reviewed; fork PRs are always skipped so the model API key is never exposed to untrusted code.nofalse
max-review-filesMaximum changed files to include when reviewing a pull request in pr-review modeno30
max-review-findingsMaximum inline findings pr-review may post on a single pull requestno20
commit-shaCommit SHA to review when mode is commit-review. Defaults to github.sha.no""
max-sweep-itemsMaximum open issues to process in sweep modeno10
max-sweep-fix-itemsMaximum sweep items that may attempt fixes. Defaults to 0.no0
sweep-queryGitHub search query suffix for sweep modenois:issue is:open archived:false
skip-sweep-trusted-authorsWhether sweep mode skips issues created by trusted repository authors (OWNER, MEMBER, or COLLABORATOR), with a collaborator-permission fallbacknotrue
queued-modeDefault processing mode stored by enqueue mode when no trusted watcher command is present. One of auto, triage, investigate, or fix.noauto
trigger-drain-workflowIn enqueue mode, dispatch drain-workflow after adding a new queue item. Requires actions: write permission.nofalse
drain-workflowWorkflow filename or ID to dispatch when trigger-drain-workflow is truenoposthog-watcher-worker.yml
max-queue-itemsMaximum queued items to drain sequentially in one drain-queue runno5
max-queue-attemptsMaximum failed drain attempts before dropping a queued itemno3
max-pi-callsMaximum pi calls allowed for this action runno16
pi-timeout-msTimeout in milliseconds for each pi subprocessno600000
pi-retriesNumber of times to retry a failed pi subprocess before failingno3
approve-project-resourcesPass --approve to pi so host repository AGENTS.md, .pi, and .agents resources can be trusted in CInofalse
state-enabledWhether to write durable markdown state records, repo memory, and dashboard to state-branchnofalse
repo-memory-enabledWhether to read/write advisory repo memory when state-enabled is truenotrue
progress-commentsWhether to update the marker-backed issue comment with in-progress phase/status updatesnotrue
pi-session-sharingSave captured pi JSONL session files and link resume instructions from watcher commentsnofalse
pi-session-sharing-modeWhere to save captured pi JSONL session files. One of state-branch or gistnostate-branch
pi-session-gist-tokenToken with gist permission, required when pi-session-sharing-mode is gistno""
state-repoRepository for durable state as owner/repo. Defaults to current repository.no""
state-branchBranch for durable state records and dashboardnoposthog-watcher-state
comment-markerHidden marker used to create/update durable comments and identify watcher-generated comments during security assessmentno<!-- posthog-watcher-action -->
pi-versionVersion of @earendil-works/pi-coding-agent to invoke with npxno0.80.7
namedescription
conclusionTriage conclusion
labelsLabels selected by the agent after allowlist filtering
comment-urlCreated or updated triage comment URL
pr-urlDraft PR URL, when a fix PR was created
closedWhether the issue was closed by an explicit trusted close/apply-close command
triage-jsonRaw normalized triage JSON
review-verdictPull request review verdict when mode is pr-review (clean, comment, or changes_requested)