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

Register a CLI command per importer #80

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Register a CLI command per importer #80

merged 1 commit into from
Jul 30, 2024

Conversation

joehoyle
Copy link
Member

Previouly HMCI had a single import command, and internally handled all arg validation and registration for each importer. It's a lot cleaner to register a CLI command per importer, so WP CLI can show the correct help, validation etc. This also simplifies the implementation significantly.

Previouly HMCI had a single `import` command, and internally handled all arg validation and registration for each importer. It's a lot cleaner to register a CLI command per importer, so WP CLI can show the correct help, validation etc. This also simplifies the implementation significantly.
@joehoyle joehoyle requested a review from goldenapples July 29, 2024 07:05
Copy link
Contributor

@goldenapples goldenapples left a comment

Choose a reason for hiding this comment

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

This is a big improvement as far as discoverability. The one thing I see is that the options in the help command aren't formatted correctly; is the format in get_importer_global_args() correct?

image

Update: never mind, that format is correct, Don't know what I was thinking of. The only thing unclear is that all of these options should be optional.

@joehoyle joehoyle merged commit 61ebe4f into main Jul 30, 2024
@joehoyle joehoyle deleted the remove-validate branch July 30, 2024 06:43
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