Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
git-commit-statistics
Advanced tools
Readme
Get commit log statistics of git repository.
Can get belows statistics. Examples of result are here.
$ npm install git-commit-statistics
const CommitStatistics = require('git-commit-statistics');
const cs = new CommitStatistics('<yourRepositoryPath>/.git');
//No options
let result = cs.getByPerDayOfMonth();
//With options
const options = {
author: 'YoshinoriN',
since: '2017-01-01',
after: '2018-01-01',
maxCount: 100,
noMerges: true
};
let result = cs.getByPerDayOfMonth(options);
All available methods are belows.
name | options | result |
---|---|---|
getByPerDayOfMonth() | Options | example |
getByPerMonth() | Options | example |
getByPerWeekDay() | Options | example |
getByPerYear() | Options | example |
getByDayHour() | Options | example |
getByDayHourOfWeekDay() | Options | example |
Input argument to each method. Example is below.
const options = {
author: 'YoshinoriN',
maxCount: 100
};
let result = cs.getByPerDayOfMonth(options);
Allowable options for each methods argument.
name | type | example |
---|---|---|
author | string | 'YoshinoriN' |
since | string | '2017-01-01' |
after | string | '2018-01-01' |
until | string | '2018-01-01' |
before | string | '2018-01-01' |
maxCount | number | 100 |
noMerges | boolean | true |
Please see official git document what is mean.
Example result of each methods.
[ { day: 1, count: 809 },
{ day: 2, count: 733 },
...
{ day: 30, count: 642 },
{ day: 31, count: 340 } ]
[ { id: 1, month: 'Jan', count: 2124 },
{ id: 2, month: 'Feb', count: 2147 },
...
{ id: 11, month: 'Nov', count: 1631 },
{ id: 12, month: 'Dec', count: 2110 } ]
[ { id: 0, dayOfWeek: 'Sun', count: 1891 },
{ id: 1, dayOfWeek: 'Mon', count: 3899 },
...
{ id: 5, dayOfWeek: 'Fri', count: 3765 },
{ id: 6, dayOfWeek: 'Sat', count: 1950 } ]
[ { year: 2009, count: 915 },
{ year: 2010, count: 1945 },
...
{ year: 2017, count: 4610 },
{ year: 2018, count: 3429 } ]
[ { hour: 0, count: 744 },
{ hour: 1, count: 671 },
...
{ hour: 22, count: 987 },
{ hour: 23, count: 938 } ]
{ id: 0,
Sun:
[ { hour: 11, count: 1 },
{ hour: 12, count: 1 },
{ hour: 23, count: 1 } ] }
{ id: 1,
Mon:
[ { hour: 8, count: 1 },
{ hour: 9, count: 3 },
...
{ hour: 20, count: 2 },
{ hour: 21, count: 1 } ] }
...
{ id: 5,
Fri:
[ { hour: 5, count: 4 },
{ hour: 7, count: 2 },
...
{ hour: 21, count: 1 } ] }
{ id: 6,
Sat:
[ { hour: 1, count: 2 },
{ hour: 4, count: 1 },
...
{ hour: 20, count: 1 },
{ hour: 21, count: 2 } ] }
MIT
FAQs
Get commit log statistics of git repository
The npm package git-commit-statistics receives a total of 1 weekly downloads. As such, git-commit-statistics popularity was classified as not popular.
We found that git-commit-statistics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.