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

Adding WordPress Package Link Generator #36

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

srtfisher
Copy link

Adds WordPress plugin/theme link generation to the package name via WordPress Packagist.

Example:

| Prod Packages                                                      | Operation | Base | Target | Link |
|--------------------------------------------------------------------|-----------|------|--------|------|
| [wpackagist-plugin/jetpack](https://wordpress.org/plugins/jetpack) | Upgraded  | 13.1 | 13.9   |      |

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.84%. Comparing base (4f10027) to head (844bd11).

Files with missing lines Patch % Lines
src/Url/WordPressGenerator.php 91.66% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##                main      #36      +/-   ##
=============================================
- Coverage     100.00%   99.84%   -0.16%     
- Complexity       216      221       +5     
=============================================
  Files             21       22       +1     
  Lines            579      650      +71     
=============================================
+ Hits             579      649      +70     
- Misses             0        1       +1     

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

@IonBazan IonBazan self-requested a review November 7, 2024 03:14
@IonBazan
Copy link
Owner

IonBazan commented Nov 7, 2024

Hi @srtfisher, thanks for your contribution! I refactored it a bit to keep the compatibility with PHP 5.3 but I noticed there is a simpler way to achieve similar goals. I'm also afraid that packages hosted elsewhere but for some reason starting with the wpackagist-plugin marker will be forced to use the same URL generator, even if hosted on github or somewhere else.
Since your solution only provides the release URL, we might as well default to the package's homepage field instead as demonstrated in #37 - feel free to check it out and let me know if that works for you.

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.

2 participants