MCPcopy
hub / github.com/opentrace/opentrace / makeRepoTree

Function makeRepoTree

ui/src/components/pipeline/__tests__/helpers.ts:68–86  ·  view source on GitHub ↗
(
  files: Array<{ path: string; content?: string }>,
  opts?: {
    owner?: string;
    repo?: string;
    ref?: string;
    url?: string;
    provider?: string;
  },
)

Source from the content-addressed store, hash-verified

66}
67
68export function makeRepoTree(
69 files: Array<{ path: string; content?: string }>,
70 opts?: {
71 owner?: string;
72 repo?: string;
73 ref?: string;
74 url?: string;
75 provider?: string;
76 },
77): RepoTree {
78 return {
79 owner: opts?.owner ?? 'testorg',
80 repo: opts?.repo ?? 'testrepo',
81 ref: opts?.ref ?? 'main',
82 url: opts?.url,
83 provider: opts?.provider,
84 files: files.map((f) => ({ path: f.path, content: f.content ?? '' })),
85 };
86}

Callers 5

pipeline.test.tsFile · 0.90
runAndCollectFunction · 0.90
runBothFunction · 0.90
runAndLogFunction · 0.90
loading.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected