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

feat: enhance PluginFinder to support check plugin availability by version #6236

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

guqing
Copy link
Member

@guqing guqing commented Jul 1, 2024

What type of PR is this?

/kind feature
/area core
/area theme
/milestone 2.17.x

What this PR does / why we need it:

支持在主题中检查已启动的插件是否符合指定的版本要求,以便可以在某些功能可以正常工作时才渲染

示例

<p th:if="${pluginFinder.available('plugin-search-widget', '>=2.3.0')}>
<!-- do something -->
</p>

Does this PR introduce a user-facing change?

支持在主题中检查已启动的插件是否符合指定的版本要求

@f2c-ci-robot f2c-ci-robot bot added kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jul 1, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.17.x milestone Jul 1, 2024
@f2c-ci-robot f2c-ci-robot bot added area/core Issues or PRs related to the Halo Core area/theme Issues or PRs related to the Theme Provider labels Jul 1, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from LIlGG and wan92hen July 1, 2024 07:56
@guqing guqing added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Jul 1, 2024
Copy link
Member

@LIlGG LIlGG left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2024
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.20%. Comparing base (bc10336) to head (f13e6cf).
Report is 45 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6236      +/-   ##
============================================
+ Coverage     54.51%   57.20%   +2.68%     
- Complexity     3523     3722     +199     
============================================
  Files           646      648       +2     
  Lines         21862    21986     +124     
  Branches       1528     1539      +11     
============================================
+ Hits          11917    12576     +659     
+ Misses         9328     8801     -527     
+ Partials        617      609       -8     

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

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

f2c-ci-robot bot commented Jul 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LIlGG, ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2024
@f2c-ci-robot f2c-ci-robot bot merged commit 1f4bf8e into halo-dev:main Jul 1, 2024
7 checks passed
@ruibaby ruibaby modified the milestones: 2.17.x, 2.17.0 Jul 1, 2024
f2c-ci-robot bot pushed a commit to halo-dev/docs that referenced this pull request Jul 2, 2024
### What this PR does?
添加插件 Finder API 中通过插件名称和版本判断某插件是否可用的 API 的文档

see also halo-dev/halo#6236

```release-note
None
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core area/theme Issues or PRs related to the Theme Provider kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/docs Categorizes an issue or PR as relevant to SIG Docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants