You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{"name":"Tomer Figenblat","company":"Red Hat","status":"pr is coming","contributingSince":2017,"totalContributions":10239,"contributionsCollection": {"totalCommitContributions":7561,"totalIssueContributions":114,"totalPullRequestContributions":377,"totalPullRequestReviewContributions":663,"totalRepositoriesWithContributedCommits":202,"totalRepositoriesWithContributedIssues":52,"totalRepositoriesWithContributedPullRequestReviews":39,"totalRepositoriesWithContributedPullRequests":98,"totalRepositoryContributions":131,"totalDiscussionContributions":80,"totalGistContributions":7,"totalPackageContributions":0 }}
npx github-viewer-stats repo aioswitcher
{"name":"aioswitcher","description":"PyPi module integrating with various Switcher devices","language":"Python","license":"apache-2.0","collaborators":2,"forks":9,"stars":14,"watchers":2,"latest":"3.2.1"}
Requires aGITHUB_TOKEN environnement variable (click for the scopes)
repo
read:packages
read:user
read:discussion
admin:org
admin:org is only required for admin level organization stats, such as 2fa and pending members. If you do not require these admin properties or do not have admin permission to the organization to begin with, you can useread:org instead. Of course if won't use this tool for retrieving organization statistics, you can omit theadmin all together.
Use as a module
npm install --save github-viewer-stats
// print my user statistics to the consolerequire('github-viewer-stats').contribs().then(r=>console.log(JSON.stringify(r,null,2)));// print cool-org-name organization statistics to the consolerequire('github-viewer-stats').org('cool-org-name').then(r=>console.log(JSON.stringify(r,null,2)));// print my aioswitcher repository statistics to the consolerequire('github-viewer-stats').repo('aioswitcher').then(r=>console.log(JSON.stringify(r,null,2)));
Detailed example
const{ contribs, org, repo}=require('github-viewer-stats');asyncfunctionmain(){// collect my user statisticsletmyContributions=awaitcontribs();console.log(JSON.stringify(myContributions,null,2));// collect cool-org-name organization statisticsletmyOrg=awaitorg('cool-org-name');console.log(JSON.stringify(myOrg,null,2));// collect my aioswitcher repository statisticsletmyRepo=awaitrepo('aioswitcher');console.log(JSON.stringify(myRepo,null,2));}main();
About
Small NPM package for collecting your own GitHub statistics