From f19da14c34f3a86a77b45de77f48109fa5edcf78 Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Fri, 29 Jan 2021 16:57:45 +0800 Subject: enhancement: add signoff option in commit form (#14516) Signed-off-by: a1012112796 <1012112796@qq.com> --- routers/api/v1/repo/file.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'routers/api/v1') diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go index 044d0fe565..2bd57f1460 100644 --- a/routers/api/v1/repo/file.go +++ b/routers/api/v1/repo/file.go @@ -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() -- cgit v1.2.3