Skip to content

feat(scm): fetch provider PR review body from GitHub#3010

Merged
illegalcall merged 1 commit into
feat/persist-pr-review-bodyfrom
feat/scm-fetch-pr-review-body
Jul 23, 2026
Merged

feat(scm): fetch provider PR review body from GitHub#3010
illegalcall merged 1 commit into
feat/persist-pr-review-bodyfrom
feat/scm-fetch-pr-review-body

Conversation

@codebanditssss

Copy link
Copy Markdown
Collaborator

Summary

Step 2 of the reviews-tab revamp (#2433): actually populate the pr_reviews.body column added in #3009 by fetching the review summary text from GitHub.

  • ports.SCMReviewSummaryObservation gains Body.
  • The GitHub review-summary GraphQL node now requests body, mapped in scmReviewSummaryFromGraphQL.
  • Body flows through domainFromObservation (the observer refresh path) and claimRowsFromSCM (the session claim path), so both persistence entry points carry it into the domain review rows written by the store.

Bounds are unchanged: still only the decisive submitted reviews (APPROVED / CHANGES_REQUESTED), capped by githubReviewSummaryLimit (20).

Stacked on #3009

⚠️ Based on feat/persist-pr-review-body (#3009), not main — it needs the domain.PullRequestReview.Body field and the store column from that PR. Merge #3009 first, then this retargets to main cleanly. Review just the top commit here.

Exposing the body through the session PR API / DTO / openapi is the next PR.

Tests

  • cd backend && go build ./... && go vet ./internal/adapters/scm/github/ ./internal/observe/scm/ ./internal/service/session/ ./internal/ports/ clean
  • go test ./internal/adapters/scm/github/ ./internal/observe/scm/ ./internal/service/session/ -count=1 — provider test now asserts the query requests body and maps it through FetchReviewThreads
  • gofmt clean

Request the review `body` in the GitHub review-summary GraphQL selection
and carry it through the SCM observation into the domain review rows, so
the body column persisted in #3009 is actually populated.

- add Body to ports.SCMReviewSummaryObservation
- request body in the reviewSummaries GraphQL node and map it in
  scmReviewSummaryFromGraphQL
- carry Body through domainFromObservation (observer) and claimRowsFromSCM
  (session claim path)

Bounds are unchanged: still only the decisive submitted reviews capped by
githubReviewSummaryLimit. Exposing the body through the session PR API is
the next PR. Part of the reviews-tab revamp (#2433).
@illegalcall
illegalcall merged commit b905283 into feat/persist-pr-review-body Jul 23, 2026
9 checks passed
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.

2 participants