Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of plurals in statistics #1077

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2032,25 +2032,25 @@ class Statistics {
]);
}
_logDeletedIssuesAndPullRequestsLabelsCount() {
this._logGroup('Deleted items labels', [
this._logGroup('Deleted item labels', [
{
name: 'Deleted issues labels',
name: 'Deleted issue labels',
count: this.deletedIssuesLabelsCount
},
{
name: 'Deleted PRs labels',
name: 'Deleted PR labels',
count: this.deletedPullRequestsLabelsCount
}
]);
}
_logDeletedCloseIssuesAndPullRequestsLabelsCount() {
this._logGroup('Deleted close items labels', [
this._logGroup('Deleted closed item labels', [
{
name: 'Deleted close issues labels',
name: 'Deleted closed issue labels',
count: this.deletedCloseIssuesLabelsCount
},
{
name: 'Deleted close PRs labels',
name: 'Deleted closed PR labels',
count: this.deletedClosePullRequestsLabelsCount
}
]);
Expand All @@ -2059,25 +2059,25 @@ class Statistics {
this._logCount('Deleted branches', this.deletedBranchesCount);
}
_logAddedIssuesAndPullRequestsLabelsCount() {
this._logGroup('Added items labels', [
this._logGroup('Added item labels', [
{
name: 'Added issues labels',
name: 'Added issue labels',
count: this.addedIssuesLabelsCount
},
{
name: 'Added PRs labels',
name: 'Added PR labels',
count: this.addedPullRequestsLabelsCount
}
]);
}
_logAddedIssuesAndPullRequestsCommentsCount() {
this._logGroup('Added items comments', [
this._logGroup('Added item comments', [
{
name: 'Added issues comments',
name: 'Added issue comments',
count: this.addedIssuesCommentsCount
},
{
name: 'Added PRs comments',
name: 'Added PR comments',
count: this.addedPullRequestsCommentsCount
}
]);
Expand All @@ -2086,10 +2086,10 @@ class Statistics {
this._logCount('Fetched items', this.fetchedItemsCount);
}
_logFetchedItemsEventsCount() {
this._logCount('Fetched items events', this.fetchedItemsEventsCount);
this._logCount('Fetched item events', this.fetchedItemsEventsCount);
}
_logFetchedItemsCommentsCount() {
this._logCount('Fetched items comments', this.fetchedItemsCommentsCount);
this._logCount('Fetched item comments', this.fetchedItemsCommentsCount);
}
_logFetchedPullRequestsCount() {
this._logCount('Fetched pull requests', this.fetchedPullRequestsCount);
Expand Down
28 changes: 14 additions & 14 deletions src/classes/statistics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,26 +363,26 @@ export class Statistics {
}

private _logDeletedIssuesAndPullRequestsLabelsCount(): void {
this._logGroup('Deleted items labels', [
this._logGroup('Deleted item labels', [
{
name: 'Deleted issues labels',
name: 'Deleted issue labels',
count: this.deletedIssuesLabelsCount
},
{
name: 'Deleted PRs labels',
name: 'Deleted PR labels',
count: this.deletedPullRequestsLabelsCount
}
]);
}

private _logDeletedCloseIssuesAndPullRequestsLabelsCount(): void {
this._logGroup('Deleted close items labels', [
this._logGroup('Deleted closed item labels', [
{
name: 'Deleted close issues labels',
name: 'Deleted closed issue labels',
count: this.deletedCloseIssuesLabelsCount
},
{
name: 'Deleted close PRs labels',
name: 'Deleted closed PR labels',
count: this.deletedClosePullRequestsLabelsCount
}
]);
Expand All @@ -393,26 +393,26 @@ export class Statistics {
}

private _logAddedIssuesAndPullRequestsLabelsCount(): void {
this._logGroup('Added items labels', [
this._logGroup('Added item labels', [
{
name: 'Added issues labels',
name: 'Added issue labels',
count: this.addedIssuesLabelsCount
},
{
name: 'Added PRs labels',
name: 'Added PR labels',
count: this.addedPullRequestsLabelsCount
}
]);
}

private _logAddedIssuesAndPullRequestsCommentsCount(): void {
this._logGroup('Added items comments', [
this._logGroup('Added item comments', [
{
name: 'Added issues comments',
name: 'Added issue comments',
count: this.addedIssuesCommentsCount
},
{
name: 'Added PRs comments',
name: 'Added PR comments',
count: this.addedPullRequestsCommentsCount
}
]);
Expand All @@ -423,11 +423,11 @@ export class Statistics {
}

private _logFetchedItemsEventsCount(): void {
this._logCount('Fetched items events', this.fetchedItemsEventsCount);
this._logCount('Fetched item events', this.fetchedItemsEventsCount);
}

private _logFetchedItemsCommentsCount(): void {
this._logCount('Fetched items comments', this.fetchedItemsCommentsCount);
this._logCount('Fetched item comments', this.fetchedItemsCommentsCount);
}

private _logFetchedPullRequestsCount(): void {
Expand Down