mirror of
				https://github.com/woodpecker-ci/woodpecker.git
				synced 2025-10-31 07:46:21 +00:00 
			
		
		
		
	persist and compare yaml for gating
This commit is contained in:
		| @@ -6,6 +6,8 @@ func Lookup(name string) string { | ||||
| } | ||||
|  | ||||
| var index = map[string]string{ | ||||
| 	"config-find-id":            configFindId, | ||||
| 	"config-find-repo-hash":     configFindRepoHash, | ||||
| 	"count-users":               countUsers, | ||||
| 	"count-repos":               countRepos, | ||||
| 	"count-builds":              countBuilds, | ||||
| @@ -33,6 +35,29 @@ var index = map[string]string{ | ||||
| 	"task-delete":               taskDelete, | ||||
| } | ||||
|  | ||||
| var configFindId = ` | ||||
| SELECT | ||||
|  config_id | ||||
| ,config_repo_id | ||||
| ,config_hash | ||||
| ,config_data | ||||
| ,config_approved | ||||
| FROM config | ||||
| WHERE config_id = $1 | ||||
| ` | ||||
|  | ||||
| var configFindRepoHash = ` | ||||
| SELECT | ||||
|  config_id | ||||
| ,config_repo_id | ||||
| ,config_hash | ||||
| ,config_data | ||||
| ,config_approved | ||||
| FROM config | ||||
| WHERE config_repo_id = $1 | ||||
|   AND config_hash    = $2 | ||||
| ` | ||||
|  | ||||
| var countUsers = ` | ||||
| SELECT reltuples | ||||
| FROM pg_class WHERE relname = 'users'; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user