diff options
author | Max Wipfli <mail@maxwipfli.ch> | 2024-06-06 10:35:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-06 08:35:04 +0000 |
commit | da4bbc42477ba04d175cc0775a0c5ec90c4c24fe (patch) | |
tree | d822388bdebe835b480eb8d581428416c4acb567 /docs/content | |
parent | f7125ab61aaa02fd4c7ab0062a2dc9a57726e2ec (diff) | |
download | gitea-da4bbc42477ba04d175cc0775a0c5ec90c4c24fe.tar.gz gitea-da4bbc42477ba04d175cc0775a0c5ec90c4c24fe.zip |
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}
```
Diffstat (limited to 'docs/content')
-rw-r--r-- | docs/content/usage/merge-message-templates.en-us.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/content/usage/merge-message-templates.en-us.md b/docs/content/usage/merge-message-templates.en-us.md index fbdbd136f8..5116be3387 100644 --- a/docs/content/usage/merge-message-templates.en-us.md +++ b/docs/content/usage/merge-message-templates.en-us.md @@ -44,6 +44,8 @@ You can use the following variables enclosed in `${}` inside these templates whi - PullRequestIndex: Pull request's index number - PullRequestReference: Pull request's reference char with index number. i.e. #1, !2 - ClosingIssues: return a string contains all issues which will be closed by this pull request i.e. `close #1, close #2` +- ReviewedOn: Which pull request this commit belongs to. For example `Reviewed-on: https://gitea.com/foo/bar/pulls/1` +- ReviewedBy: Who approved the pull request before the merge. For example `Reviewed-by: Jane Doe <jane.doe@example.com>` ## Rebase |