Skip to content

sangheestyle/bigdiff-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bigdiff-code

You can find what we need to do in issue.

Setup

To setup the environment, run:

$ git clone https://github.com/sangheestyle/bigdiff-code
$ cd bigdiff-code
$ npm install

For more information, please see documentation for bigdiff-code

How to use

You can see some example to know how to use this module.

Submodules and functionalities

The bigdiff-code module will give you submodules for accessing repositories and social artifacts.

git

Wrap git functionalities.

  • git.log: do git log with given regular expression.
  • git.grep: grep commits by given regular expression and context.
  • git.clone: clone single repository.
  • git.multipleClone: clone single or multiple repositories.

github

Find repositories or issues via various criteria. See Search APIs.

  • github.authClient: return a client with authentification.
  • github.getRepoIssues: get issues of a repository and save result in DB.
  • github.searchRepos: search repos and save result in DB.

googlePlay

Search packages, crawl their information, and save them.

  • getReviews: crawl reviews of app.
  • isExisted: check a app whether existed or not in Google Play with package ID.

utils

Some utils help other modules.

  • utils.dateRange: generate date range between start and end date.

REST APIs

POST api/search/commits

Search regex for commits with some params. example

$ curl -H "Content-Type: application/json" -X POST \
-d '{"regex": ".setTag\\([^,|^\\(]*,[^,]*\\)", "ext":"java", "local_repo_root": "demo_set", "max":100}' \
http://sangheestyle.com:8080/api/search/commits \
-o result.json

Params:

  • regex: regular expression
  • ext: file extension
  • local_repo_root: root directory including cloned repos
    • repos: root including all the cloned repos
    • demo_set: root incuding only some cloned repos
  • max: max number of result to get limited result

Style guide

You will want to understand and follow the style guides listed below.