mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-20 20:04:48 +08:00
enhancement: add signoff option in commit form (#14516)
Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
@ -235,6 +235,7 @@ func CreateFile(ctx *context.APIContext) {
|
||||
Author: apiOpts.Dates.Author,
|
||||
Committer: apiOpts.Dates.Committer,
|
||||
},
|
||||
Signoff: apiOpts.Signoff,
|
||||
}
|
||||
if opts.Dates.Author.IsZero() {
|
||||
opts.Dates.Author = time.Now()
|
||||
@ -323,6 +324,7 @@ func UpdateFile(ctx *context.APIContext) {
|
||||
Author: apiOpts.Dates.Author,
|
||||
Committer: apiOpts.Dates.Committer,
|
||||
},
|
||||
Signoff: apiOpts.Signoff,
|
||||
}
|
||||
if opts.Dates.Author.IsZero() {
|
||||
opts.Dates.Author = time.Now()
|
||||
@ -449,6 +451,7 @@ func DeleteFile(ctx *context.APIContext) {
|
||||
Author: apiOpts.Dates.Author,
|
||||
Committer: apiOpts.Dates.Committer,
|
||||
},
|
||||
Signoff: apiOpts.Signoff,
|
||||
}
|
||||
if opts.Dates.Author.IsZero() {
|
||||
opts.Dates.Author = time.Now()
|
||||
|
Reference in New Issue
Block a user