Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions features/site-empty.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: Empty a WordPress site of its data
And I run `wp option update uploads_use_yearmonth_folders 0`
And download:
| path | url |
| {CACHE_DIR}/large-image.jpg | http://wp-cli.org/behat-data/large-image.jpg |
| {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io/behat-data/large-image.jpg |
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.

medium

Consider using https instead of http for the asset URL. GitHub Pages supports HTTPS, which provides better security and avoids potential redirects. Additionally, the table alignment is currently broken because the new URL is longer than the previous one; while the header cannot be modified in this PR, reducing the trailing spaces helps minimize the misalignment.

      | {CACHE_DIR}/large-image.jpg | https://wp-cli.github.io/behat-data/large-image.jpg |

Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

The URL cell in this Gherkin table has trailing whitespace after large-image.jpg. Depending on how the download step parses table values, this can introduce a malformed URL or make the step harder to read/maintain. Please trim the extra spaces so the cell contains only the URL.

Suggested change
| {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io/behat-data/large-image.jpg |
| {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io/behat-data/large-image.jpg |

Copilot uses AI. Check for mistakes.
And a insert_link_data.sql file:
"""
INSERT INTO `wp_links` (`link_url`, `link_name`, `link_image`, `link_target`, `link_description`, `link_visible`, `link_owner`, `link_rating`, `link_rel`, `link_notes`, `link_rss`)
Expand Down Expand Up @@ -107,7 +107,7 @@ Feature: Empty a WordPress site of its data
And I run `wp --url=example.com/foo option update uploads_use_yearmonth_folders 0`
And download:
| path | url |
| {CACHE_DIR}/large-image.jpg | http://wp-cli.org/behat-data/large-image.jpg |
| {CACHE_DIR}/large-image.jpg | http://wp-cli.github.io/behat-data/large-image.jpg |
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.

medium

Consider using https instead of http for the asset URL. GitHub Pages supports HTTPS, which provides better security and avoids potential redirects. Additionally, the table alignment is currently broken because the new URL is longer than the previous one; while the header cannot be modified in this PR, reducing the trailing spaces helps minimize the misalignment.

      | {CACHE_DIR}/large-image.jpg | https://wp-cli.github.io/behat-data/large-image.jpg |

Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

This URL cell also includes trailing whitespace after large-image.jpg. Please trim it for consistent table formatting and to avoid any chance of the whitespace being treated as part of the URL by the download step.

Copilot uses AI. Check for mistakes.

When I run `wp --url=example.com/foo media import {CACHE_DIR}/large-image.jpg --post_id=1`
Then the wp-content/uploads/sites/2/large-image.jpg file should exist
Expand Down