changeset 8383:f7307da42aba stable

issue: log error if still using issue_pat_XXX configuration after it was removed in d24051ce961c Show a helpful: found unsupported issue_prefix_pr = 'PR' - use issue_sub_pr instead before bailing out with: skipping incomplete issue pattern 'issue_pat_pr': '(?:PR\\s*)(\\d+)' -> 'https://kallithea-scm.org/repos/kallithea/pull-request/{id}' None
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 02 May 2020 23:02:02 +0200
parents fa373bf186b2
children b77c22e8a39c
files kallithea/lib/helpers.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/helpers.py	Mon Apr 13 22:49:07 2020 +0200
+++ b/kallithea/lib/helpers.py	Sat May 02 23:02:02 2020 +0200
@@ -1191,6 +1191,9 @@
             issue_pat = CONFIG.get(k)
             issue_server_link = CONFIG.get('issue_server_link%s' % suffix)
             issue_sub = CONFIG.get('issue_sub%s' % suffix)
+            issue_prefix = CONFIG.get('issue_prefix%s' % suffix)
+            if issue_prefix:
+                log.error('found unsupported issue_prefix%s = %r - use issue_sub%s instead', suffix, issue_prefix, suffix)
             if not issue_pat or not issue_server_link or issue_sub is None: # issue_sub can be empty but should be present
                 log.error('skipping incomplete issue pattern %r: %r -> %r %r', suffix, issue_pat, issue_server_link, issue_sub)
                 continue