0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-10-31 19:28:58 +01:00
gitea/docs/content/usage/merge-message-templates.zh-cn.md
John Olheiser bd4c7ce578
Docusaurus-ify (#26051)
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>
2023-07-26 04:53:13 +00:00

1.9 KiB
Raw Blame History

date title slug sidebar_position toc draft aliases menu
2023-05-23T09:00:00+08:00 合并消息模板 merge-message-templates 15 false false
/zh-cn/merge-message-templates
sidebar
parent name sidebar_position identifier
usage 合并消息模板 15 merge-message-templates

合并消息模板

文件名

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提交的正文文本