Repository navigation
feat(seer): Look up a pull request's files by repo name and number - #129322
Merged
Merged
Conversation
Add `GET /organizations/{org}/repos/pull-request-files/?repo=&number=`,
which returns a pull request's files from its provider, found by the
repository's name and the PR's number rather than our PullRequest row.
Seer runs open and push to PRs we may have no record of, and Ask Seer's
PR bar needs each PR's diff to show the run's changes on top of it. The
response adds each file's status and previous path, for renames.
The existing endpoint and the new one share the provider fetch.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c3de431. Configure here.
Repository names aren't unique within an org, so picking the oldest match could fetch another repository's PR with the same number. Return 404 when the name matches more than one active integrated repo, as resolve_active does. Co-Authored-By: Joseph Sawaya <[email protected]>
alexsohn1126
approved these changes
Nov 2, 2026
joshuarli
added a commit
that referenced
this pull request
Nov 3, 2026
`backend typing` is red on master. It first failed on 56e837a (#129330), but that commit isn't the cause. The cause is #129322, which added six unannotated test methods to `test_organization_pull_request_files.py`. It merged after strict mypy was turned on in #129614, so the two PRs raced and CI started reporting `no-untyped-def` on master. This adds `MagicMock` / `-> None` annotations to those methods, the same way the rest of the file already does it. Only type hints change. Test behavior stays the same. <!-- junior-request-attribution:start --> via @joshuarli. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AD0BQC9WSQ2E%3A1793720276.363209 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AD0BQC9WSQ2E%3A1793720276.363209) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0BQC9WSQ2E%3A1793720276.363209/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Joshua Li <[email protected]>
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.

Adds
GET /organizations/{org}/repos/pull-request-files/?repo=<owner/name>&number=<n>, which returns a pull request's files from its provider, found by the repository's name and the PR's number.The existing
pull-requests/{id}/files/endpoint needs ourPullRequestrow, and Seer runs open and push to PRs we may have no record of. Ask Seer's PR bar needs each of the run's PRs' diffs to show the run's changes on top of them, so it looks PRs up the way Seer knows them.statusandpreviousPath, so renames show correctly.The frontend that uses it is #129323, which should merge after this deploys.
🤖 Generated with Claude Code