From 4a18c722623870e7c5c7a6757c2eac73b9c91669 Mon Sep 17 00:00:00 2001 From: TheFox0x7 Date: Tue, 7 Jan 2025 00:23:50 +0100 Subject: [PATCH] Remove extended glob pattern from branch protection UI (#33125) Underlying go library has no support for it Fixes: https://github.com/go-gitea/gitea/issues/33121 --- I never touched frontend tests so pointers how to write them are welcome. This can be either fix or workaround, depending if this is something gitea should support in the future or not. The golang side is unlikely to get updates though. --- web_src/js/features/repo-settings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/js/features/repo-settings.ts b/web_src/js/features/repo-settings.ts index 1d2d447205f..90b0219f3e2 100644 --- a/web_src/js/features/repo-settings.ts +++ b/web_src/js/features/repo-settings.ts @@ -107,7 +107,7 @@ function initRepoSettingsBranches() { let matched = false; const statusCheck = el.getAttribute('data-status-check'); for (const pattern of validPatterns) { - if (minimatch(statusCheck, pattern)) { + if (minimatch(statusCheck, pattern, {noext: true})) { // https://github.com/go-gitea/gitea/issues/33121 disable extended glob syntax matched = true; break; }