Skip to content

Commit 3874ded

Browse files
committed
Use lowercase variant
1 parent d25d917 commit 3874ded

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
9595
- `DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT`: **50**: In the default merge message for squash commits include at most this many commits. Set to `-1` to include all commits
9696
- `DEFAULT_MERGE_MESSAGE_SIZE`: **5120**: In the default merge message for squash commits limit the size of the commit messages. Set to `-1` to have no limit.
9797
- `DEFAULT_MERGE_MESSAGE_ALL_AUTHORS`: **false**: In the default merge message for squash commits walk all commits to include all authors in the Co-authored-by otherwise just use those in the limited list
98-
- `DEFAULT_MERGE_MESSAGE_MAX_APPROVERS`: **10**: In default merge messages limit the number of approvers listed as `Reviewed-By:`. Set to `-1` to include all.
98+
- `DEFAULT_MERGE_MESSAGE_MAX_APPROVERS`: **10**: In default merge messages limit the number of approvers listed as `Reviewed-by:`. Set to `-1` to include all.
9999
- `DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY`: **true**: In default merge messages only include approvers who are officially allowed to review.
100100

101101
### Repository - Issue (`repository.issue`)

models/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ func (pr *PullRequest) getReviewedByLines(writer io.Writer) error {
286286
} else if review.Reviewer == nil {
287287
continue
288288
}
289-
if _, err := writer.Write([]byte("Reviewed-By: ")); err != nil {
289+
if _, err := writer.Write([]byte("Reviewed-by: ")); err != nil {
290290
return err
291291
}
292292
if _, err := writer.Write([]byte(review.Reviewer.NewGitSig().String())); err != nil {

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())

services/pull/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ func GetSquashMergeCommitMessages(pr *models.PullRequest) string {
611611
}
612612

613613
for _, author := range authors {
614-
if _, err := stringBuilder.Write([]byte("Co-Authored-By: ")); err != nil {
614+
if _, err := stringBuilder.Write([]byte("Co-authored-by: ")); err != nil {
615615
log.Error("Unable to write to string builder Error: %v", err)
616616
return ""
617617
}

services/webhook/matrix_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ func TestMatrixPullRequestPayload(t *testing.T) {
8484
func TestMatrixHookRequest(t *testing.T) {
8585
h := &models.HookTask{
8686
PayloadContent: `{
87-
"body": "[[user1/test](http://localhost:3000/user1/test)] user1 pushed 1 commit to [master](http://localhost:3000/user1/test/src/branch/master):\n[5175ef2](http://localhost:3000/user1/test/commit/5175ef26201c58b035a3404b3fe02b4e8d436eee): Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-On: http://localhost:3000/user1/test/pulls/2\n - user1",
87+
"body": "[[user1/test](http://localhost:3000/user1/test)] user1 pushed 1 commit to [master](http://localhost:3000/user1/test/src/branch/master):\n[5175ef2](http://localhost:3000/user1/test/commit/5175ef26201c58b035a3404b3fe02b4e8d436eee): Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-on: http://localhost:3000/user1/test/pulls/2\n - user1",
8888
"msgtype": "m.notice",
8989
"format": "org.matrix.custom.html",
90-
"formatted_body": "[\u003ca href=\"http://localhost:3000/user1/test\"\u003euser1/test\u003c/a\u003e] user1 pushed 1 commit to \u003ca href=\"http://localhost:3000/user1/test/src/branch/master\"\u003emaster\u003c/a\u003e:\u003cbr\u003e\u003ca href=\"http://localhost:3000/user1/test/commit/5175ef26201c58b035a3404b3fe02b4e8d436eee\"\u003e5175ef2\u003c/a\u003e: Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-On: http://localhost:3000/user1/test/pulls/2\n - user1",
90+
"formatted_body": "[\u003ca href=\"http://localhost:3000/user1/test\"\u003euser1/test\u003c/a\u003e] user1 pushed 1 commit to \u003ca href=\"http://localhost:3000/user1/test/src/branch/master\"\u003emaster\u003c/a\u003e:\u003cbr\u003e\u003ca href=\"http://localhost:3000/user1/test/commit/5175ef26201c58b035a3404b3fe02b4e8d436eee\"\u003e5175ef2\u003c/a\u003e: Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-on: http://localhost:3000/user1/test/pulls/2\n - user1",
9191
"io.gitea.commits": [
9292
{
9393
"id": "5175ef26201c58b035a3404b3fe02b4e8d436eee",
94-
"message": "Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-On: http://localhost:3000/user1/test/pulls/2\n",
94+
"message": "Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-on: http://localhost:3000/user1/test/pulls/2\n",
9595
"url": "http://localhost:3000/user1/test/commit/5175ef26201c58b035a3404b3fe02b4e8d436eee",
9696
"author": {
9797
"name": "user1",
@@ -115,14 +115,14 @@ func TestMatrixHookRequest(t *testing.T) {
115115
}
116116

117117
wantPayloadContent := `{
118-
"body": "[[user1/test](http://localhost:3000/user1/test)] user1 pushed 1 commit to [master](http://localhost:3000/user1/test/src/branch/master):\n[5175ef2](http://localhost:3000/user1/test/commit/5175ef26201c58b035a3404b3fe02b4e8d436eee): Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-On: http://localhost:3000/user1/test/pulls/2\n - user1",
118+
"body": "[[user1/test](http://localhost:3000/user1/test)] user1 pushed 1 commit to [master](http://localhost:3000/user1/test/src/branch/master):\n[5175ef2](http://localhost:3000/user1/test/commit/5175ef26201c58b035a3404b3fe02b4e8d436eee): Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-on: http://localhost:3000/user1/test/pulls/2\n - user1",
119119
"msgtype": "m.notice",
120120
"format": "org.matrix.custom.html",
121-
"formatted_body": "[\u003ca href=\"http://localhost:3000/user1/test\"\u003euser1/test\u003c/a\u003e] user1 pushed 1 commit to \u003ca href=\"http://localhost:3000/user1/test/src/branch/master\"\u003emaster\u003c/a\u003e:\u003cbr\u003e\u003ca href=\"http://localhost:3000/user1/test/commit/5175ef26201c58b035a3404b3fe02b4e8d436eee\"\u003e5175ef2\u003c/a\u003e: Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-On: http://localhost:3000/user1/test/pulls/2\n - user1",
121+
"formatted_body": "[\u003ca href=\"http://localhost:3000/user1/test\"\u003euser1/test\u003c/a\u003e] user1 pushed 1 commit to \u003ca href=\"http://localhost:3000/user1/test/src/branch/master\"\u003emaster\u003c/a\u003e:\u003cbr\u003e\u003ca href=\"http://localhost:3000/user1/test/commit/5175ef26201c58b035a3404b3fe02b4e8d436eee\"\u003e5175ef2\u003c/a\u003e: Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-on: http://localhost:3000/user1/test/pulls/2\n - user1",
122122
"io.gitea.commits": [
123123
{
124124
"id": "5175ef26201c58b035a3404b3fe02b4e8d436eee",
125-
"message": "Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-On: http://localhost:3000/user1/test/pulls/2\n",
125+
"message": "Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-on: http://localhost:3000/user1/test/pulls/2\n",
126126
"url": "http://localhost:3000/user1/test/commit/5175ef26201c58b035a3404b3fe02b4e8d436eee",
127127
"author": {
128128
"name": "user1",

templates/repo/issue/view_content/pull.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
<input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultMergeMessage}}">
262262
</div>
263263
<div class="field">
264-
<textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">Reviewed-On: {{$.Issue.HTMLURL}}&#13;&#10;{{$approvers}}</textarea>
264+
<textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">Reviewed-on: {{$.Issue.HTMLURL}}&#13;&#10;{{$approvers}}</textarea>
265265
</div>
266266
<button class="ui green button" type="submit" name="do" value="merge">
267267
{{$.i18n.Tr "repo.pulls.merge_pull_request"}}
@@ -293,7 +293,7 @@
293293
<input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultMergeMessage}}">
294294
</div>
295295
<div class="field">
296-
<textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">Reviewed-On: {{$.Issue.HTMLURL}}&#13;&#10;{{$approvers}}</textarea>
296+
<textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">Reviewed-on: {{$.Issue.HTMLURL}}&#13;&#10;{{$approvers}}</textarea>
297297
</div>
298298
<button class="ui green button" type="submit" name="do" value="rebase-merge">
299299
{{$.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}}
@@ -312,7 +312,7 @@
312312
<input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultSquashMessage}}">
313313
</div>
314314
<div class="field">
315-
<textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">{{.GetCommitMessages}}Reviewed-On: {{$.Issue.HTMLURL}}&#13;&#10;{{$approvers}}</textarea>
315+
<textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">{{.GetCommitMessages}}Reviewed-on: {{$.Issue.HTMLURL}}&#13;&#10;{{$approvers}}</textarea>
316316
</div>
317317
<button class="ui green button" type="submit" name="do" value="squash">
318318
{{$.i18n.Tr "repo.pulls.squash_merge_pull_request"}}

0 commit comments

Comments
 (0)