Changeset - f7307da42aba
[Not reviewed]
stable
0 1 0
Mads Kiilerich - 6 years ago 2020-05-02 23:02:02
mads@kiilerich.com
Grafted from: 4a432d5cb537
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
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/helpers.py
Show inline comments
 
@@ -1188,12 +1188,15 @@ def urlify_issues(newtext, repo_name):
 
            if m is None:
 
                continue
 
            suffix = m.group(1)
 
            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
 

	
 
            # Wrap tmp_urlify_issues_f with substitution of this pattern, while making sure all loop variables (and compiled regexpes) are bound
 
            try:
0 comments (0 inline, 0 general)