Skip to content

Commit

Permalink
Remove extended glob pattern from branch protection UI (#33125)
Browse files Browse the repository at this point in the history
Underlying go library has no support for it

Fixes: #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.
  • Loading branch information
TheFox0x7 authored Jan 6, 2025
1 parent 1a95d9d commit 4a18c72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web_src/js/features/repo-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4a18c72

Please sign in to comment.