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

fix: change the ref parameter type in the list method of comment finder api to map #4773

Merged
merged 2 commits into from Oct 27, 2023

Conversation

Roozenlz
Copy link
Contributor

@Roozenlz Roozenlz commented Oct 26, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

在主题使用如下FinderAPI时
image
将产生如下错误
image
因为方法定义为
image
所以修改方法参数

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

修复无法正常调用评论列表 Finder API 的问题。

@f2c-ci-robot f2c-ci-robot bot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. labels Oct 26, 2023
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #4773 (3527b60) into main (e20ab8f) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               main    #4773      +/-   ##
============================================
- Coverage     61.50%   61.47%   -0.03%     
  Complexity     2798     2798              
============================================
  Files           403      403              
  Lines         14772    14779       +7     
  Branches       1029     1029              
============================================
  Hits           9086     9086              
- Misses         5193     5200       +7     
  Partials        493      493              
Files Coverage Δ
...halo/app/theme/finders/impl/CommentFinderImpl.java 9.09% <0.00%> (-15.91%) ⬇️

@JohnNiang
Copy link
Member

Hi @halo-dev/sig-halo ,这里有办法方便构建 Ref 对象来解决这个问题么?我看 SpEL 是可以直接调用类方法的,请参考:https://docs.spring.io/spring-framework/reference/core/expressions/language-ref/constructors.html

@guqing
Copy link
Member

guqing commented Oct 26, 2023

Hi @halo-dev/sig-halo ,这里有办法方便构建 Ref 对象来解决这个问题么?我看 SpEL 是可以直接调用类方法的,请参考:docs.spring.io/spring-framework/reference/core/expressions/language-ref/constructors.html

还是直接map吧,对象确实不方便,需要指定全限定名来 new,而 Ref 没有全参数构造方法

Copy link
Member

@guqing guqing 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 Oct 26, 2023
@ruibaby ruibaby changed the title fix: incorrect parameter type that caused the method not to be found when the method was called fix: change the ref parameter type in the list method of comment finder api to map Oct 27, 2023
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.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Oct 27, 2023

[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 Oct 27, 2023
@ruibaby
Copy link
Member

ruibaby commented Oct 27, 2023

/cherry-pick release-2.10

@halo-dev-bot
Copy link
Collaborator

@ruibaby: once the present PR merges, I will cherry-pick it on top of release-2.10 in a new PR and assign it to you.

In response to this:

/cherry-pick release-2.10

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ruibaby ruibaby added this to the 2.11.x milestone Oct 27, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 3905ec8 into halo-dev:main Oct 27, 2023
4 checks passed
@halo-dev-bot
Copy link
Collaborator

@ruibaby: new pull request created: #4779

In response to this:

/cherry-pick release-2.10

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Oct 27, 2023
f2c-ci-robot bot pushed a commit that referenced this pull request Oct 27, 2023
…of comment finder api to map (#4779)

This is an automated cherry-pick of #4773

/assign ruibaby

```release-note
修复无法正常调用评论列表 Finder API 的问题
```
@JohnNiang JohnNiang modified the milestones: 2.11.x, 2.11.0 Oct 31, 2023
@AirboZH
Copy link
Member

AirboZH commented Nov 28, 2023

这个修改是否需要修改文档

@guqing
Copy link
Member

guqing commented Nov 28, 2023

这个修改是否需要修改文档

不需要,这个改动恰好符合文档描述

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. kind/bug Categorizes issue or PR as related to a bug. 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.

None yet

6 participants