From b5a9ee94fd1f3bbe35bd19dfc4c7025e9f8e0768 Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 29 Nov 2021 07:09:55 +0000 Subject: Make Co-committed-by and co-authored-by trailers optional (#17848) This PR adds another option to app.ini make co-committed-by and co-authored-by trailers optional on a per server basis. Fix #17194 Signed-off-by: Andrew Thornton --- services/pull/merge.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services') diff --git a/services/pull/merge.go b/services/pull/merge.go index f94aa36128..007e919537 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -359,7 +359,7 @@ func rawMerge(pr *models.PullRequest, doer *user_model.User, mergeStyle models.M return "", fmt.Errorf("git commit [%s:%s -> %s:%s]: %v\n%s\n%s", pr.HeadRepo.FullName(), pr.HeadBranch, pr.BaseRepo.FullName(), pr.BaseBranch, err, outbuf.String(), errbuf.String()) } } else { - if committer != sig { + if setting.Repository.PullRequest.AddCoCommitterTrailers && committer.String() != sig.String() { // add trailer message += fmt.Sprintf("\nCo-authored-by: %s\nCo-committed-by: %s\n", sig.String(), sig.String()) } -- cgit v1.2.3