alleyinteractive / wp-alleyvate

Defaults for WordPress sites by Alley.
GNU General Public License v2.0
18 stars 2 forks source link

disable Apple News pushes on non-production environments #44

Closed mogmarsh closed 2 months ago

mogmarsh commented 1 year ago

Summary

As titled.

Notes for reviewers

None.

Changelog entries

Added

Changed

Deprecated

Removed

Fixed

Security

jakewrfoster commented 10 months ago

@mogmarsh does this close #26 ?

emilyatmobtown commented 10 months ago

I'd recommend also disabling remote images when not on production. Otherwise, Apple News will trigger an error and fail the push if it tries to fetch remote images that it doesn't have access to, i.e. from local envs or protected non-production envs.

mogmarsh commented 10 months ago

@mogmarsh does this close #26 ?

it should

mogmarsh commented 10 months ago

I'd recommend also disabling remote images when not on production. Otherwise, Apple News will trigger an error and fail the push if it tries to fetch remote images that it doesn't have access to, i.e. from local envs or protected non-production envs.

this is disabling all pushes, so the image references won't matter.

emilyatmobtown commented 10 months ago

@mogmarsh Ah, right. I was thinking of scenarios in which we have test credentials on non-prod.

In that case, I'd suggest also disabling if WP_CLI is true. That will ensure that posts don't get pushed on batch updates via CLI in production.

jakewrfoster commented 2 months ago

@emilyatmobtown's input is valid, but should come in the form of a future issue and not block this one. I see preventing prod bulk CLI updates as a separate feature from blocking pushes on lower environments.

mogmarsh commented 2 months ago

@emilyatmobtown's input is valid, but should come in the form of a future issue and not block this one. I see preventing prod bulk CLI updates as a separate feature from blocking pushes on lower environments.

https://github.com/alleyinteractive/wp-bulk-task/blob/main/src/trait-bulk-task-side-effects.php also could handle this in many CLI situations if we use it.