Skip to content

fix(account): update extension label and description on info pull#930

Open
Soner (shyim) wants to merge 2 commits intomainfrom
fix/pull-update-extension-metadata
Open

fix(account): update extension label and description on info pull#930
Soner (shyim) wants to merge 2 commits intomainfrom
fix/pull-update-extension-metadata

Conversation

@shyim
Copy link
Member

Summary

  • account producer extension info pull now writes the extension label and short description from the store back to composer.json (for platform plugins) and manifest.xml (for apps)
  • This makes push and pull symmetric: push reads label/description from these files and sends them to the store, pull now writes them back
  • Added UpdateMetaData method to the Extension interface with implementations for all three extension types
  • Exported ExtensionMetadata and ExtensionTranslated types so they can be used from the account package

Fixes #929

Test plan

  • Added unit test for UpdateMetaData on PlatformPlugin — verifies composer.json extra.label and extra.description are updated
  • Added unit test for UpdateMetaData on App — verifies manifest.xml <label> and <description> elements are updated
  • All existing tests pass
  • Manual test: change extension name in Shopware Store, run shopware-cli account producer extension info pull, verify composer.json/manifest.xml is updated

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
Copilot AI review requested due to automatic review settings March 26, 2026 14:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the extension.Extension interface.
  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

info pull does not update extension label/description in composer.json or manifest.xml

2 participants