codemagic-ci-cd / cli-tools

Various utilities to managing Android and iOS app builds, code signing, and deployment.
https://codemagic.io/start/
GNU General Public License v3.0
245 stars 42 forks source link

Simplify `app-store-connect` actions namespace #386

Closed priitlatt closed 9 months ago

priitlatt commented 9 months ago

PR #187 added the possibility to rename CLI actions while retaining the old version as a deprecated alias. Changes in this PR here utilize this development to clear up app-store-connect namespace and group actions interacting with similar resources under action groups. Currently there is a mix of actions like get-reource, list-resources etc and action groups that gather actions for similar resources (apps, beta-groups) such as resources get, resources list etc.

Due to this discrepancy it is hard to add new actions for resources that already have some actions, but do not have their dedicated namespace / action group yet. For example, where to add action that modifies bundle identifiers - should it still go under the root namespace polluting the already messy scope, or should there be another action group for the new action, which would further confuse the command line API?

For now all but one standalone actions that are directly related to a App Store Connect resource were all related to bundle identifiers, certificates, devices or provisioning profiles. New action groups were introduced for those resources to gather all related actions under unified namespace.

[!IMPORTANT] With all the refactorings carried out in this PR, the public Python API of codemagic.tools.AppStoreConnect remains unchanged.

Renamed actions:

[!NOTE] Functionality of old actions remains exactly the same with the caveat that invoking a deprecated action will show a warning message.

Examples with screenshots

Calling action with deprecated name ![Screenshot 2024-01-02 at 15 11 35](https://github.com/codemagic-ci-cd/cli-tools/assets/2756611/d8ebd8d7-bc91-413b-a6b6-d83d5e1525de)
Calling the same action with up-to-date name ![Screenshot 2024-01-02 at 15 11 51](https://github.com/codemagic-ci-cd/cli-tools/assets/2756611/c0a95052-ab41-472a-9b5e-9fc136b68973)

Changes to documentation were applied in a follow up PR #387.