Show More
@@ -68,15 +68,15 b' proxypass_auth_enabled = false' | |||||
68 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} |
|
68 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
69 |
|
69 | |||
70 | ## issue tracking mapping for commits messages |
|
70 | ## issue tracking mapping for commits messages | |
71 |
## |
|
71 | ## comment out issue_pat, issue_server, issue_prefix to enable | |
72 |
|
||||
73 |
|
72 | |||
74 | ## pattern to get the issues from commit messages |
|
73 | ## pattern to get the issues from commit messages | |
75 | ## default one used here is #1234 |
|
74 | ## default one used here is #<numbers> with a regex passive group for `#` | |
|
75 | ## {id} will be all groups matched from this pattern | |||
76 |
|
76 | |||
77 |
|
|
77 | issue_pat = (?:\s*#)(\d+) | |
78 |
|
78 | |||
79 |
## server url to the issue, each {id} will be replaced with |
|
79 | ## server url to the issue, each {id} will be replaced with match | |
80 | ## fetched from the regex and {repo} is replaced with repository name |
|
80 | ## fetched from the regex and {repo} is replaced with repository name | |
81 |
|
81 | |||
82 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
|
82 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} |
@@ -68,23 +68,23 b' proxypass_auth_enabled = false' | |||||
68 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} |
|
68 | #clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
69 |
|
69 | |||
70 | ## issue tracking mapping for commits messages |
|
70 | ## issue tracking mapping for commits messages | |
71 |
## |
|
71 | ## comment out issue_pat, issue_server, issue_prefix to enable | |
72 |
|
||||
73 |
|
72 | |||
74 | ## pattern to get the issues from commit messages |
|
73 | ## pattern to get the issues from commit messages | |
75 | ## default one used here is #1234 |
|
74 | ## default one used here is #<numbers> with a regex passive group for `#` | |
|
75 | ## {id} will be all groups matched from this pattern | |||
76 |
|
76 | |||
77 |
|
|
77 | issue_pat = (?:\s*#)(\d+) | |
78 |
|
78 | |||
79 |
## server url to the issue, each {id} will be replaced with |
|
79 | ## server url to the issue, each {id} will be replaced with match | |
80 | ## fetched from the regex and {repo} is replaced with repository name |
|
80 | ## fetched from the regex and {repo} is replaced with repository name | |
81 |
|
81 | |||
82 |
|
|
82 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} | |
83 |
|
83 | |||
84 | ## prefix to add to link to indicate it's an url |
|
84 | ## prefix to add to link to indicate it's an url | |
85 | ## #314 will be replaced by <issue_prefix><id> |
|
85 | ## #314 will be replaced by <issue_prefix><id> | |
86 |
|
86 | |||
87 |
|
|
87 | issue_prefix = # | |
88 |
|
88 | |||
89 |
|
89 | |||
90 | #################################### |
|
90 | #################################### |
@@ -68,23 +68,23 b' proxypass_auth_enabled = false' | |||||
68 | # clone_uri = {scheme}://{user}{pass}{netloc}{path} |
|
68 | # clone_uri = {scheme}://{user}{pass}{netloc}{path} | |
69 |
|
69 | |||
70 | ## issue tracking mapping for commits messages |
|
70 | ## issue tracking mapping for commits messages | |
71 |
## |
|
71 | ## comment out issue_pat, issue_server, issue_prefix to enable | |
72 |
|
||||
73 |
|
72 | |||
74 | ## pattern to get the issues from commit messages |
|
73 | ## pattern to get the issues from commit messages | |
75 | ## default one used here is #1234 |
|
74 | ## default one used here is #<numbers> with a regex passive group for `#` | |
|
75 | ## {id} will be all groups matched from this pattern | |||
76 |
|
76 | |||
77 |
|
|
77 | issue_pat = (?:\s*#)(\d+) | |
78 |
|
78 | |||
79 |
## server url to the issue, each {id} will be replaced with |
|
79 | ## server url to the issue, each {id} will be replaced with match | |
80 | ## fetched from the regex and {repo} is replaced with repository name |
|
80 | ## fetched from the regex and {repo} is replaced with repository name | |
81 |
|
81 | |||
82 |
|
|
82 | issue_server_link = https://myissueserver.com/{repo}/issue/{id} | |
83 |
|
83 | |||
84 | ## prefix to add to link to indicate it's an url |
|
84 | ## prefix to add to link to indicate it's an url | |
85 | ## #314 will be replaced by <issue_prefix><id> |
|
85 | ## #314 will be replaced by <issue_prefix><id> | |
86 |
|
86 | |||
87 |
|
|
87 | issue_prefix = # | |
88 |
|
88 | |||
89 |
|
89 | |||
90 | #################################### |
|
90 | #################################### |
@@ -788,7 +788,7 b' def urlify_commit(text_, repository=None' | |||||
788 | try: |
|
788 | try: | |
789 | conf = config['app_conf'] |
|
789 | conf = config['app_conf'] | |
790 |
|
790 | |||
791 |
URL_PAT = re.compile(r'%s' % conf.get(' |
|
791 | URL_PAT = re.compile(r'%s' % conf.get('issue_pat')) | |
792 |
|
792 | |||
793 | if URL_PAT: |
|
793 | if URL_PAT: | |
794 | ISSUE_SERVER_LNK = conf.get('issue_server_link') |
|
794 | ISSUE_SERVER_LNK = conf.get('issue_server_link') | |
@@ -799,7 +799,7 b' def urlify_commit(text_, repository=None' | |||||
799 | if match_obj.group().startswith(' '): |
|
799 | if match_obj.group().startswith(' '): | |
800 | pref = ' ' |
|
800 | pref = ' ' | |
801 |
|
801 | |||
802 |
issue_id = match_obj.groups() |
|
802 | issue_id = ''.join(match_obj.groups()) | |
803 | tmpl = ( |
|
803 | tmpl = ( | |
804 | '%(pref)s<a class="%(cls)s" href="%(url)s">' |
|
804 | '%(pref)s<a class="%(cls)s" href="%(url)s">' | |
805 | '%(issue-prefix)s%(id-repr)s' |
|
805 | '%(issue-prefix)s%(id-repr)s' |
General Comments 0
You need to be logged in to leave comments.
Login now