File tree Expand file tree Collapse file tree 3 files changed +72
-1
lines changed
internal/schemavalidators
external_schemas/runnercontext Expand file tree Collapse file tree 3 files changed +72
-1
lines changed Original file line number Diff line number Diff line change 77 "id" : {
88 "type" : " string" ,
99 "description" : " Unique identifier for the runner context schema version"
10+ },
11+ "errors" : {
12+ "items" : {
13+ "type" : " string"
14+ },
15+ "type" : " array" ,
16+ "description" : " Array of error messages"
1017 }
1118 },
1219 "additionalProperties" : false ,
319326 "additionalProperties" : false ,
320327 "type" : " object" ,
321328 "required" : [
322- " owner" ,
323329 " repository"
324330 ]
325331 },
Original file line number Diff line number Diff line change @@ -194,6 +194,10 @@ func TestValidateRunnerContext(t *testing.T) {
194194 name : "0.1 GitHub rulesets" ,
195195 filePath : "./testdata/runner_context_rulesets-v0.1.json" ,
196196 },
197+ {
198+ name : "0.1 GitLab no protection" ,
199+ filePath : "./testdata/runner_context_gitlab_no_protection-v0.1.json" ,
200+ },
197201 {
198202 name : "invalid Chainloop runner context - missing meta" ,
199203 filePath : "./testdata/runner_context_missing-meta-v0.1.json" ,
Original file line number Diff line number Diff line change 1+ {
2+ "meta" : {
3+ "id" : " chainloop.dev/runner-context/v0.1"
4+ },
5+ "data" : {
6+ "tool" : " platform@6df8c658" ,
7+ "provider" : " gitlab" ,
8+ "repos" : [
9+ {
10+ "repository" : " 69340413" ,
11+ "branches" : [
12+ {
13+ "name" : " main" ,
14+ "active_rules" : [
15+ {
16+ "name" : " allow_force_push" ,
17+ "enabled" : " false"
18+ },
19+ {
20+ "name" : " code_owner_approval_required" ,
21+ "enabled" : " false"
22+ },
23+ {
24+ "name" : " push_access_levels" ,
25+ "enabled" : " true" ,
26+ "context" : [
27+ {
28+ "name" : " access_level" ,
29+ "value" : " 40" ,
30+ "enabled" : " true"
31+ },
32+ {
33+ "name" : " access_level_description" ,
34+ "value" : " Maintainers" ,
35+ "enabled" : " true"
36+ }
37+ ]
38+ },
39+ {
40+ "name" : " merge_access_levels" ,
41+ "enabled" : " true" ,
42+ "context" : [
43+ {
44+ "name" : " access_level" ,
45+ "value" : " 40" ,
46+ "enabled" : " true"
47+ },
48+ {
49+ "name" : " access_level_description" ,
50+ "value" : " Maintainers" ,
51+ "enabled" : " true"
52+ }
53+ ]
54+ }
55+ ]
56+ }
57+ ]
58+ }
59+ ]
60+ }
61+ }
You can’t perform that action at this time.
0 commit comments