Skip to content

Commit 2c9dd71

Browse files
CirnoTlunny
andauthored
Standardize Co-Authored-By / Reviewed-By strings (#14097)
* Standardize Co-Authored-By / Reviewed-By strings * Use lowercase variant Co-authored-by: Lunny Xiao <[email protected]>
1 parent acd5e5a commit 2c9dd71

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

modules/repofiles/temp_repo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ func (t *TemporaryUploadRepository) CommitTreeWithDate(author, committer *models
222222
if committerSig.Name != authorSig.Name || committerSig.Email != authorSig.Email {
223223
// Add trailers
224224
_, _ = messageBytes.WriteString("\n")
225-
_, _ = messageBytes.WriteString("Co-Authored-By: ")
225+
_, _ = messageBytes.WriteString("Co-authored-by: ")
226226
_, _ = messageBytes.WriteString(committerSig.String())
227227
_, _ = messageBytes.WriteString("\n")
228-
_, _ = messageBytes.WriteString("Co-Committed-By: ")
228+
_, _ = messageBytes.WriteString("Co-committed-by: ")
229229
_, _ = messageBytes.WriteString(committerSig.String())
230230
_, _ = messageBytes.WriteString("\n")
231231
}

options/locale/locale_en-US.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,7 @@ settings.trust_model.collaborator.long = Collaborator: Trust signatures by colla
15251525
settings.trust_model.collaborator.desc = Valid signatures by collaborators of this repository will be marked "trusted" - (whether they match the committer or not). Otherwise, valid signatures will be marked "untrusted" if the signature matches the committer and "unmatched" if not.
15261526
settings.trust_model.committer = Committer
15271527
settings.trust_model.committer.long = Committer: Trust signatures that match committers (This matches GitHub and will force Gitea signed commits to have Gitea as the committer)
1528-
settings.trust_model.committer.desc = Valid signatures will only be marked "trusted" if they match the committer, otherwise they will be marked "unmatched". This will force Gitea to be the committer on signed commits with the actual committer marked as Co-Authored-By: and Co-Committed-By: trailer in the commit. The default Gitea key must match a User in the database.
1528+
settings.trust_model.committer.desc = Valid signatures will only be marked "trusted" if they match the committer, otherwise they will be marked "unmatched". This will force Gitea to be the committer on signed commits with the actual committer marked as Co-authored-by: and Co-committed-by: trailer in the commit. The default Gitea key must match a User in the database.
15291529
settings.trust_model.collaboratorcommitter = Collaborator+Committer
15301530
settings.trust_model.collaboratorcommitter.long = Collaborator+Committer: Trust signatures by collaborators which match the committer
15311531
settings.trust_model.collaboratorcommitter.desc = Valid signatures by collaborators of this repository will be marked "trusted" if they match the committer. Otherwise, valid signatures will be marked "untrusted" if the signature matches the committer and "unmatched" otherwise. This will force Gitea to be marked as the committer on signed commits with the actual committer marked as Co-Authored-By: and Co-Committed-By: trailer in the commit. The default Gitea key must match a User in the database.

services/pull/merge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ func rawMerge(pr *models.PullRequest, doer *models.User, mergeStyle models.Merge
353353
} else {
354354
if committer != sig {
355355
// add trailer
356-
message += fmt.Sprintf("\nCo-Authored-By: %s\nCo-Committed-By: %s\n", sig.String(), sig.String())
356+
message += fmt.Sprintf("\nCo-authored-by: %s\nCo-committed-by: %s\n", sig.String(), sig.String())
357357
}
358358
if err := git.NewCommand("commit", signArg, fmt.Sprintf("--author='%s <%s>'", sig.Name, sig.Email), "-m", message).RunInDirTimeoutEnvPipeline(env, -1, tmpBasePath, &outbuf, &errbuf); err != nil {
359359
log.Error("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())

0 commit comments

Comments
 (0)