diff options
author | zeripath <art27@cantab.net> | 2021-11-29 07:09:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 07:09:55 +0000 |
commit | b5a9ee94fd1f3bbe35bd19dfc4c7025e9f8e0768 (patch) | |
tree | e652f3bdb8c9886c70289542b300bed8fd9f446f /services | |
parent | 3fec2cb3d3957f8260ce42163a5197a8551b8390 (diff) | |
download | gitea-b5a9ee94fd1f3bbe35bd19dfc4c7025e9f8e0768.tar.gz gitea-b5a9ee94fd1f3bbe35bd19dfc4c7025e9f8e0768.zip |
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 <art27@cantab.net>
Diffstat (limited to 'services')
-rw-r--r-- | services/pull/merge.go | 2 |
1 files changed, 1 insertions, 1 deletions
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()) } |