'How can i search file name in specific Github repository
With Github's search API, i can search for repository's name or user's name.
How can i search the file name in the specific Github repository?
I mean how can i do that: in repo jquery/jquery, i search for "selector" keyword, i will have selector.js, selector-sizzle.js, selector-native.js and selector-folder
Thank you
Solution 1:[1]
Another way to get file index's from a repo you can do it the way the file search feature on the web-UI does.
You will however need to replace 1c522832... with a commit hash.
Also Github's REST API is weird so you will need -H 'accept: application/json'
curl 'https://github.com/torvalds/linux/tree-list/1c52283265a462a100ae63ddf58b4e5884acde86' -H 'accept: application/json' --compressed
Response:
{"paths":[".gitignore",....]}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jesse Taube |
