diff options
author | 6543 <6543@obermui.de> | 2019-12-24 03:33:52 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-12-24 10:33:52 +0800 |
commit | 40e99ea010b3b0be241be0e1365a70d33777bcf2 (patch) | |
tree | cc7930e51a8ed41fcb183dae075d7ab211d06834 /modules/structs/repo_commit.go | |
parent | 017f314b5a0f930b477efa1c2a5309f8cdd6d3c3 (diff) | |
download | gitea-40e99ea010b3b0be241be0e1365a70d33777bcf2.tar.gz gitea-40e99ea010b3b0be241be0e1365a70d33777bcf2.zip |
[API] Extend contents with dates (#9464)
* extend CommitTree func
* make sure Date NOT nil
* spell corection
Co-Authored-By: zeripath <art27@cantab.net>
* add TEST
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules/structs/repo_commit.go')
-rw-r--r-- | modules/structs/repo_commit.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/structs/repo_commit.go b/modules/structs/repo_commit.go index 9cde2873d4..088ccdf5af 100644 --- a/modules/structs/repo_commit.go +++ b/modules/structs/repo_commit.go @@ -5,6 +5,10 @@ package structs +import ( + "time" +) + // Identity for a person's identity like an author or committer type Identity struct { Name string `json:"name" binding:"MaxSize(100)"` @@ -42,3 +46,11 @@ type Commit struct { Committer *User `json:"committer"` Parents []*CommitMeta `json:"parents"` } + +// CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE +type CommitDateOptions struct { + // swagger:strfmt date-time + Author time.Time `json:"author"` + // swagger:strfmt date-time + Committer time.Time `json:"committer"` +} |