From 38a14287d5b2ea04f04501353682a6c3ff108510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Thu, 9 Mar 2023 07:41:08 +0100 Subject: [PATCH 1/2] merge-message-templates.md: verbatim copy --- v1.19/user/merge-message-templates.md | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 v1.19/user/merge-message-templates.md diff --git a/v1.19/user/merge-message-templates.md b/v1.19/user/merge-message-templates.md new file mode 100644 index 00000000..c30ac1bf --- /dev/null +++ b/v1.19/user/merge-message-templates.md @@ -0,0 +1,48 @@ +--- +date: "2022-08-31T17:35:40+08:00" +title: "Usage: Merge Message templates" +slug: "merge-message-templates" +weight: 15 +toc: false +draft: false +menu: + sidebar: + parent: "usage" + name: "Merge Message templates" + weight: 15 + identifier: "merge-message-templates" +--- + +# Merge Message templates + +**Table of Contents** + +{{< toc >}} + +## File names + +Possible file names for PR default merge message templates: + +- `.gitea/default_merge_message/MERGE_TEMPLATE.md` +- `.gitea/default_merge_message/REBASE_TEMPLATE.md` +- `.gitea/default_merge_message/REBASE-MERGE_TEMPLATE.md` +- `.gitea/default_merge_message/SQUASH_TEMPLATE.md` +- `.gitea/default_merge_message/MANUALLY-MERGED_TEMPLATE.md` +- `.gitea/default_merge_message/REBASE-UPDATE-ONLY_TEMPLATE.md` + +## Variables + +You can use the following variables enclosed in `${}` inside these templates which follow [os.Expand](https://pkg.go.dev/os#Expand) syntax: + +- BaseRepoOwnerName: Base repository owner name of this pull request +- BaseRepoName: Base repository name of this pull request +- BaseBranch: Base repository target branch name of this pull request +- HeadRepoOwnerName: Head repository owner name of this pull request +- HeadRepoName: Head repository name of this pull request +- HeadBranch: Head repository branch name of this pull request +- PullRequestTitle: Pull request's title +- PullRequestDescription: Pull request's description +- PullRequestPosterName: Pull request's poster name +- 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` From 690b90a44c27ace414f8916f4278e6157e326210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Thu, 9 Mar 2023 07:43:38 +0100 Subject: [PATCH 2/2] merge-message-templates.md: adapt to Forgejo --- v1.19/user/index.md | 1 + v1.19/user/merge-message-templates.md | 22 ++++------------------ 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/v1.19/user/index.md b/v1.19/user/index.md index 82f99324..180836c0 100644 --- a/v1.19/user/index.md +++ b/v1.19/user/index.md @@ -27,6 +27,7 @@ involved in running it on their machines. - [Branch and tag protection](protection) - Advanced Usage - [Issue and Pull Request Templates](issue-pull-request-templates) + - [Merge Message templates](merge-message-templates) - [Generating an Access Token](https://docs.codeberg.org/advanced/access-token/) - [Webhooks](webhooks) - Authentication diff --git a/v1.19/user/merge-message-templates.md b/v1.19/user/merge-message-templates.md index c30ac1bf..547cbb5d 100644 --- a/v1.19/user/merge-message-templates.md +++ b/v1.19/user/merge-message-templates.md @@ -1,24 +1,10 @@ --- -date: "2022-08-31T17:35:40+08:00" -title: "Usage: Merge Message templates" -slug: "merge-message-templates" -weight: 15 -toc: false -draft: false -menu: - sidebar: - parent: "usage" - name: "Merge Message templates" - weight: 15 - identifier: "merge-message-templates" +layout: '~/layouts/Markdown.astro' +title: 'Merge Message templates' +license: 'Apache-2.0' +origin_url: 'https://github.com/go-gitea/gitea/blob/699f20234b9f7cdbbeeee3be004470c598fa1147/docs/content/doc/usage/merge-message-templates.en-us.md' --- -# Merge Message templates - -**Table of Contents** - -{{< toc >}} - ## File names Possible file names for PR default merge message templates: