Skip to content

Issue 82: export tags and test cases with recipes#84

Open
OdinTheAllfather wants to merge 2 commits into
workato-devs:mainfrom
OdinTheAllfather:82-export-tags-and-test-cases-with-recipes
Open

Issue 82: export tags and test cases with recipes#84
OdinTheAllfather wants to merge 2 commits into
workato-devs:mainfrom
OdinTheAllfather:82-export-tags-and-test-cases-with-recipes

Conversation

@OdinTheAllfather

Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings May 22, 2026 19:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a way to persist project export-manifest include defaults in local config and wires those defaults (plus env overrides) into export_project.

Changes:

  • Added export_include_tags / export_include_test_cases to .workatoenv config model and new workato projects config commands to set/show them.
  • Updated ProjectManager.export_project to resolve manifest flags from CLI args, local config, and environment variables.
  • Updated generated API models to adjust project_id and API client collection/policy fields.

Reviewed changes

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

Show a summary per file
File Description
tests/unit/commands/projects/test_project_manager.py Adds unit tests asserting export uses config defaults / false fallbacks for manifest flags.
tests/unit/commands/projects/test_command.py Adds unit tests for the new projects config set/show callbacks.
src/workato_platform_cli/client/workato_api/models/api_collection.py Changes project_id typing and removes coercion validator.
src/workato_platform_cli/client/workato_api/models/api_client.py Makes api_policies / api_collections required lists.
src/workato_platform_cli/cli/utils/config/models.py Adds persisted config fields for export manifest defaults.
src/workato_platform_cli/cli/commands/projects/project_manager.py Implements flag resolution from CLI/config/env and passes into manifest creation.
src/workato_platform_cli/cli/commands/projects/command.py Adds workato projects config group with set/show behavior.
docs/COMMAND_REFERENCE.md Documents the new projects config commands.
README.md Adds examples for configuring/showing export defaults.
Makefile Restores __pycache__ deletion line with correct formatting.
.pre-commit-config.yaml Pins a patched pip in the pip-audit hook environment.

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

click.echo(f"❌ Failed to switch to project '{selected_project_name}': {e}")


@projects.group(name="config", invoke_without_command=True)
Comment on lines +306 to +313
@inject
async def set_project_config(
include_tags: bool | None = None,
include_test_cases: bool | None = None,
config_manager: ConfigManager = Provide[Container.config_manager],
) -> None:
"""Set project export defaults in local .workatoenv config."""

Comment on lines +312 to +320
"""Set project export defaults in local .workatoenv config."""

if include_tags is None and include_test_cases is None:
click.echo("❌ No config values provided")
click.echo(
"💡 Use --include-tags/--no-include-tags and/or "
"--include-test-cases/--no-include-test-cases"
)
return
click.echo(f" export_include_test_cases: {config_data.export_include_test_cases}")


@set_project_config.command(name="show")
)
@handle_cli_exceptions
@inject
async def show_project_config(
id: StrictInt
name: StrictStr
project_id: Optional[Union[StrictStr, StrictInt]] = None
project_id: StrictStr
Comment on lines +48 to +49
api_policies: List[ApiClientApiPoliciesInner] = Field(description="List of API policies associated with the client")
api_collections: List[ApiClientApiCollectionsInner] = Field(description="List of API collections associated with the client")
Comment on lines +22 to 24
from typing import Any, ClassVar, Dict, List, Optional
from workato_platform_cli.client.workato_api.models.import_results import ImportResults
from typing import Optional, Set
Comment on lines +135 to +138
except Exception:
# Export should still work even if local config cannot be loaded.
click.echo("⚠️ Could not load config, using defaults")
pass
Comment thread docs/COMMAND_REFERENCE.md
workato workspace # Show current workspace info
workato pull # Pull latest from remote
workato push [--restart-recipes] # Push local changes (recipes won't restart by default)
workato projects config --include-tags|--no-include-tags [--include-test-cases|--no-include-test-cases]
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