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)
| 1242 | // listContentsRecursively uses the GitHub Contents API to recursively enumerate all |
| 1243 | // files under dirPath. Each subdirectory triggers an additional API call. |
| 1244 | func 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 | |
| 1249 | func listContentsRecursivelyWithDepth(client *api.RESTClient, owner, repo, ref, dirPath string, depth, maxDepth int) ([]string, error) { |
| 1250 | if depth > maxDepth { |
no test coverage detected