Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI command to list and delete custom actions #28

Merged

Conversation

leon-schmid
Copy link
Member

This PR adds two new CLI action commands:

  • list to list all pushed actions
  • delete to delete a specified action

Copy link

vercel bot commented Oct 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
admyral-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2024 11:47am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
admyral ⬜️ Ignored (Inspect) Oct 4, 2024 11:47am

@vercel vercel bot temporarily deployed to Preview – admyral-docs October 2, 2024 14:50 Inactive
Comment on lines 238 to 280
delete(PythonActionSchema).where(
PythonActionSchema.action_type == action_type
)
Copy link
Member

Choose a reason for hiding this comment

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

You need to consider the user_id too. Can you merge the newest changes into your branch.

@leon-schmid leon-schmid force-pushed the ADM-312/CLI-command-to-list-and-delete-custom-actions branch from 47e4081 to 3d4de07 Compare October 3, 2024 18:10
@vercel vercel bot temporarily deployed to Preview – admyral October 3, 2024 18:12 Inactive
@vercel vercel bot temporarily deployed to Preview – admyral-docs October 3, 2024 18:13 Inactive
@vercel vercel bot temporarily deployed to Preview – admyral October 3, 2024 18:23 Inactive
@vercel vercel bot temporarily deployed to Preview – admyral-docs October 3, 2024 18:24 Inactive

@action.command(
"list",
help="List all pushed actions",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
help="List all pushed actions",
help="List all custom actions",

authenticated_user: AuthenticatedUser = Depends(authenticate),
) -> list[ActionMetadata]:
"""
List all stored Python actions.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
List all stored Python actions.
List all stored custom Python actions.

List all stored Python actions.

Returns:
A list of Python action objects.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
A list of Python action objects.
A list of custom Python action objects.

action_type: str, authenticated_user: AuthenticatedUser = Depends(authenticate)
) -> None:
"""
Delete a Python action by its action type.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Delete a Python action by its action type.
Delete a custom Python action by its action type.

Delete a Python action by its action type.

Args:
action_type: The action type.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
action_type: The action type.
action_type: The function name of the custom action.

@vercel vercel bot temporarily deployed to Preview – admyral-docs October 4, 2024 11:42 Inactive
@vercel vercel bot temporarily deployed to Preview – admyral-docs October 4, 2024 11:45 Inactive
@leon-schmid leon-schmid force-pushed the ADM-312/CLI-command-to-list-and-delete-custom-actions branch from d341b99 to 0d0e894 Compare October 4, 2024 11:46
@vercel vercel bot temporarily deployed to Preview – admyral-docs October 4, 2024 11:47 Inactive
@leon-schmid leon-schmid merged commit 606c34f into main Oct 7, 2024
6 checks passed
@leon-schmid leon-schmid deleted the ADM-312/CLI-command-to-list-and-delete-custom-actions branch October 7, 2024 08:07
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