Social: Add the reshare endpoint to the Publicize package.
Changes proposed in this Pull Request:
Like the other endpoints in the package that are used in the editor, this proxies the request to WPCOM.
Which endpoint to use is different depending on whether it's being used from WPCOM and Jetpack or Jetpack Social. This change also adds the ability to configure the endpoint URL path via the editor's initial state.
With this in place and #25993 merged, then it should be possible to reshare a post via the block editor in Jetpack Social.
Other information:
- [ ] Have you written new tests for your changes, if applicable?
- [x] Have you checked the E2E test CI results, and verified that your changes do not break them?
Jetpack product discussion
Making resharing available to all is discussed here p1HpG7-gqr-p2
Does this pull request change what data or activity we track or use?
No
Testing instructions:
- Install Jetpack Social on a test site and check out this PR
- Add the
publicize-share-limitfeature flag - Check that a published post can be reshared from the block editor
- Similarly check that resharing is still possible with the Jetpack plugin. Both with a paid plan and with the feature flag.
Thank you for your PR!
When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
- :white_check_mark: Include a description of your PR changes.
- :warning: All commits were linted before commit.
- :white_check_mark: Add a "[Status]" label (In Progress, Needs Team Review, ...).
- :white_check_mark: Add testing instructions.
- :white_check_mark: Specify whether this PR includes any changes to data or privacy.
- :white_check_mark: Add changelog entries to affected projects
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation :robot:
The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.
Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Then, add the "[Status] Needs Team review" label and ask someone from your team review the code. Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.
Jetpack plugin:
- Next scheduled release: November 1, 2022.
- Scheduled code freeze: October 25, 2022.
Social plugin:
- Next scheduled release: November 2, 2022.
- Scheduled code freeze: October 26, 2022.