1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

[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:
6543
2019-12-24 03:33:52 +01:00
committed by Lunny Xiao
parent 017f314b5a
commit 40e99ea010
9 changed files with 114 additions and 7 deletions

View File

@@ -14,8 +14,9 @@ type FileOptions struct {
// new_branch (optional) will make a new branch from `branch` before creating the file
NewBranchName string `json:"new_branch" binding:"GitRefName;MaxSize(100)"`
// `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
Author Identity `json:"author"`
Committer Identity `json:"committer"`
Author Identity `json:"author"`
Committer Identity `json:"committer"`
Dates CommitDateOptions `json:"dates"`
}
// CreateFileOptions options for creating files