Skip to content

Commit 89fa32a

Browse files
Copilotpelikhan
andcommitted
Remove repository-projects permission from schema and update test
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent 9f1f3fa commit 89fa32a

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/aw/schemas/agentic-workflow.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,11 @@
11951195
"type": "string",
11961196
"enum": ["read", "write", "none"]
11971197
},
1198+
"repository-projects": {
1199+
"type": "string",
1200+
"enum": ["read", "write", "none"],
1201+
"description": "Permission for repository projects (read: view projects, write: manage projects, none: no access)"
1202+
},
11981203
"security-events": {
11991204
"type": "string",
12001205
"enum": ["read", "write", "none"]

pkg/parser/schema_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ func TestValidateMainWorkflowFrontmatterWithSchema(t *testing.T) {
713713
errContains: "additional properties 'invalid_prop' not allowed",
714714
},
715715
{
716-
name: "valid new GitHub Actions properties - permissions with new properties",
716+
name: "invalid permissions with unsupported repository-projects property",
717717
frontmatter: map[string]any{
718718
"on": "push",
719719
"permissions": map[string]any{
@@ -725,7 +725,7 @@ func TestValidateMainWorkflowFrontmatterWithSchema(t *testing.T) {
725725
"repository-projects": "none",
726726
},
727727
},
728-
wantErr: false,
728+
wantErr: true,
729729
},
730730
{
731731
name: "valid claude engine with network permissions",

pkg/parser/schemas/main_workflow_schema.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,11 +1195,6 @@
11951195
"type": "string",
11961196
"enum": ["read", "write", "none"]
11971197
},
1198-
"repository-projects": {
1199-
"type": "string",
1200-
"enum": ["read", "write", "none"],
1201-
"description": "Permission for repository projects (read: view projects, write: manage projects, none: no access)"
1202-
},
12031198
"security-events": {
12041199
"type": "string",
12051200
"enum": ["read", "write", "none"]

0 commit comments

Comments
 (0)