-
Notifications
You must be signed in to change notification settings - Fork 217
Add user-invokable to ignored frontmatter fields #16259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,6 +73,18 @@ func TestFilterIgnoredFields(t *testing.T) { | |
| "engine": "claude", | ||
| }, | ||
| }, | ||
| { | ||
| name: "frontmatter with user-invokable - should be filtered", | ||
| frontmatter: map[string]any{ | ||
| "user-invokable": true, | ||
| "on": "push", | ||
| "engine": "claude", | ||
| }, | ||
| expected: map[string]any{ | ||
| "on": "push", | ||
| "engine": "claude", | ||
| }, | ||
| }, | ||
| } | ||
|
|
||
| for _, tt := range tests { | ||
|
|
@@ -156,6 +168,15 @@ func TestValidateMainWorkflowWithIgnoredFields(t *testing.T) { | |
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "valid frontmatter with user-invokable field - should be ignored", | ||
| frontmatter: map[string]any{ | ||
| "on": "push", | ||
| "user-invokable": true, | ||
| "engine": "claude", | ||
|
Comment on lines
+172
to
+176
|
||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "invalid frontmatter with ignored fields - other validation should still work", | ||
| frontmatter: map[string]any{ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that
IgnoredFrontmatterFieldsis non-empty again, the comment onfilterIgnoredFieldsinpkg/parser/schema_utilities.go(“currently does nothing”) is no longer accurate. Please update that comment to reflect that it actively filters the configured ignored fields (currentlyuser-invokable) so future changes don’t get misled.See below for a potential fix: