MCPcopy Create free account
hub / github.com/github/gh-aw / listContentsRecursively

Function listContentsRecursively

pkg/parser/remote_fetch.go:1244–1247  ·  view source on GitHub ↗

listContentsRecursively uses the GitHub Contents API to recursively enumerate all files under dirPath. Each subdirectory triggers an additional API call.

(client *api.RESTClient, owner, repo, ref, dirPath string)

Source from the content-addressed store, hash-verified

1242// listContentsRecursively uses the GitHub Contents API to recursively enumerate all
1243// files under dirPath. Each subdirectory triggers an additional API call.
1244func listContentsRecursively(client *api.RESTClient, owner, repo, ref, dirPath string) ([]string, error) {
1245 const maxSkillDirRecursionDepth = 10
1246 return listContentsRecursivelyWithDepth(client, owner, repo, ref, dirPath, 0, maxSkillDirRecursionDepth)
1247}
1248
1249func listContentsRecursivelyWithDepth(client *api.RESTClient, owner, repo, ref, dirPath string, depth, maxDepth int) ([]string, error) {
1250 if depth > maxDepth {

Callers 1

Calls 1

Tested by

no test coverage detected