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

Function previewFiles

cmd/opencodereview/delegate_cmd.go:292–307  ·  view source on GitHub ↗
(preview *agent.DiffPreview, reviewable bool)

Source from the content-addressed store, hash-verified

290}
291
292func previewFiles(preview *agent.DiffPreview, reviewable bool) []delegatePreviewFileJSON {
293 files := make([]delegatePreviewFileJSON, 0)
294 for _, entry := range preview.Entries {
295 if entry.WillReview != reviewable {
296 continue
297 }
298 files = append(files, delegatePreviewFileJSON{
299 Path: entry.Path,
300 Status: entry.Status,
301 Insertions: entry.Insertions,
302 Deletions: entry.Deletions,
303 ExcludeReason: string(entry.ExcludeReason),
304 })
305 }
306 return files
307}
308
309func ruleGroupsJSON(groups []delegate.RuleGroup) []delegateRuleGroupJSON {
310 out := make([]delegateRuleGroupJSON, 0, len(groups))

Callers 1

executeDelegatePreviewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected