From 5c2c5db7b7a87f42d7a08f86f23de539915a5704 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Tue, 1 Oct 2013 10:53:44 +0200 Subject: [PATCH 1/3] Also match if it is at the end or in the middle of a sentence. --- config/initializers/1_settings.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 1c8758d9420..942b77ffd2e 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -69,7 +69,7 @@ rescue ArgumentError # no user configured end Settings.gitlab['signup_enabled'] ||= false Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil? -Settings.gitlab['issue_closing_pattern'] = '^([Cc]loses|[Ff]ixes) #(\d+)' if Settings.gitlab['issue_closing_pattern'].nil? +Settings.gitlab['issue_closing_pattern'] = '([Cc]loses|[Ff]ixes) #(\d+)' if Settings.gitlab['issue_closing_pattern'].nil? Settings.gitlab['default_projects_features'] ||= {} Settings.gitlab.default_projects_features['issues'] = true if Settings.gitlab.default_projects_features['issues'].nil? Settings.gitlab.default_projects_features['merge_requests'] = true if Settings.gitlab.default_projects_features['merge_requests'].nil? From d66025f7683c66d2e9b80452bf2a46b54730b7fd Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Tue, 1 Oct 2013 11:43:53 +0200 Subject: [PATCH 2/3] Also update example. --- config/gitlab.yml.example | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 0b1560ac587..69eb4ca642d 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -56,9 +56,10 @@ production: &base # signup_enabled: true ## Automatic issue closing - # If a commit message matches this regular express, all issues referenced from the matched text will be closed - # if it's pushed to a project's default branch. - # issue_closing_pattern: ^([Cc]loses|[Ff]ixes) +#\d+ + # If a commit message matches this regular express, all issues referenced from the matched text will be closed. + # This happends when the commit is pushed or merged into the default branch of a project. + # When not specified the default issue_closing_pattern as specified below will be used. + # issue_closing_pattern: ([Cc]loses|[Ff]ixes) +#\d+ ## Default project features settings default_projects_features: From c9dd2ca64bb9a2f4924b598d6b2288bdf3c43d27 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Wed, 2 Oct 2013 08:23:27 +0200 Subject: [PATCH 3/3] Correct spelling mistake. --- config/gitlab.yml.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 69eb4ca642d..28578eee50a 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -56,7 +56,7 @@ production: &base # signup_enabled: true ## Automatic issue closing - # If a commit message matches this regular express, all issues referenced from the matched text will be closed. + # If a commit message matches this regular expression, all issues referenced from the matched text will be closed. # This happends when the commit is pushed or merged into the default branch of a project. # When not specified the default issue_closing_pattern as specified below will be used. # issue_closing_pattern: ([Cc]loses|[Ff]ixes) +#\d+