关闭来自提交消息的 GitLab CE 合并请求

Close GitLab CE Merge Requests From Commit Message

A useful feature of GitHub is that users are able to close their "pull requests" (PRs) via commit message. For instance, if Closes #1 is written in a commit message and that commit subsequently lands on the master branch, GitHub will automatically close the PR.

GitLab has a similar setup, but the pull requests are known as "merge requests" (MRs). Although I have found support for the automatic-PR-closing feature in GitHub, it appears as though GitLab is completely devoid of this useful feature. The only way to close merge requests (that I've found) is by manually clicking the "Accept" or "Close" buttons on GitLab itself.

This SO question illustrates the feature in question.

And yes, I'm aware that you can close issues, as stated here: http://docs.gitlab.com/ee/customization/issue_closing.html

But as that page says:

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.

So only issues will be closed if a MR or a commit lands in master, but it doesn't speak to the closing of MRs if a commit lands in master.

I searched through the GitLab-CE repo's issues and came up empty handed. Is this just a poorly documented feature, or does GitLab CE simply not support this?

GitLab CE 有一个问题可以解决这个问题,但开发人员似乎选择忽略它(该问题已关闭,没有任何 public 评论)。

https://gitlab.com/gitlab-org/gitlab-ce/issues/4106

显然从 GitLab 版本 9.1.1 开始不支持它。

有一个 GitLab CE 问题当前打开 请求该功能。喜欢的话可以登录投票哦