Example #1
0
File: github.js Project: jpoz/dashy
GitHub.prototype.parse = function(commit) {
  var self = this;
  var auth = this.$config.auth;
  
  var github = new GitHubApi(true);
  github.authenticate(auth.username, auth.token);
  github.getCommitApi().showCommit(this.$config.username,this.$config.repo,commit.id,function(err, commit_info) {
    self._parse_line_changes(commit_info);
  });
}
Example #2
0
File: github.js Project: jpoz/dashy
GitHub.prototype.get = function() {
  var self = this;
  var auth = this.$config.auth;
  
  var github = new GitHubApi(true);
  github.authenticate(auth.username, auth.token);
  github.getCommitApi().getBranchCommits(this.$config.username,this.$config.repo,this.$config.branch,function(err, commits) {
    for (var key in commits) {
      var commit = commits[key];
      self.save(commit);
    }
  });
}