Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add system info getter for plugin #7103

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

guqing
Copy link
Member

@guqing guqing commented Dec 2, 2024

What type of PR is this?

/kind improvement
/area core
/milestone 2.20.x

What this PR does / why we need it:

为插件提供 SystemInfoGetter 用于获取站点基本信息

站点标题描述和系统版本这些信息对于插件来说是很有必要的避免插件要直接查询 system ConfigMap 来获取,如 RSS 和 通知器扩展等插件都会需要用到

{
  "title" : "guqing's blog",
  "subtitle" : "副标题",
  "logo" : "/upload/myavatar.png",
  "favicon" : "/upload/myavatar.png",
  "url" : "http://localhost:8090",
  "version" : {
    "majorVersion" : 2,
    "minorVersion" : 20,
    "normalVersion" : "2.20.10",
    "preRelease" : true,
    "publicApiStable" : true,
    "patchVersion" : 10,
    "preReleaseVersion" : "SNAPSHOT",
    "buildMetadata" : "",
    "stable" : false
  },
  "seo" : {
    "blockSpiders" : false,
    "keywords" : "keyword1,keyword2",
    "description" : "站点描述"
  },
  "locale" : "zh_CN_#Hans",
  "timeZone" : "Asia/Shanghai",
  "activatedThemeName" : "theme-earth"
}

Does this PR introduce a user-facing change?

开发者相关:为插件提供 SystemInfoGetter 用于获取站点基本信息

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Dec 2, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.20.x milestone Dec 2, 2024
@f2c-ci-robot f2c-ci-robot bot requested a review from JohnNiang December 2, 2024 07:38
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Dec 2, 2024
@f2c-ci-robot f2c-ci-robot bot requested a review from ruibaby December 2, 2024 07:38
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 8.16327% with 45 lines in your changes missing coverage. Please review.

Project coverage is 57.19%. Comparing base (eff73dc) to head (1d6e7d4).
Report is 74 commits behind head on main.

Files with missing lines Patch % Lines
.../java/run/halo/app/infra/SystemInfoGetterImpl.java 3.22% 30 Missing ⚠️
...i/src/main/java/run/halo/app/infra/SystemInfo.java 0.00% 15 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7103      +/-   ##
============================================
+ Coverage     56.99%   57.19%   +0.19%     
- Complexity     3999     4047      +48     
============================================
  Files           714      719       +5     
  Lines         24110    24348     +238     
  Branches       1585     1598      +13     
============================================
+ Hits          13742    13925     +183     
- Misses         9756     9805      +49     
- Partials        612      618       +6     

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

@JohnNiang JohnNiang added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Dec 4, 2024
@guqing guqing force-pushed the feature/system-info branch from 2a1ffc5 to 1d6e7d4 Compare December 4, 2024 07:41
Copy link

sonarqubecloud bot commented Dec 4, 2024

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.

/lgtm

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

f2c-ci-robot bot commented Dec 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang

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 Dec 4, 2024
@f2c-ci-robot f2c-ci-robot bot merged commit ead6676 into halo-dev:main Dec 4, 2024
9 checks passed
@guqing guqing deleted the feature/system-info branch December 4, 2024 08:47
# for free to join this conversation on GitHub. Already have an account? # 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 kind/improvement Categorizes issue or PR as related to a improvement. 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.

2 participants