Issue 82: export tags and test cases with recipes#84
Open
OdinTheAllfather wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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_casesto.workatoenvconfig model and newworkato projects configcommands to set/show them. - Updated
ProjectManager.export_projectto resolve manifest flags from CLI args, local config, and environment variables. - Updated generated API models to adjust
project_idand 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 |
| 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] |
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.
No description provided.