如何在Gitlab上自定义合并请求消息?

Ala*_*ALI 6 gitlab

在开始新问题之前,我总是为它创建一个新的分支(直接来自Gitlab).当我完成该问题的工作(并且测试是好的)时,我创建了一个合并请求(来自Gitlab).

合并完成后,我有一条链接到该合并的" 自动生成 "消息(此消息非常通用,与我完成的所有合并相同).

有些事情发生在我合并developmaster:

在此输入图像描述

有没有办法自定义合并请求消息,以便有这样的消息:

  • 将{ shortIssueName }:{ issueDescription }合并到{develop | master}

注意:

  • 我正在使用GitLab Community Edition 8.15.3.

Pio*_*iuk 5

在全球范围内,自动 - 我不这么认为.我看,它是硬编码的:

message = [
  "Merge branch '#{source_branch}' into '#{target_branch}'",
  title
]

if !include_description && closes_issues_references.present?
  message << "Closes #{closes_issues_references.to_sentence}"
end

message << "#{description}" if include_description && description.present?
message << "See merge request #{to_reference}"

message.join("\n\n")
Run Code Online (Sandbox Code Playgroud)

您可以手动覆盖任何合并请求的消息:

在此输入图像描述

如果您使用API​​创建合并请求,也可以.它需要您的时间,但您可以构建一些机制,使用API​​获取所有数据并将其设置为描述(但您必须确保所有数据都可用于API,issueDescription等).

  • 似乎从 Gitlab 14.5 开始,支持自定义合并和压缩提交消息,https://docs.gitlab.com/ee/user/project/merge_requests/commit_templates.html (2认同)