From 52c2e82813c2519cd08c9ecd66ef7b0815682770 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 10 Jun 2022 07:39:53 +0200 Subject: Custom regexp external issues (#17624) * Implement custom regular expression for external issue tracking. Signed-off-by: Alexander Beyn * 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 Co-authored-by: techknowlogick Co-authored-by: Lauris BH Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang --- routers/web/repo/setting.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'routers') diff --git a/routers/web/repo/setting.go b/routers/web/repo/setting.go index 1a7a41ae91..f49ef6e85d 100644 --- a/routers/web/repo/setting.go +++ b/routers/web/repo/setting.go @@ -434,9 +434,10 @@ func SettingsPost(ctx *context.Context) { RepoID: repo.ID, Type: unit_model.TypeExternalTracker, Config: &repo_model.ExternalTrackerConfig{ - ExternalTrackerURL: form.ExternalTrackerURL, - ExternalTrackerFormat: form.TrackerURLFormat, - ExternalTrackerStyle: form.TrackerIssueStyle, + ExternalTrackerURL: form.ExternalTrackerURL, + ExternalTrackerFormat: form.TrackerURLFormat, + ExternalTrackerStyle: form.TrackerIssueStyle, + ExternalTrackerRegexpPattern: form.ExternalTrackerRegexpPattern, }, }) deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeIssues) -- cgit v1.2.3