mirror of
https://github.com/go-gitea/gitea
synced 2024-10-31 19:28:58 +01:00
bd4c7ce578
This PR cleans up the docs in a way to make them simpler to ingest by our [docs repo](https://gitea.com/gitea/gitea-docusaurus). 1. It includes all of the sed invocations our ingestion did, removing the need to do it at build time. 2. It replaces the shortcode variable replacement method with `@variable@` style, simply for easier sed invocations when required. 3. It removes unused files and moves the docs up a level as cleanup. --------- Signed-off-by: jolheiser <john.olheiser@gmail.com>
1.9 KiB
1.9 KiB
date | title | slug | sidebar_position | toc | draft | aliases | menu | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-05-23T09:00:00+08:00 | 合并消息模板 | merge-message-templates | 15 | false | false |
|
|
合并消息模板
文件名
PR 默认合并消息模板可能的文件名:
.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
变量
您可以在这些模板中使用以下以 ${}
包围的变量,这些变量遵循 os.Expand 语法:
- BaseRepoOwnerName:此合并请求的基础仓库所有者名称
- BaseRepoName:此合并请求的基础仓库名称
- BaseBranch:此合并请求的基础仓库目标分支名称
- HeadRepoOwnerName:此合并请求的源仓库所有者名称
- HeadRepoName:此合并请求的源仓库名称
- HeadBranch:此合并请求的源仓库分支名称
- PullRequestTitle:合并请求的标题
- PullRequestDescription:合并请求的描述
- PullRequestPosterName:合并请求的提交者名称
- PullRequestIndex:合并请求的索引号
- PullRequestReference:合并请求的引用字符与索引号。例如,#1、!2
- ClosingIssues:返回一个包含将由此合并请求关闭的所有工单的字符串。例如
close #1, close #2
变基(Rebase)
在没有合并提交的情况下进行变基时,REBASE_TEMPLATE.md
修改最后一次提交的消息。此模板还提供以下附加变量:
- CommitTitle:提交的标题
- CommitBody:提交的正文文本