I need to list all the file names under a directory of my repository.
The following api can list filenames and directories from root directory.
https://api.github.com/repos/username/repo-name/git/trees/master?recursive=1
Found no appropriate api to list directory wise!
CodePudding user response:
Use https://api.github.com/repos/{owner}/{repo}/contents/{path}
See documentation here: https://docs.github.com/en/rest/reference/repos#get-repository-content