diff options
author | John Olheiser <john.olheiser@gmail.com> | 2022-03-29 10:47:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 10:47:44 -0500 |
commit | 66f2210feca0b50d305a46a203c2b3d2f4d3790b (patch) | |
tree | 43b3630b5fbf0e2dfd1eac5ce0156b82be2016bb /modules/structs/repo_commit.go | |
parent | 74731c3a5aea71c81e4ca75bde96154f3adf3cfa (diff) | |
download | gitea-66f2210feca0b50d305a46a203c2b3d2f4d3790b.tar.gz gitea-66f2210feca0b50d305a46a203c2b3d2f4d3790b.zip |
More commit info from API (#19252)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules/structs/repo_commit.go')
-rw-r--r-- | modules/structs/repo_commit.go | 19 |
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 |