forgejo/services/pull
Max Wipfli 4ddd9af50f
Allow including Reviewed-on/Reviewed-by lines for custom merge messages (#31211)
This PR introduces the `ReviewedOn` and `ReviewedBy` variables for the
default merge message templates (e.g.,
`.gitea/default_merge_message/MERGE_TEMPLATE.md`).

This allows customizing the default merge messages while retaining these
trailers.

This also moves the associated logic out of `pull.tmpl` into the
relevant Go function.

This is a first contribution towards #11077.

---

For illustration, this allows to recreate the "default default" merge
message with the following template:
```
.gitea/default_merge_message/MERGE_TEMPLATE.md
Merge pull request '${PullRequestTitle}' (${PullRequestReference}) from ${HeadBranch} into ${BaseBranch}

${ReviewedOn}
${ReviewedBy}
```

(cherry picked from commit da4bbc42477ba04d175cc0775a0c5ec90c4c24fe)

Conflicts:
	docs/content/usage/merge-message-templates.en-us.md
	not in Forgejo
	templates/repo/issue/view_content/pull.tmpl
	trivial context conflict
2024-06-09 16:04:57 +02:00
..
check.go fix(hook): repo admins are wrongly denied the right to force merge 2024-06-02 21:16:46 +02:00
check_test.go
comment.go Add codespell support and fix a good number of typos with its help (#3270) 2024-05-09 13:49:37 +00:00
commit_status.go
commit_status_test.go
edits.go
lfs.go
main_test.go
merge.go Allow including Reviewed-on/Reviewed-by lines for custom merge messages (#31211) 2024-06-09 16:04:57 +02:00
merge_ff_only.go
merge_merge.go
merge_prepare.go
merge_rebase.go
merge_squash.go
merge_test.go
patch.go
patch_unmerged.go
pull.go Add codespell support and fix a good number of typos with its help (#3270) 2024-05-09 13:49:37 +00:00
pull_test.go
review.go Resolve lint for unused parameter and unnecessary type arguments (#30750) 2024-05-05 08:38:16 +01:00
review_test.go
temp_repo.go
update.go Move database operations of merging a pull request to post receive hook and add a transaction (#30805) 2024-05-12 20:03:10 +02:00
update_rebase.go Resolve lint for unused parameter and unnecessary type arguments (#30750) 2024-05-05 08:38:16 +01:00