Skip to content

Remove company selection from account commands#901

Open
Soner (shyim) wants to merge 3 commits intomainfrom
remove-company-selection
Open

Remove company selection from account commands#901
Soner (shyim) wants to merge 3 commits intomainfrom
remove-company-selection

Conversation

@shyim
Copy link
Member

Summary

  • Remove account company list, account company use, and account producer info commands
  • Switch producer endpoint from /companies/{id}/allocations to the new /integrations/shopwarecli/producers API which returns all producers for the authenticated user across all companies
  • Remove Membership, MyProfile, and company-related types from the account API client
  • Remove company field from CLI config (SHOPWARE_CLI_ACCOUNT_COMPANY env var and account.company yaml field)
  • Binary operations (GetExtensionBinaries, CreateExtensionBinary, UpdateExtensionBinaryInfo, UpdateExtensionBinaryFile) now take producerId from the extension's Producer.Id field instead of the client's active company

Closes #895

Test plan

  • go build ./... passes
  • go test ./internal/config/... passes
  • Verify shopware-cli account login works with existing credentials
  • Verify shopware-cli account producer extension list returns extensions from all producers
  • Verify shopware-cli account producer extension upload works correctly with ext.Producer.Id

🤖 Generated with Claude Code

Remove company selection from the account commands and switch the producer
endpoint to use the new `/integrations/shopwarecli/producers` API that returns
all producers for the authenticated user across all companies.

Closes #895

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 9, 2026 05:25
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 removes the “active company” concept from shopware-cli account flows and updates the account API client/commands to operate across all producers available to the authenticated user, using the new /integrations/shopwarecli/producers endpoint.

Changes:

  • Removed company-selection commands and related account API types (memberships/profile) plus the company config/env var.
  • Switched producer discovery to the new integrations endpoint and updated extension listing to aggregate across multiple producers.
  • Updated binary upload operations to use ext.Producer.Id (explicit producerId) instead of an “active company”.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/config/config_test.go Updates config tests to reflect removal of account.company.
internal/config/config.go Removes company field and setters/getters from persisted/env config.
internal/account-api/updates.go Uses ApiUrl constant instead of hardcoded base URL for autoupdate endpoint.
internal/account-api/profile.go Deletes unused “MyProfile” API and types.
internal/account-api/producer_extension.go Binary endpoints now take explicit producerId parameter.
internal/account-api/producer.go Producer discovery uses integrations endpoint; extension listing aggregates across producer IDs.
internal/account-api/login.go Removes membership fetching/types during login flow.
internal/account-api/client.go Removes membership/company helpers from the API client and related logging.
cmd/account/account_producer_info.go Removes producer info command.
cmd/account/account_producer_extension_upload.go Passes ext.Producer.Id into binary operations.
cmd/account/account_logout.go Stops clearing company config on logout (company config removed).
cmd/account/account_login.go Removes membership switching and profile greeting; simplifies login output.
cmd/account/account_company_use.go Removes company switching command.
cmd/account/account_company_list.go Removes company listing command.
cmd/account/account_company.go Removes account company command root.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Soner (shyim) and others added 2 commits March 9, 2026 06:37
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

[Shopware Account] Remove Company selection

2 participants