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 --max_num_posts parameter to export command #15

Merged
merged 6 commits into from Sep 24, 2017

Conversation

3 participants
@drzraf
Contributor

drzraf commented Aug 29, 2017

wp export --limit=<num>

@drzraf

This comment has been minimized.

Show comment
Hide comment
@drzraf

drzraf Aug 29, 2017

Contributor

about the "Warning: limit should be a positive integer" is simply that the current code validate() default values thus making impossible to have a default value outside the scope allowed to the user (what is desirable in case of integer where -1 means option disabled)
suggestion: validate first and merge default then.

Contributor

drzraf commented Aug 29, 2017

about the "Warning: limit should be a positive integer" is simply that the current code validate() default values thus making impossible to have a default value outside the scope allowed to the user (what is desirable in case of integer where -1 means option disabled)
suggestion: validate first and merge default then.

@danielbachhuber

👍 Few minor things to clean up.

Show outdated Hide outdated src/Export_Command.php Outdated
Show outdated Hide outdated src/WP_Export_Query.php Outdated
Show outdated Hide outdated src/WP_Export_Query.php Outdated
@drzraf

This comment has been minimized.

Show comment
Hide comment
@drzraf

drzraf Aug 31, 2017

Contributor

new commits (don't know if you received notification about this)

Contributor

drzraf commented Aug 31, 2017

new commits (don't know if you received notification about this)

@schlessera

This comment has been minimized.

Show comment
Hide comment
@schlessera

schlessera Sep 5, 2017

Member

@drzraf Looks good so far, apart from the breaking test.

Travis shows that the EXPORT_FILE has not been defined: https://travis-ci.org/wp-cli/export-command/jobs/270271776#L521

This is because EXPORT_FILE is not a constant, but a value generated from an export and stored for reference later in the same test, like here: https://github.com/drzraf/export-command/blob/0043abfc98aa93b0186b334f792fcd7c6badc045/features/export.feature#L56-L57

Member

schlessera commented Sep 5, 2017

@drzraf Looks good so far, apart from the breaking test.

Travis shows that the EXPORT_FILE has not been defined: https://travis-ci.org/wp-cli/export-command/jobs/270271776#L521

This is because EXPORT_FILE is not a constant, but a value generated from an export and stored for reference later in the same test, like here: https://github.com/drzraf/export-command/blob/0043abfc98aa93b0186b334f792fcd7c6badc045/features/export.feature#L56-L57

@drzraf

This comment has been minimized.

Show comment
Hide comment
@drzraf

drzraf Sep 5, 2017

Contributor

added 6bb2850

Contributor

drzraf commented Sep 5, 2017

added 6bb2850

drzraf and others added some commits Sep 5, 2017

Rename `--limit` to `--max_num_posts`.
This brings it more in line with `max_file_size`.
@schlessera

This comment has been minimized.

Show comment
Hide comment
@schlessera

schlessera Sep 24, 2017

Member

Renamed the argument from --limit to --max_num_posts, as discussed in Slack (https://wordpress.slack.com/archives/C02RP4T41/p1505840530000437).

Member

schlessera commented Sep 24, 2017

Renamed the argument from --limit to --max_num_posts, as discussed in Slack (https://wordpress.slack.com/archives/C02RP4T41/p1505840530000437).

@schlessera schlessera added this to the 1.0.3 milestone Sep 24, 2017

@schlessera schlessera changed the title from wp export --limit to Add --max_num_posts parameter to export command Sep 24, 2017

@schlessera schlessera merged commit b57e5f9 into wp-cli:master Sep 24, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@schlessera

This comment has been minimized.

Show comment
Hide comment
@schlessera

schlessera Sep 24, 2017

Member

Thanks for the pull request, @drzraf !

Member

schlessera commented Sep 24, 2017

Thanks for the pull request, @drzraf !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment