GitHub 的一个有用功能是用户可以通过提交消息关闭他们的“pull 请求”(PR)。例如,如果 Closes #1
写在提交消息中,并且该提交随后落在 master
分支上,GitHub 将自动关闭 PR。
GitLab 具有类似的设置,但 pull 请求称为“merge 请求”(MR)。虽然我在 GitHub 中找到了对自动 PR 关闭功能的支持,但 GitLab 似乎完全没有这个有用的功能。关闭 merge 请求(我发现)的唯一方法是手动单击 GitLab 本身的“接受”或“关闭”按钮。
This SO question illustrates the feature in question.
是的,我知道您可以关闭问题,如下所述:http://docs.gitlab.com/ee/customization/issue_closing.html
但正如该页面所说:
When a commit or merge request resolves one or more issues, it is possible to automatically have these issues closed when the commit or merge request lands in the project's default branch.
因此,只有 issues 会在 MR 或 commit 进入 master
时关闭,但这并不意味着关闭如果提交落在 master
中,则为 MR。
我搜索了 GitLab-CE 存储库的问题,但一无所获。这只是一个记录不完整的功能,还是 GitLab CE 根本不支持这个?
最佳答案
显然从 GitLab 版本 9.1.1 开始不支持它。
有一个 GitLab CE 问题当前打开 请求该功能。如果您愿意,可以登录并为它投票。
关于git - 关闭来自提交消息的 GitLab CE merge 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38828094/