feat: add GitHub issue ingestion with admin #177
Conversation
|
GitHub issues ingestion with idempotent upsert (composite PK), admin-only sync endpoint, PR filtering, label→points derivation, and tests. Ready for review. |
joelamouche
left a comment
There was a problem hiding this comment.
Here is a first round of comments
joelamouche
left a comment
There was a problem hiding this comment.
Another round of comments.
Don't forget to test this with a real repo, not just the unit tests
|
Done reverted unrelated edits, renamed fields, added |
|
pls fix CI |
backend/tests/github_sync_tests.rs
Outdated
There was a problem hiding this comment.
This is not how point labels are forma ttedb in our repo
There was a problem hiding this comment.
instead of points:3 using 3pts
was tacking the label part first time, didn't have that propper clue,
|
I ran the sync locally with the guild repo and all I got was this
And the git issue db is empty You tried this locally with a git repo and it worked? |
Summary
Implements GitHub issue ingestion into the backend database per issue #74: adds the
github_issuestable with composite PK(repo_id, github_issue_id), aPOST /admin/github/syncendpoint behind admin auth, and idempotent upsert logic that derives points from labels, normalizes label names, persists assignees, and ignores PRs.Changes
006_create_github_issues_table.sqlwith composite PK and indexesGithubIssuedomain entity,GithubIssueRepositorytrait, andPostgresGithubIssueRepositorywithON CONFLICTupsertGithubServicetrait andRestGithubServiceimplementation for GitHub REST APIsync_github_issuescommand withderive_points(label patternpoints:N) andtransform_issue(lower-case labels, assignee logins, PR filtering)GithubSyncRequest/GithubSyncResponseDTOsgithub_sync_handlerand wiredPOST /admin/github/syncunder existing admin auth middlewarereqwest0.12 dependency for HTTP clientScope
Verification
cargo check --testscompiles with zero errorsCloses #74