How to scan GitHub repository?

John Glabb

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?

Pedro Maia Costa

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.

edited at
0

Comments

0 comments
Login to comment

Related

How to sync a repository with github?

How to archive a repository on GitHub

How to access github repository

How can I scan a maven repository?

How to populate a github repository with local git repository?

How to create a local repository and upload to repository on GitHub?

How to run a javascript github repository?

Ownership on github and how to unfork a repository?

how to display the contributors of a Github repository

how to un fork the github repository?

How to delete remote repository on github?

How to delete the content of github repository?

How to fork a GitLab repository to GitHub?

How to remove contributors in github repository?

How to create a folder in the repository in GitHub?

GitHub: how to add Subfolders to a GitHub-Repository

How to push a Git server repository issues to Github repository?

How to correctly add my new repository to github - repository not found

How to delete a link between a GitHub repository and the previous name of the repository?

How to remove a commit on repository of GitHub from merge of other repository?

How to make a public forked repository to personal private repository in github?

How to get the total amount of contributors to a GitHub repository?

How to move a file programatically in a GitHub repository with Java?

How do I create a folder in a GitHub repository?

How to add screenshot to READMEs in github repository?

How to download the latest file from a GitHub repository?

How to list all the tags for a repository in GitHub?

How to colorize a part of code in a GitHub repository?

How to import diffusion repository to github with complete history?