Skip to content

Conversation

@nuttycom
Copy link
Owner

@nuttycom nuttycom commented Feb 4, 2026

When a PR with "Time Spent: " in its description is merged, the system automatically credits work time to the PR author. Supports duration formats like "2h30m", "2 hours", "2.5h", "150m".

Key features:

  • Webhook endpoint with HMAC-SHA256 signature verification
  • Links GitHub repos to Aftok projects with per-repo secrets
  • Resolves users by linked GitHub username
  • Creates provisional users for unknown authors when merger is a project member
  • Audit logging of all webhook events for debugging/idempotency

API endpoints:

  • POST /api/webhooks/github (public, signature-verified)
  • GET/POST/DELETE /api/projects/:id/github/repos (manage repo links)
  • GET/PUT/DELETE /api/user/github (link/unlink GitHub username)

nuttycom and others added 2 commits February 9, 2026 09:52
Replace ~35 freeformObject OpenAPI schema instances with
autodocodec-based codecs that serve as a single source of truth for
JSON serialization, deserialization, and OpenAPI schema generation.

- Add autodocodec and autodocodec-openapi3 dependencies
- Create Aftok.API.Codec with HasCodec orphan instances for core types
  (UserId, ProjectId, CreditTo, DepreciationFunction, LogEvent, etc.)
- Add HasCodec instances to all API request/response types
- Replace manual ToJSON/FromJSON with toJSONViaCodec/parseJSONViaCodec
- Replace freeformObject ToSchema instances with declareNamedSchemaViaCodec
- Remove redundant API-layer serialization helpers

JSON wire format is preserved exactly; core library and database layer
are unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a PR with "Time Spent: <duration>" in its description is merged,
the system automatically credits work time to the PR author. Supports
duration formats like "2h30m", "2 hours", "2.5h", "150m".

Key features:
- Webhook endpoint with HMAC-SHA256 signature verification
- Links GitHub repos to Aftok projects with per-repo secrets
- Resolves users by linked GitHub username
- Creates provisional users for unknown authors when merger is a
  project member
- Audit logging of all webhook events for debugging/idempotency

API endpoints:
- POST /api/webhooks/github (public, signature-verified)
- GET/POST/DELETE /api/projects/:id/github/repos (manage repo links)
- GET/PUT/DELETE /api/user/github (link/unlink GitHub username)

Rebased onto autodocodec branch with:
- HasCodec instances for all request/response types
- ToSchema instances for OpenAPI spec generation
- Three-package split (core/api/executables)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nuttycom nuttycom force-pushed the feature/github_pr_tracking branch from d2b7830 to d0e4161 Compare February 11, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant