Conversation
- Create 10 entity files matching DB schemas (data mapper pattern, following das-gittensor conventions) - Add missing scoring-critical columns: title, closed_at, last_edited_at (pull_requests), changes (pr_files), reviewer_association (reviews) - Update DESIGN.md: resolve closing_issue_numbers extraction (GraphQL), add scope constraints (public-only, no precomputed AST), update pr_review_summary with maintainer-only filter, expand pr_scoring_inputs view with all scoring fields and edited_after_merge flag - Remove stale __tests__/ directory (spec already colocated)
…I endpoint Webhook receiver: - POST /webhooks/github with HMAC-SHA256 signature verification - Dedup via webhook_deliveries table (X-GitHub-Delivery header) - Event handlers for: pull_request, issues, reviews, comments, review_comments, labels, installation/uninstallation - Labels captured on issues and PRs (current snapshot + append-only history) Job queue (BullMQ + Redis): - Webhook handlers enqueue fetch jobs instead of calling GitHub API inline - Worker processes fetch-closing-issues (GraphQL) and fetch-pr-files (REST) - Concurrency-limited, retry with exponential backoff, dedup by job ID - Sets solved_by_pr on issues when merged PR closes them SQL views: - view_contributor_repo_roles: latest association per contributor per repo - view_pr_review_summary: review counts with maintainer-only filter - view_pr_linked_issues: PR × closing issues join with full issue data - view_pr_scoring_inputs: main scoring view (PR + reviews, no baked-in time window) API (first endpoint + Swagger): - GET /api/v1/contributors/:githubId/scoring-inputs - GET /api/v1/contributors/:githubId/counts?days=N - Swagger UI at /swagger Schema updates: - issues: add title, state_reason, labels, solved_by_pr - pull_requests: add labels - label_events: rename issue_number→target_number, add target_type - Entity nullable types fixed (null vs undefined for TypeORM) Infrastructure: - Redis added to docker-compose - Postgres mapped to port 5434 (avoids conflict with other services) - DESIGN.md updated: architecture docs, dropped materialized views in favor of live aggregation with validator-supplied lookback window
- Postgres and Redis healthchecks in docker-compose; das waits for both to be healthy before starting - Number-prefix SQL files (01-10 tables, 20-23 views) for deterministic init order in docker-entrypoint-initdb.d - Add .dockerignore to exclude node_modules/dist from build context - Align API_PORT to 6969 across .env.example and Dockerfile
Drop spec files, jest config, test deps (@nestjs/testing, jest, ts-jest), coverage thresholds, and test CI workflow. Lint glob simplified to src only.
5 tasks
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
POST /webhooks/githubwith HMAC signature verification, dedup, and 7 event handlers (PRs, issues, reviews, comments, review comments, labels, installations)contributor_repo_roles,pr_review_summary,pr_linked_issues,pr_scoring_inputs(no materialized views — counts are live with validator-supplied lookback)GET /api/v1/contributors/:githubId/scoring-inputsand/counts?days=Nwith Swagger at/swaggerTest plan
tsc --noEmitpasseseslintpassesprettier --checkpassesjestpasses