GithubHelp home page GithubHelp logo

ghdump's Introduction

Usage

Run the script that pulls all repositories of greater than 20 stars of each major language from GitHub API:

GITHUB_ACCESS_TOKEN=<token> GO111MODULE=off go run main.go

This will dump GitHub search API responses to the api_response_dump directory. Each file corresponds to one API request.

Note: the GitHub search API limits total results for any given query to 1000, so for lower star counts, we only get the first 1000 repositories with that star count. This is fine for now.

Once you've collected some number of files in api_response_dump, run the script to add these repositories to Sourcegraph (in order of highest star count first), ensure they're queued for cloning, and added to the global search index:

GO111MODULE=off go run main.go add <file_filter_text>
# Example to add all Python repos: GO111MODULE=off go run main.go add python

Once the repositories from a given file in api_response_dump/ have been added, this script will write a file with the same name to the added/ directory. If there were errors, these will be written to the file in added/; if there were no errors, that file will be empty.

Note: currently, parallelism is set to 5, so 5 goroutines will be simultaneously reading files and adding these repositories to Sourcegraph.

ghdump's People

Contributors

beyang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.