Skip to content

Conversation

@oalami
Copy link
Collaborator

@oalami oalami commented Oct 21, 2025

  • Created a custom AliasedGroup class in /Users/ossama/dev/workato-platform-cli/src/workato_platform/cli/init.py:26-47
  • Added add_command_with_alias() method that registers the command and stores alias mappings internally
  • Modified get_command() to resolve aliases to their main command names
  • Updated all command registrations to use add_command_with_alias() with the singular form as the hidden alias

  - Created a custom AliasedGroup class in /Users/ossama/dev/workato-platform-cli/src/workato_platform/cli/__init__.py:26-47
  - Added add_command_with_alias() method that registers the command and stores alias mappings internally
  - Modified get_command() to resolve aliases to their main command names
  - Updated all command registrations to use add_command_with_alias() with the singular form as the hidden alias
Copilot AI review requested due to automatic review settings October 21, 2025 18:12
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 implements a custom Click group class to manage command aliases, ensuring only main commands appear in help output while keeping singular forms accessible as hidden aliases. The solution centralizes alias management through a new AliasedGroup class that maps aliases to their main commands internally.

Key changes:

  • Introduced AliasedGroup class with internal alias mapping and resolution
  • Replaced duplicate command registrations with add_command_with_alias() calls
  • Converted all plural-singular command pairs to use hidden aliases

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Oct 21, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py52296%10–11
cli
   __init__.py49295%42, 50
   containers.py270100% 
cli/commands
   __init__.py00100% 
   api_clients.py286996%24, 297, 442–443, 476, 486, 576, 607, 615
   api_collections.py253398%25, 178, 340
   assets.py46295%51–52
   connections.py520599%578, 580, 586, 624, 973
   data_tables.py163596%28, 248, 262, 316–317
   guide.py166199%106
   init.py850100% 
   profiles.py1970100% 
   properties.py95198%18
   pull.py171298%190–191
   workspace.py38294%57, 67
cli/commands/connectors
   __init__.py00100% 
   command.py88297%103, 152
   connector_manager.py203498%176, 292, 300–301
cli/commands/projects
   __init__.py00100% 
   command.py2691096%353–356, 367, 433–435, 485, 489
   project_manager.py166795%48, 66, 263–264, 276, 317, 325
cli/commands/push
   __init__.py00100% 
   command.py132496%101, 104, 222, 300
cli/commands/recipes
   __init__.py00100% 
   command.py423997%113, 129–130, 267–270, 397, 703
   validator.py6991697%174, 870, 1123, 1210, 1300–1302, 1398–1399, 1458–1459, 1648–1649, 1677–1679
cli/utils
   __init__.py30100% 
   exception_handler.py198696%137, 184, 211, 238, 295, 330
   gitignore.py140100% 
   ignore_patterns.py230100% 
   spinner.py430100% 
   version_checker.py135695%24, 26, 33–34, 72, 102
cli/utils/config
   __init__.py50100% 
   manager.py4541397%125, 136–138, 141, 154, 330, 454, 668, 826–827, 888, 947
   models.py330100% 
   profiles.py3091096%93, 189–190, 193, 228–230, 255–257
   workspace.py680100% 
TOTAL541312197% 

oalami and others added 3 commits October 21, 2025 11:14
check that alias is not equal to the main command name

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@oalami oalami closed this Oct 21, 2025
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.

2 participants