File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -452,6 +452,32 @@ func TestValidateMainWorkflowFrontmatterWithSchema(t *testing.T) {
452452 },
453453 wantErr : false ,
454454 },
455+ {
456+ name : "valid frontmatter with issues trigger lock-for-agent field" ,
457+ frontmatter : map [string ]any {
458+ "on" : map [string ]any {
459+ "issues" : map [string ]any {
460+ "types" : []string {"opened" },
461+ "lock-for-agent" : true ,
462+ },
463+ },
464+ "permissions" : "read" ,
465+ },
466+ wantErr : false ,
467+ },
468+ {
469+ name : "valid frontmatter with issues trigger lock-for-agent false" ,
470+ frontmatter : map [string ]any {
471+ "on" : map [string ]any {
472+ "issues" : map [string ]any {
473+ "types" : []string {"opened" },
474+ "lock-for-agent" : false ,
475+ },
476+ },
477+ "permissions" : "read" ,
478+ },
479+ wantErr : false ,
480+ },
455481 {
456482 name : "valid frontmatter with updated pull_request trigger types" ,
457483 frontmatter : map [string ]any {
Original file line number Diff line number Diff line change 381381 }
382382 }
383383 ]
384+ },
385+ "lock-for-agent" : {
386+ "type" : " boolean" ,
387+ "description" : " Whether to lock the issue for the agent when the workflow runs (prevents concurrent modifications)"
384388 }
385389 }
386390 },
You can’t perform that action at this time.
0 commit comments