From e91d9b5f7cd502015cc13ac26e2ee0aa74e23800 Mon Sep 17 00:00:00 2001 From: Kazunori Kimura Date: Sat, 5 Mar 2022 22:10:05 +0900 Subject: [PATCH] support GITLAB_ISSUE_CLOSING_PATTERN --- README.md | 1 + assets/runtime/config/gitlabhq/gitlab.yml | 2 +- assets/runtime/env-defaults | 1 + assets/runtime/functions | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ae084ea9..a1712599 100644 --- a/README.md +++ b/README.md @@ -807,6 +807,7 @@ Below is the complete list of available options that can be used to customize yo | `GITLAB_EMAIL_SMIME_KEY_FILE` | Specifies the path to a S/MIME private key file in PEM format, unencrypted. Defaults to ``. | | `GITLAB_EMAIL_SMIME_CERT_FILE` | Specifies the path to a S/MIME public certificate key in PEM format. Defaults to ``. | | `GITLAB_DEFAULT_THEME` | Default theme ID, by default 2. (1 - Indigo, 2 - Dark, 3 - Light, 4 - Blue, 5 - Green, 6 - Light Indigo, 7 - Light Blue, 8 - Light Green, 9 - Red, 10 - Light Red) | +| `GITLAB_ISSUE_CLOSING_PATTERN` | Issue closing pattern regex. See [GitLab's documentation](https://docs.gitlab.com/ee/administration/issue_closing_pattern.html) for more detail. Defaults to ` \b((?:[Cc]los(?:e[sd]?|ing)|\b[Ff]ix(?:e[sd]|ing)?|\b[Rr]esolv(?:e[sd]?|ing)|\b[Ii]mplement(?:s|ed|ing)?)(:?) +(?:(?:issues? +)?%{issue_ref}(?:(?:, *| +and +)?)|([A-Z][A-Z0-9_]+-\d+))+) ` . | | `GITLAB_INCOMING_EMAIL_ADDRESS` | The incoming email address for reply by email. Defaults to the value of `IMAP_USER`, else defaults to `reply@example.com`. Please read the [reply by email](http://doc.gitlab.com/ce/incoming_email/README.html) documentation to currently set this parameter. | | `GITLAB_INCOMING_EMAIL_ENABLED` | Enable or disable gitlab reply by email feature. Defaults to the value of `IMAP_ENABLED`. | | `GITLAB_SIGNUP_ENABLED` | Enable or disable user signups (first run only). Default is `true`. | diff --git a/assets/runtime/config/gitlabhq/gitlab.yml b/assets/runtime/config/gitlabhq/gitlab.yml index c5dd6126..8b6deb60 100644 --- a/assets/runtime/config/gitlabhq/gitlab.yml +++ b/assets/runtime/config/gitlabhq/gitlab.yml @@ -138,7 +138,7 @@ production: &base # This happens 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. # Tip: you can test your closing pattern at http://rubular.com. - # issue_closing_pattern: '\b((?:[Cc]los(?:e[sd]?|ing)|\b[Ff]ix(?:e[sd]|ing)?|\b[Rr]esolv(?:e[sd]?|ing)|\b[Ii]mplement(?:s|ed|ing)?)(:?) +(?:(?:issues? +)?%{issue_ref}(?:(?:, *| +and +)?)|([A-Z][A-Z0-9_]+-\d+))+)' + issue_closing_pattern: '{{GITLAB_ISSUE_CLOSING_PATTERN}}' ## Default project features settings default_projects_features: diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index 661219a3..603d4bbc 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -82,6 +82,7 @@ GITLAB_UNICORN_MEMORY_MAX=${GITLAB_UNICORN_MEMORY_MAX:-1342177280} ## GITLAB_TIMEZONE=${GITLAB_TIMEZONE:-UTC} GITLAB_SIGNUP_ENABLED=${GITLAB_SIGNUP_ENABLED:-true} +GITLAB_ISSUE_CLOSING_PATTERN=${GITLAB_ISSUE_CLOSING_PATTERN:-'\b((?:[Cc]los(?:e[sd]?|ing)|\b[Ff]ix(?:e[sd]|ing)?|\b[Rr]esolv(?:e[sd]?|ing)|\b[Ii]mplement(?:s|ed|ing)?)(:?) +(?:(?:issues? +)?%{issue_ref}(?:(?:, *| +and +)?)|([A-Z][A-Z0-9_]+-\d+))+)'} GITLAB_PROJECTS_LIMIT=${GITLAB_PROJECTS_LIMIT:-100} GITLAB_USERNAME_CHANGE=${GITLAB_USERNAME_CHANGE:-true} GITLAB_CREATE_GROUP=${GITLAB_CREATE_GROUP:-true} diff --git a/assets/runtime/functions b/assets/runtime/functions index b42936df..1124848a 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -1778,7 +1778,8 @@ configure_gitlab() { GITLAB_PROJECTS_LIMIT \ GITLAB_USERNAME_CHANGE \ GITLAB_DEFAULT_THEME \ - GITLAB_CREATE_GROUP + GITLAB_CREATE_GROUP \ + GITLAB_ISSUE_CLOSING_PATTERN gitlab_configure_database gitlab_configure_redis