mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 19:06:18 +01:00 
			
		
		
		
	Fix different behavior in status check pattern matching with double stars (#35474)
Drop the minimatch dependency, use our own glob compiler. Fix #35473
This commit is contained in:
		| @@ -1,9 +1,9 @@ | ||||
| import {minimatch} from 'minimatch'; | ||||
| import {createMonaco} from './codeeditor.ts'; | ||||
| import {onInputDebounce, queryElems, toggleElem} from '../utils/dom.ts'; | ||||
| import {POST} from '../modules/fetch.ts'; | ||||
| import {initRepoSettingsBranchesDrag} from './repo-settings-branches.ts'; | ||||
| import {fomanticQuery} from '../modules/fomantic/base.ts'; | ||||
| import {globMatch} from '../utils/glob.ts'; | ||||
|  | ||||
| const {appSubUrl, csrfToken} = window.config; | ||||
|  | ||||
| @@ -108,7 +108,7 @@ function initRepoSettingsBranches() { | ||||
|       let matched = false; | ||||
|       const statusCheck = el.getAttribute('data-status-check'); | ||||
|       for (const pattern of validPatterns) { | ||||
|         if (minimatch(statusCheck, pattern, {noext: true})) { // https://github.com/go-gitea/gitea/issues/33121 disable extended glob syntax | ||||
|         if (globMatch(statusCheck, pattern, '/')) { | ||||
|           matched = true; | ||||
|           break; | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user