fix(account): update extension label and description on info pull#930
Open
Soner (shyim) wants to merge 2 commits intomainfrom
Open
fix(account): update extension label and description on info pull#930Soner (shyim) wants to merge 2 commits intomainfrom
Soner (shyim) wants to merge 2 commits intomainfrom
Conversation
The pull command now writes label and short description from the store back to composer.json (for plugins) and manifest.xml (for apps), making push and pull symmetric operations. Fixes #929
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes account producer extension info pull symmetric with info push by persisting store-provided label and short description back into the local extension source metadata files.
Changes:
- Exported extension metadata types and added
UpdateMetaData(*ExtensionMetadata)to theextension.Extensioninterface. - Implemented metadata updates for platform plugins (
composer.json) and apps (manifest.xml) and wired the pull command to call it. - Added unit tests covering metadata update persistence for platform plugins and apps.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
cmd/account/account_producer_extension_info_pull.go |
Captures label/short description from store infos and calls UpdateMetaData after pulling. |
internal/extension/root.go |
Exports metadata types and extends the Extension interface with UpdateMetaData. |
internal/extension/platform.go |
Implements UpdateMetaData for platform plugins by updating composer.json extra.label/extra.description. |
internal/extension/app.go |
Implements UpdateMetaData for apps by updating <label>/<description> in manifest.xml. |
internal/extension/bundle.go |
Updates metadata type usage and provides a no-op UpdateMetaData implementation. |
internal/extension/root_test.go |
Adds new unit tests for plugin/app metadata update behavior. |
internal/extension/extension_test.go |
Updates the mock extension to satisfy the updated interface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Use deterministic order when appending new translations in manifest.xml - Guard UpdateMetaData call to skip when all fields are empty - Only write label/description keys to composer.json when values exist - Skip composer.json write entirely when nothing changed
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.
Summary
account producer extension info pullnow writes the extension label and short description from the store back tocomposer.json(for platform plugins) andmanifest.xml(for apps)pushandpullsymmetric: push reads label/description from these files and sends them to the store, pull now writes them backUpdateMetaDatamethod to theExtensioninterface with implementations for all three extension typesExtensionMetadataandExtensionTranslatedtypes so they can be used from theaccountpackageFixes #929
Test plan
UpdateMetaDataonPlatformPlugin— verifiescomposer.jsonextra.labelandextra.descriptionare updatedUpdateMetaDataonApp— verifiesmanifest.xml<label>and<description>elements are updatedshopware-cli account producer extension info pull, verifycomposer.json/manifest.xmlis updated