SCM - Add short state badge for history items (#198126)

* Git - Extract parsing of git diff short stat

* Add shortStat badge for commits

* Git - specify diff-merges for merge commits

* Add tests
This commit is contained in:
Ladislau Szomoru
2023-11-13 16:49:28 +01:00
committed by GitHub
parent a87d034b0d
commit e447d54e1e
5 changed files with 259 additions and 40 deletions

View File

@@ -44,6 +44,12 @@ export interface Branch extends Ref {
readonly behind?: number;
}
export interface CommitShortStat {
readonly files: number;
readonly insertions: number;
readonly deletions: number;
}
export interface Commit {
readonly hash: string;
readonly message: string;
@@ -52,6 +58,7 @@ export interface Commit {
readonly authorName?: string;
readonly authorEmail?: string;
readonly commitDate?: Date;
readonly shortStat?: CommitShortStat;
}
export interface Submodule {
@@ -134,6 +141,7 @@ export interface LogOptions {
readonly range?: string;
readonly reverse?: boolean;
readonly sortByAuthorDate?: boolean;
readonly shortStats?: boolean;
}
export interface CommitOptions {