summaryrefslogtreecommitdiffstats
path: root/modules/structs
diff options
context:
space:
mode:
Diffstat (limited to 'modules/structs')
-rw-r--r--modules/structs/repo_commit.go19
1 files changed, 14 insertions, 5 deletions
diff --git a/modules/structs/repo_commit.go b/modules/structs/repo_commit.go
index f5c5f1b940..55a516a975 100644
--- a/modules/structs/repo_commit.go
+++ b/modules/structs/repo_commit.go
@@ -32,11 +32,19 @@ type CommitUser struct {
// RepoCommit contains information of a commit in the context of a repository.
type RepoCommit struct {
- URL string `json:"url"`
- Author *CommitUser `json:"author"`
- Committer *CommitUser `json:"committer"`
- Message string `json:"message"`
- Tree *CommitMeta `json:"tree"`
+ URL string `json:"url"`
+ Author *CommitUser `json:"author"`
+ Committer *CommitUser `json:"committer"`
+ Message string `json:"message"`
+ Tree *CommitMeta `json:"tree"`
+ Verification *PayloadCommitVerification `json:"verification"`
+}
+
+// CommitStats is statistics for a RepoCommit
+type CommitStats struct {
+ Total int `json:"total"`
+ Additions int `json:"additions"`
+ Deletions int `json:"deletions"`
}
// Commit contains information generated from a Git commit.
@@ -48,6 +56,7 @@ type Commit struct {
Committer *User `json:"committer"`
Parents []*CommitMeta `json:"parents"`
Files []*CommitAffectedFiles `json:"files"`
+ Stats *CommitStats `json:"stats"`
}
// CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE