Repository navigation
feat(mr): expose merge request diffs and commit history - #702
Merged
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort 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 083488b. Configure here.
There was a problem hiding this comment.
Stale comment
Risk: medium. Left a non-blocking comment. Cursor Bugbot reported an unresolved high-severity finding on agent-turn access for the new MR read commands, so this is not approved. Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: Pull Request Router and Approver
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.



T3 Code needs to read Depot merge request changes and commit history to support file review. The CLI currently exposes MR metadata but has no commands for these reads.
Add
depot mr diff,mr commits, andmr fileusing the existing CodeService APIs. Commands accept the current branch, an explicit branch, or--id, and use the MR’s recorded revisions so merged or closed requests retain their historical comparison. Existing commands remain unchanged.mr diffprints a unified diff, with--name-only,--stat, and individual-commit support.Most of the diff is the CodeService protobuf contract and generated Go bindings. This PR requires no new API endpoint.
Validation:
go test ./..., golangci-lint v2.14.0 (0 issues), module verification/tidy, CLI build/help smoke check, formatting, and reproducible protobuf generation passed. Also verified reads against merged MRs and the local T3 integration. Linux/container validation and release packaging remain for CI.Tracked in DEP-8713.
Created with GPT-6 Astra in Codex.
Catch up on this pull request in Depot
Note
Medium Risk
Adds new authenticated remote-read paths and large generated API bindings, but existing MR commands are unchanged and the new surface is read-only with explicit limits on incomplete or unsafe output.
Overview
Adds
depot mr diff,depot mr commits, anddepot mr fileso the CLI can inspect merge request changes via the CodeService APIs. A shared comparison resolver loads the MR (branch,--id, or current checkout), uses the recorded head/base for historical comparisons on merged/closed MRs, and optionally compares a single commit with--commitagainst its first parent.mr diffrenders unified patches (or--name-only/--stat), with path filtering, context lines, and JSON paging vianextPageToken. Binary and oversized files are labeled explicitly; text mode errors when a diff is incomplete.mr commitslists commits on the MR branch not reachable from the recorded base.mr filefetches exact changed paths (paged compare + rangedGetBlob) up to 4 MiB per side, with JSON base64 or text output.Wires
api.NewCodeClient()and registers the new subcommands underdepot mr. The bulk of the diff vendors the v1beta2 CodeService protobuf/Connect client (and MCP tool options); behavior is covered by new integration-style tests indiff_test.go.Reviewed by Cursor Bugbot for commit 441deb8. Bugbot is set up for automated code reviews on this repo. Configure here.