Drop non-config JSON metadata during add/add-wizard import#33420
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Silently drop selected JSON metadata fields during import
Drop non-config JSON metadata during add/add-wizard import
May 20, 2026
Copilot created this pull request from a session on behalf of
pelikhan
May 20, 2026 01:11
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Reduces noise during JSON workflow imports by treating API-returned metadata fields as known-but-ignored so they don’t get preserved into Extra or emitted as unsupported-field comments/warnings.
Changes:
- Updated
JSONWorkflow.UnmarshalJSONto ignorecreated_by,disabled,disabled_state, andupdated_atrather than capturing them inExtra. - Added a focused unmarshal test ensuring those metadata keys are dropped while truly unknown keys are still captured.
- Updated JSON→markdown conversion tests to assert warnings/comments are emitted only for genuinely unsupported fields (e.g.,
created_at), not ignored metadata.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/jsonworkflow_to_markdown.go | Adds specific API metadata keys to the known-key set so they are ignored during import. |
| pkg/cli/jsonworkflow_to_markdown_test.go | Adds/updates tests to ensure ignored metadata fields do not appear in Extra or conversion warnings. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JSON workflow imports were surfacing API metadata (
created_by,disabled,disabled_state,updated_at) as unsupported-field comments/warnings, adding noise to generated markdown. This change makes those fields explicitly ignored so imports keep only actionable workflow config.Import behavior change
created_by,disabled,disabled_state, andupdated_atas known-but-ignored during JSON unmarshal/conversion.Extra, emitted as# Unsupported fields..., or added to conversion warnings.Scope
gh aw addandgh aw add-wizard.Regression coverage
created_atstill appears in warnings/comments).