MCPcopy Create free account
hub / github.com/Devographics/Monorepo / listGitHubFiles

Function listGitHubFiles

api/src/external_apis/github.ts:50–66  ·  view source on GitHub ↗
({
    owner,
    repo,
    path
}: {
    owner: string
    repo: string
    path: string
})

Source from the content-addressed store, hash-verified

48 return octokit
49}
50export const listGitHubFiles = async ({
51 owner,
52 repo,
53 path
54}: {
55 owner: string
56 repo: string
57 path: string
58}) => {
59 const octokit = getOctokit()
60 const contents = await octokit.request('GET /repos/{owner}/{repo}/contents/{path}', {
61 owner,
62 repo,
63 path
64 })
65 return contents.data as any[]
66}
67
68export const getRepoSHA = async ({ owner, repo }: { owner: string; repo: string }) => {
69 const octokit = getOctokit()

Callers 1

loadSurveysFromGitHubFunction · 0.90

Calls 1

getOctokitFunction · 0.85

Tested by

no test coverage detected