0.4.4 • Published 9 years ago

github-metrics v0.4.4

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

github-metrics

a repo to track github stats across different users github repos

Npm Version Build Status Coverage Status Dependency Status devDependency Status npm npm

Installation

npm install github-metrics -g

Usage

command-line

Usage: github-metrics [options]


Options:

  -V, --version        output the version number
  -u, --user [user]    the name of the user that you want to get metrics for.
  -t, --token [token]  github access token to make requests.
  -k, --keys [keys]    keys to be passed to make the table based on the comma seperated keys you provide.
  -s, --sort [sort]    key to be used to sort against the returned value
  -a, --asc            by default the sorting is descending if this is selected it will be ascending
  -l, --limit [limit]  limit the number of repos that are being returned
  --table              output a table of the data
  -h, --help           output usage information

examples

github-metrics --user gabrielcsapo // this will call github using the public api

github-metrics --user gabrielcsapo --token {token} // this will make the call with an authenticated token

Debugging any errors that occur during your call please preface with DEBUG=github-metrics and example would look like

DEBUG=github-metrics github-metrics --user gabrielcsapo

programatic

const Metrics = require('github-metrics');
Metrics({
    user: '',
    token: '',
    keys: [],
    sort: '',
    sortAsc: false,
    limit: 10
}, function(err, metrics) { });

Keys Available

[
  'archive_url',
  'assignees_url',
  'blobs_url',
  'branches_url',
  'clone_url',
  'collaborators_url',
  'comments_url',
  'commits',
  'commits_url',
  'compare_url',
  'contents_url',
  'contributors_url',
  'created_at',
  'days_stagnant',
  'default_branch',
  'deployments_url',
  'description',
  'deprecated',
  'downloads_url',
  'events_url',
  'fork',
  'forks',
  'forks_count',
  'forks_url',
  'full_name',
  'git_commits_url',
  'git_refs_url',
  'git_tags_url',
  'git_url',
  'has_downloads',
  'has_issues',
  'has_pages',
  'has_wiki',
  'health',
  'homepage',
  'hooks_url',
  'html_url',
  'id',
  'issue_comment_url',
  'issue_events_url',
  'issues_url',
  'keys_url',
  'labels_url',
  'language',
  'languages',
  'languages_url',
  'last_contribution',
  'merges_url',
  'milestones_url',
  'mirror_url',
  'name',
  'notifications_url',
  'open_issues',
  'open_issues_count',
  'owner',
  'permissions',
  'private',
  'pulls_url',
  'pushed_at',
  'releases_url',
  'size',
  'ssh_url',
  'stargazers_count',
  'stargazers_url',
  'statuses_url',
  'subscribers_url',
  'subscription_url',
  'svn_url',
  'tags_url',
  'teams_url',
  'trees_url',
  'topics',
  'updated_at',
  'url',
  'watchers',
  'watchers_count'
 ]

Example

github-metrics --user gabrielcsapo --keys 'full_name, homepage, commits, open_issues_count, days_stagnant, health' --sort 'days_stagnant' --asc --table

full_namehomepagecommitsopen_issues_countdays_stagnanthealth
"gabrielcsapo/json-ex""http://www.gabrielcsapo.com/json-ex/"601"🌞"
"gabrielcsapo/node-git-server""http://www.gabrielcsapo.com/node-git-server/"2726"🌞"
"gabrielcsapo/node-notebook""http://www.gabrielcsapo.com/node-notebook/"14427"🌞"
"gabrielcsapo/gabrielcsapo.github.io""http://www.gabrielcsapo.com"7727"🌞"
"gabrielcsapo/psychic-ui""http://www.gabrielcsapo.com/psychic-ui/"130110"🌞"
"gabrielcsapo/node-coverage-server""https://node-coverage-server.herokuapp.com/"80721"🌞"
"gabrielcsapo/espyjs"6027"🌞"
"gabrielcsapo/psychic""http://www.gabrielcsapo.com/psychic/"8245"⛅️"
"gabrielcsapo/monotime""http://www.gabrielcsapo.com/monotime/"5051"⛅️"
"gabrielcsapo/node-tester"4095"🌩"
"gabrielcsapo/prompt"17099"🌩"
"gabrielcsapo/node-distribute""http://www.gabrielcsapo.com/node-distribute/"1247101"🌩"
"gabrielcsapo/github-metrics"402131"🌩"
"gabrielcsapo/granary-server""http://granaryjs.com"1681135"🌩"
"gabrielcsapo/compress-object""http://www.gabrielcsapo.com/compress-object/"221141"🌩"
"gabrielcsapo/node-chat-rooms""http://www.gabrielcsapo.com/node-chat-rooms/"711148"🌩"
"gabrielcsapo/npm-what"333149"🌩"
"gabrielcsapo/grunt-screenshot"531170"🌩"
"gabrielcsapo/node-dashboard"792259"🌩"
"gabrielcsapo/node-flat-db"2260264"🌩"
"gabrielcsapo/node-timecapsule"70271"🌩"
"gabrielcsapo/granary""http://granaryjs.com"650291"🌩"
"gabrielcsapo/node-document-parser"100301"🌩"
"gabrielcsapo/mocha-markdown-extended-reporter"20317"🌩"
"gabrielcsapo/granary-sample"50376"🌩"
"gabrielcsapo/dobby"110645"🌩"
0.4.4

9 years ago

0.4.3

9 years ago

0.4.2

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.6

9 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago