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

Sunrise: Allow setting WP-CLI context via blog_id #4788

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

mjangda
Copy link
Member

@mjangda mjangda commented Aug 16, 2023

Adds a new param --load-blog-id which allows loading blog context via a blog_id value instead of a URL.

Based on wp-cli/wp-cli#5649 (comment)

Changelog Description

WP-CLI: Add new --load-blog-id global param

We've added a new global param (--load-blog-id) to WP-CLI, which allows loading blog context via a blog_id value instead of a URL. This is helpful in cases where you have an ID but not a URL.

Pre-review checklist

Please make sure the items below have been covered before requesting a review:

  • This change works and has been tested locally (or has an appropriate fallback).
  • This change works and has been tested on a Go sandbox.
  • This change has relevant unit tests (if applicable).
  • This change uses a rollout method to ease with deployment (if applicable - especially for large scale actions that require writes).
  • This change has relevant documentation additions / updates (if applicable).
  • I've created a changelog description that aligns with the provided examples.

Pre-deploy checklist

  • VIP staff: Ensure any alerts added/updated conform to internal standards (see internal documentation).

Steps to Test

TODO

Adds a new param `--load-blog-id` which allows loading blog context via a blog_id value instead of a URL.
@GaryJones
Copy link
Contributor

I think --site-id may work better than references to "blog" - I know for VIP we have (well @yolih has) tried to standardise terminology around "site" including on multisite applications. The use of the core get_site() function already points in this direction as well.

And some customer applications aren't considered blogs, so having an interface that tries to reference it as one seems odd.

@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Attention: Patch coverage is 0% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 28.96%. Comparing base (419240e) to head (11b6500).
Report is 501 commits behind head on develop.

Files Patch % Lines
lib/sunrise/sunrise.php 0.00% 16 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #4788      +/-   ##
=============================================
+ Coverage      28.67%   28.96%   +0.28%     
- Complexity      4661     4692      +31     
=============================================
  Files            274      276       +2     
  Lines          20638    20729      +91     
=============================================
+ Hits            5918     6004      +86     
- Misses         14720    14725       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Nov 8, 2023

This pull request has been marked stale because it has been open for 60 days with no activity. If there is no activity within 7 days, it will be closed.

This is an automation to keep pull requests manageable and actionable and is not a comment on the quality of this pull request nor on the work done so far. Closed PRs are still valuable to the project and their branches are preserved.

Copy link
Contributor

This pull request has been marked stale because it has been open for 60 days with no activity. If there is no activity within 7 days, it will be closed.

This is an automation to keep pull requests manageable and actionable and is not a comment on the quality of this pull request nor on the work done so far. Closed PRs are still valuable to the project and their branches are preserved.

Copy link
Contributor

This pull request has been marked stale because it has been open for 60 days with no activity. If there is no activity within 7 days, it will be closed.

This is an automation to keep pull requests manageable and actionable and is not a comment on the quality of this pull request nor on the work done so far. Closed PRs are still valuable to the project and their branches are preserved.

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.

None yet

3 participants