Is there a way to build Node.js app that scans remote GitHub repository? I need to extract a specific file from each remote GitHub repository I have access to (e.g. Read.me files) and download them to a specific folder. Or should I clone each repo with Node.js app code first?
If you just need one file from each repo, and they're all public, you can just do a http request to the raw git url in this format, https://raw.githubusercontent.com/{username}/{repo}/{branch}/{pathtofile}
a simple example would be:
const http = require('http');
http.get('https://raw.githubusercontent.com/nodejs/node/master/README.md', function(response) {
// do something with response, pipe to another file etc.
});
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments