[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>
This commit is contained in:
parent
017f314b5a
commit
40e99ea010
9 changed files with 114 additions and 7 deletions
|
@ -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"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue