Remove company selection from account commands#901
Open
Soner (shyim) wants to merge 3 commits intomainfrom
Open
Remove company selection from account commands#901Soner (shyim) wants to merge 3 commits intomainfrom
Soner (shyim) wants to merge 3 commits intomainfrom
Conversation
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>
Contributor
There was a problem hiding this comment.
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(explicitproducerId) 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.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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 company list,account company use, andaccount producer infocommands/companies/{id}/allocationsto the new/integrations/shopwarecli/producersAPI which returns all producers for the authenticated user across all companiesMembership,MyProfile, and company-related types from the account API clientSHOPWARE_CLI_ACCOUNT_COMPANYenv var andaccount.companyyaml field)GetExtensionBinaries,CreateExtensionBinary,UpdateExtensionBinaryInfo,UpdateExtensionBinaryFile) now takeproducerIdfrom the extension'sProducer.Idfield instead of the client's active companyCloses #895
Test plan
go build ./...passesgo test ./internal/config/...passesshopware-cli account loginworks with existing credentialsshopware-cli account producer extension listreturns extensions from all producersshopware-cli account producer extension uploadworks correctly withext.Producer.Id🤖 Generated with Claude Code