是sue closing pattern

Note:This is the administration documentation. There is a separateuser documentationon issue closing pattern.

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.

Change the issue closing pattern

In order to change the pattern you need to have access to the server that GitLab is installed on.

The default pattern can be located ingitlab.yml.exampleunder the "Automatic issue closing" section.

Tip:You are advised to usehttp://rubular.comto test the issue closing pattern. Because Rubular doesn't understand%{issue_ref},你可以替换的#\d+when testing your patterns, which matches only local issue references like#123.

For Omnibus installations

  1. Open/etc/gitlab/gitlab.rbwith your editor.
  2. Change the value ofgitlab_rails['gitlab_issue_closing_pattern']to a regular expression of your liking:

    gitlab_rails['gitlab_issue_closing_pattern']="((?:[Cc]los(?:e[sd]|ing)|[Ff]ix(?:e[sd]|ing)?) +(?:(?:issues? +)?%{issue_ref}(?:(?:, *| +and +)?))+)"
  3. ReconfigureGitLab for the changes to take effect.

For installations from source

  1. Opengitlab.ymlwith your editor.
  2. Change the value ofissue_closing_pattern:

    issue_closing_pattern:"((?:[Cc]los(?:e[sd]|ing)|[Ff]ix(?:e[sd]|ing)?)+(?:(?:issues?+)?%{issue_ref}(?:(?:,*|+and+)?))+)"
  3. RestartGitLab for the changes to take effect.

Baidu
map