Daily Git(hub)
Get all of your commits on github (default: since last work day (0 am).
Create new github token
https://github.com/settings/tokens/new (use default settings)
Save github credentials using npm config
npm config set daily-git:token <TOKEN>npm config set daily-git:username <USERNAME>
Installation & How to use
npm install -g daily-git # default is 1 day daily-git # want to have last 10 days? daily-git --days 10
Use it as a dependency
You can use daily-git as a dependency.
Installation
npm install daily-git --save
Examples
Print your daily and the request limit.
var dailygit = ; // init function must be called firstdailygit ;
Do the same manually.
var dailygit = ; dailygit ;
Available functions
var dailygit = ; dailygit; // must be called first, set days to 10 dailygitprint; // prints given string as an info to consoledailygitprint; // prints given string as an error to consoledailygitprint; // prints given commit to console // every of the following functions returns a bluebird Promise https://github.com/petkaantonov/bluebird/blob/master/API.md dailygitprint; // prints remaining requests countdailygitprint; // prints your daily git(hub) dailygit; // promise result: an object: { left: 5000, max: 5000 }dailygit; // promise result: an array of octnode repos, e.g. client.repo('pksunkara/octonode')dailygit; // promise result: an array of octonode repos, e.g. client.repo('pksunkara/octonode')dailygit; // promise result: an array of octonode repos, e.g. client.repo('pksunkara/octonode')dailygit; // promise result: an array of branch objects: https://developer.github.com/v3/repos/#list-branchesdailygit; // promise result: an array of commit objects: https://developer.github.com/v3/repos/commits/#list-commits-on-a-repositorydailygit; // promise result: [{repoData: { name: '', owner: '', repo: octonodeRepo }, branches: [{ name: '', commits: [...] }] ...} ...]