feat: Add total commits to [GitHubCommitActivity] (#9196)
* feat: Add total commits to GithubCommitActivity As part of a new feature proposed at issue #6070 added the requested feature. I also used the conversation at pull request #6081 as a basis for those changes. This change adds a new interval to the github/commit-activity shield 'total' (t for short). The interval shows the total commits of the repo since its creation. * Fix format with prettier * Label for 'total' interval is now commits Label change for the 'total' interval from 'commit activity' to 'commits' --------- Co-authored-by: jNullj <jNullj@users.noreply.github.com> Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import Joi from 'joi'
|
||||
import {
|
||||
isMetricOverTimePeriod,
|
||||
isZeroOverTimePeriod,
|
||||
isMetric,
|
||||
} from '../test-validators.js'
|
||||
import { createServiceTester } from '../tester.js'
|
||||
export const t = await createServiceTester()
|
||||
@@ -11,6 +12,11 @@ const isCommitActivity = Joi.alternatives().try(
|
||||
isZeroOverTimePeriod
|
||||
)
|
||||
|
||||
t.create('commit acticity (total)').get('/t/badges/shields.json').expectBadge({
|
||||
label: 'commits',
|
||||
message: isMetric,
|
||||
})
|
||||
|
||||
t.create('commit activity (1 year)').get('/y/eslint/eslint.json').expectBadge({
|
||||
label: 'commit activity',
|
||||
message: isMetricOverTimePeriod,
|
||||
|
||||
Reference in New Issue
Block a user