mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Custom regexp external issues (#17624)
* Implement custom regular expression for external issue tracking. Signed-off-by: Alexander Beyn <malex@fatelectrons.org> * Fix syntax/style * Update repo.go * Set metas['regexp'] * gofmt * fix some tests * fix more tests * refactor frontend * use LRU cache for regexp * Update modules/markup/html_internal_test.go Co-authored-by: Alexander Beyn <malex@fatelectrons.org> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -414,6 +414,9 @@ func (repo *Repository) ComposeMetas() map[string]string {
|
||||
switch unit.ExternalTrackerConfig().ExternalTrackerStyle {
|
||||
case markup.IssueNameStyleAlphanumeric:
|
||||
metas["style"] = markup.IssueNameStyleAlphanumeric
|
||||
case markup.IssueNameStyleRegexp:
|
||||
metas["style"] = markup.IssueNameStyleRegexp
|
||||
metas["regexp"] = unit.ExternalTrackerConfig().ExternalTrackerRegexpPattern
|
||||
default:
|
||||
metas["style"] = markup.IssueNameStyleNumeric
|
||||
}
|
||||
|
Reference in New Issue
Block a user