summaryrefslogtreecommitdiffstats
path: root/models/repo_test.go
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2022-06-10 07:39:53 +0200
committerGitHub <noreply@github.com>2022-06-10 13:39:53 +0800
commit52c2e82813c2519cd08c9ecd66ef7b0815682770 (patch)
tree1120ca6d9b6534e33554f0b1c74529e62feba5b2 /models/repo_test.go
parent5f618248a98ffbb7066100ffe1955faf791d0205 (diff)
downloadgitea-52c2e82813c2519cd08c9ecd66ef7b0815682770.tar.gz
gitea-52c2e82813c2519cd08c9ecd66ef7b0815682770.zip
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>
Diffstat (limited to 'models/repo_test.go')
-rw-r--r--models/repo_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/repo_test.go b/models/repo_test.go
index c9e66398d1..f554ff16a6 100644
--- a/models/repo_test.go
+++ b/models/repo_test.go
@@ -74,6 +74,9 @@ func TestMetas(t *testing.T) {
externalTracker.ExternalTrackerConfig().ExternalTrackerStyle = markup.IssueNameStyleNumeric
testSuccess(markup.IssueNameStyleNumeric)
+ externalTracker.ExternalTrackerConfig().ExternalTrackerStyle = markup.IssueNameStyleRegexp
+ testSuccess(markup.IssueNameStyleRegexp)
+
repo, err := repo_model.GetRepositoryByID(3)
assert.NoError(t, err)