MCPcopy Index your code
hub / github.com/coder/coder / FetchPullRequestDiff

Method FetchPullRequestDiff

coderd/externalauth/gitprovider/gitprovider.go:142–142  ·  view source on GitHub ↗

FetchPullRequestDiff returns the raw unified diff for a pull request. This uses the PR's actual base branch (which may differ from the repo default branch, e.g. a PR targeting "staging" instead of "main"), so it matches what the provider shows on the PR's "Files changed" tab. Returns ErrDiffTooLarge

(ctx context.Context, token string, ref PRRef)

Source from the content-addressed store, hash-verified

140 // the provider shows on the PR's "Files changed" tab.
141 // Returns ErrDiffTooLarge if the diff exceeds MaxDiffSize.
142 FetchPullRequestDiff(ctx context.Context, token string, ref PRRef) (string, error)
143
144 // FetchBranchDiff returns the diff of a branch compared
145 // against the repository's default branch. This is the

Calls

no outgoing calls

Tested by 5

TestGitLabIntegrationFunction · 0.52
TestGitLabRateLimitFunction · 0.52