GitHub Issues tracker provider - #380
Merged
Merged
Conversation
Add a third issue-tracker provider ("github") alongside Linear and Jira:
- src/tracker/github.ts: GitHubTracker over plain fetch (no new deps).
Task identity is owner/repo#N everywhere. Statuses are dual-mode,
detected per repo at init: org repos use the org's single-select
issue field (GA issue fields REST API); personal repos and unreadable
orgs degrade to status:<Name> labels. Field values are set by option
name via POST (PUT would clobber other fields). updateStatus never
throws. Rate-limit responses throw digit-free messages so the
permanent-error classifier retries them. Blockers via the issue
dependencies API.
- Webhook: POST /webhook/github (HMAC via the shared verifier),
issues events on configured repos with trigger labels poll the issue;
closed issues never trigger.
- buildProviderConfig(): single ProviderConfig construction point
(fixes any-non-jira-is-linear in config-reload/cli-clean and the
daemon switch's missing default case).
- Config: github: block (repos, statusField, statusMap, statusTypes),
GITHUB_TOKEN / GITHUB_WEBHOOK_SECRET, credential validation.
- sanitizeIdentifier(): owner/repo#42 -> owner-repo-42 for branches,
work dirs, plan/checkpoint paths, log and attachment names; /api/logs
now URL-decodes identifiers. No-op for Linear/Jira.
- Dashboard hooks page + env-var list gain github entries (server-side
only, no bundle regen).
- Tests: 70+ new cases (tracker, webhook, health, config, utils,
cli-clean). Docs: README GitHub section, configuration.md, CLAUDE.md.
Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a third issue-tracker provider,
github, alongside Linear and Jira. Critters can now poll GitHub Issues in configured repos, claim them by status, run phases, and report outcomes back — using the newly-GA issue fields API for statuses on org repos, with automaticstatus:*label fallback on personal repos.src/tracker/github.ts— fullIssueTrackerimplementation over plainfetch(no new deps, no GraphQL). Task identity isowner/repo#Neverywhere. Status mode is detected per repo at init: org single-select issue field (defaultStatus) when available,status:<Name>labels otherwise. Field values are set by option name viaPOST(neverPUT, which would clobber other fields).updateStatusnever throws. Rate-limit responses throw digit-free messages soisPermanentTrackerErrorclassifies them as retryable. Blockers via the issue-dependencies API, gated on the embedded summary count.POST /webhook/githubreusing the shared HMAC verifier (X-Hub-Signature-256); signedissuesevents on configured repos with trigger labels kick a debounced single-issue poll. Closed issues never trigger. Dashboard hooks page + env-var list gain github entries (server-side only — no bundle regen).buildProviderConfig()— single ProviderConfig construction point; fixes three latent bugs where any non-jiraprovider silently became Linear (config-reload, cli-clean) and the daemon switch had no default case.sanitizeIdentifier()(owner/repo#42→owner-repo-42, no-op for Linear/Jira) applied to branch names, work dirs, plan/checkpoint paths (prompts + all runners), log/attachment names, the logs CLI, and logger regexes;/api/logs/<id>now URL-decodes.github:block (repos,statusField,statusMap,statusTypes),GITHUB_TOKEN,GITHUB_WEBHOOK_SECRET, credential validation, statusType-bucket warning.Notes
issue_field_values, and that theensureStatusoptions PATCH round-trips existing option colors.Test plan
bun test— 1009 pass / 0 fail (74 new cases: tracker modes/behaviors, webhook signature+extractor+endpoint, health logs decoding, config validation, utils sanitize, cli-clean identifier extraction)bun run typecheckbun run lint🤖 Generated with Claude Code