[SOLVED] gitlab_issue_closing_pattern not working

Hi!

Since I install Gitlab via omnibus, I can’t made gitlab_issue_closing_pattern work.

First, I’ve added this conf to gitlab.rb in a wrong way (issue_closing_pattern instead gitlab_issue_closing_pattern). After fix this (with this valuable help), I run reconfigure, and gitlab.yml was updated.

Now, no matter what expression I use (Fix, Fixes, Encerra, Corrige), the issues never close. Only the “mentioned in commit” appears.

My config:

rodrigo@gitlab:/etc/gitlab$ sudo cat gitlab.rb | grep gitlab_issue_closing_pattern
gitlab_rails['gitlab_issue_closing_pattern'] = '([Cc]lose[sd]|[Ff]ixe[sd]|[Ee]ncerra|[Cc]orrige|[Aa]rruma|[Cc]onserta|[Ff]echa|[Ii]mplementa) +#\d+'

There’s something more I need to do? Or how is the right way to start searching the problem?

After a lot of searches, I still can’t make this work. If somebody can help me to find the solution (what logs I need to see? What type of information I need to look?), I really appreciate.

I will try to reproduce it this weekend.

Hi!

I still have this problem. But I have two other items to add:

  1. I’ve tested my regex (http://rubular.com/r/zWdFe96Ec9) and it looks good.
  2. after upgrading to 7.9.0, the mention AND the issue close are not working. In the past, the mention works, but now…

Thank you.

I think there was introduced a feature where you can close multiple issues, perhaps it parses differently. With your regex it didn’t work. I then took the regex from the gitlab.yml.example, I adapted your words, finally tested with Corrige #1 and it worked as expected. Here’s the regex:

gitlab_rails['gitlab_issue_closing_pattern'] = '((?:[Cc]lose[sd]|[Ff]ixe[sd]|[Ee]ncerra|[Cc]orrige|[Aa]rruma|[Cc]onserta|[Ff]echa|[Ii]mplementa?) +(?:(?:issues? +)?#\d+(?:(?:, *| +and +)?))+)'

Hi @axil

I change my conf… and it works perfectly!

Thank you so much!

P.S.: I did not know it was possible to close multiple issues … this information appears in the documentation?

Hello. Here’s GitLab’s documentation about issue closing pattern or how to close multiple issues http://doc.gitlab.com/ce/customization/issue_closing.html