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: add the ability to install plugins remotely via URI #3963

Merged
merged 10 commits into from May 26, 2023

Conversation

guqing
Copy link
Member

@guqing guqing commented May 17, 2023

What type of PR is this?

/kind feature
/area core
/area console
/milestone 2.6.x
/kind api-change

What this PR does / why we need it:

支持通过 URI 远程安装和升级插件

how to test it?

  1. 测试插件安装
curl -u admin:admin -X POST http://localhost:8090/apis/api.console.halo.run/v1alpha1/plugins/-/install-from-uri --data '{
  "uri": "https://halo.run/apis/api.store.halo.run/v1alpha1/applications/app-KhIVw/releases/app-release-canxF/download/app-release-canxF-znFre"
}'
  1. 测试插件升级
curl -u admin:admin -X POST http://localhost:8090/apis/api.console.halo.run/v1alpha1/plugins/PluginFeed/upgrade-from-uri --data '{
  "uri": "https://halo.run/apis/api.store.halo.run/v1alpha1/applications/app-KhIVw/releases/app-release-canxF/download/app-release-canxF-znFre"
}'

Which issue(s) this PR fixes:

Fixes #2292

Does this PR introduce a user-facing change?

支持通过 URI 远程安装和升级插件

@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 May 17, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.6.x milestone May 17, 2023
@f2c-ci-robot f2c-ci-robot bot added area/core Issues or PRs related to the Halo Core area/console Issues or PRs related to the Halo Console kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels May 17, 2023
@f2c-ci-robot f2c-ci-robot bot requested review from LIlGG and ruibaby May 17, 2023 09:49
@guqing
Copy link
Member Author

guqing commented May 17, 2023

/hold

@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 17, 2023
Signed-off-by: Ryan Wang <i@ryanc.cc>
@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Merging #3963 (cf3331d) into main (533f0cf) will decrease coverage by 0.25%.
The diff coverage is 57.07%.

@@             Coverage Diff              @@
##               main    #3963      +/-   ##
============================================
- Coverage     60.52%   60.28%   -0.25%     
- Complexity     2342     2362      +20     
============================================
  Files           353      356       +3     
  Lines         12106    12279     +173     
  Branches        881      889       +8     
============================================
+ Hits           7327     7402      +75     
- Misses         4347     4437      +90     
- Partials        432      440       +8     
Impacted Files Coverage Δ
...pp/theme/dialect/ContentTemplateHeadProcessor.java 82.35% <ø> (ø)
...app/theme/dialect/TemplateGlobalHeadProcessor.java 94.44% <ø> (ø)
...ain/java/run/halo/app/theme/router/ModelConst.java 100.00% <ø> (ø)
...pp/theme/router/factories/ArchiveRouteFactory.java 74.28% <ø> (ø)
...heme/router/factories/AuthorPostsRouteFactory.java 82.60% <ø> (ø)
...theme/router/factories/CategoriesRouteFactory.java 100.00% <ø> (ø)
...eme/router/factories/CategoryPostRouteFactory.java 15.62% <ø> (ø)
.../app/theme/router/factories/IndexRouteFactory.java 100.00% <ø> (ø)
.../halo/app/theme/router/factories/RouteFactory.java 100.00% <ø> (ø)
...o/app/theme/router/factories/TagsRouteFactory.java 62.50% <ø> (ø)
... and 9 more

... and 11 files with indirect coverage changes

@guqing
Copy link
Member Author

guqing commented May 19, 2023

/unhold

@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 19, 2023
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.

/approve

@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 May 19, 2023
@guqing guqing requested a review from JohnNiang May 25, 2023 13:41
@guqing guqing requested a review from JohnNiang May 26, 2023 03:16
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

/approve

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

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label May 26, 2023
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented May 26, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, 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 merged commit 710261b into halo-dev:main May 26, 2023
4 checks passed
@ruibaby ruibaby modified the milestones: 2.6.x, 2.6.0 May 26, 2023
@guqing guqing deleted the feature/2292 branch May 26, 2023 15:23
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/console Issues or PRs related to the Halo Console area/core Issues or PRs related to the Halo Core kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

完善插件安装功能
3 participants