MCPcopy Create free account
hub / github.com/alibaba/open-code-review / GetDiff

Method GetDiff

internal/diff/git.go:210–216  ·  view source on GitHub ↗

GetDiff returns the changes available to a review as parsed model.Diff structs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

208
209// GetDiff returns the changes available to a review as parsed model.Diff structs.
210func (p *Provider) GetDiff(ctx context.Context) ([]model.Diff, error) {
211 set, err := p.GetDiffSet(ctx)
212 if err != nil {
213 return nil, err
214 }
215 return set.Included, nil
216}
217
218// GetDiffSet returns both reviewable diffs and those excluded by the provider's
219// built-in directory rules. It preserves GetDiff's filtering behavior while

Calls 1

GetDiffSetMethod · 0.95