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/repo/editor.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'routers/repo') diff --git a/routers/repo/editor.go b/routers/repo/editor.go index 619912fef7..344174828e 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -240,6 +240,7 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo Message: message, Content: strings.ReplaceAll(form.Content, "\r", ""), IsNewFile: isNewFile, + Signoff: form.Signoff, }); err != nil { // This is where we handle all the errors thrown by repofiles.CreateOrUpdateRepoFile if git.IsErrNotExist(err) { @@ -442,6 +443,7 @@ func DeleteFilePost(ctx *context.Context) { NewBranch: branchName, TreePath: ctx.Repo.TreePath, Message: message, + Signoff: form.Signoff, }); err != nil { // This is where we handle all the errors thrown by repofiles.DeleteRepoFile if git.IsErrNotExist(err) || models.IsErrRepoFileDoesNotExist(err) { @@ -650,6 +652,7 @@ func UploadFilePost(ctx *context.Context) { TreePath: form.TreePath, Message: message, Files: form.Files, + Signoff: form.Signoff, }); err != nil { if models.IsErrLFSFileLocked(err) { ctx.Data["Err_TreePath"] = true -- cgit v1.2.3