Skip to content

fix(miners): case-insensitive joins for review_summary and repos - #185

Closed
kiannidev wants to merge 1 commit into
entrius:testfrom
kiannidev:fix/183-miners-case-insensitive-joins
Closed

fix(miners): case-insensitive joins for review_summary and repos#185
kiannidev wants to merge 1 commit into
entrius:testfrom
kiannidev:fix/183-miners-case-insensitive-joins

Conversation

@kiannidev

@kiannidev kiannidev commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Match pr_review_summary and repos joins on LOWER(repo_full_name) in miner pull request queries
  • Fixes missing review_summary and default_branch for mixed-case repo PKs, especially in getPullRequestsByRepo

Related Issues

Fixes #183

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Testing

  • npm run build in packages/das passes

Checklist

  • I have read the Contributing Guide
  • Code builds without errors
  • New and existing tests pass (if applicable)
  • Documentation updated (if applicable)
  • No unnecessary dependencies added

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label Jun 15, 2026
@anderdc

anderdc commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

pull_requests and reviews both derive repo_full_name from the same webhook repository.full_name on the same event, so pr_review_summary (a view over reviews) cannot diverge in casing from pull_requests — that half of the fix targets a mismatch that can't occur. repos casing is pinned to the same canonical PK at ingress: webhook.service.ts rewrites payload.repository.full_name to the registered repos PK before any handler writes (#120), so the exact-case joins already match in the data. The issue's own reproduction stores the PR and the review-summary row under identical casing (Org/MyRepo); the only lowercased value is the query input, which the window join already normalizes via LOWER(p.repo_full_name). No divergent-casing data exists for these joins to miss. Closing.

@anderdc anderdc closed this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] miners API: getPullRequestsByRepo joins miss review_summary for mixed-case repos

2 participants