Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pr-type/refactor: #8514#8527

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
netvetra wants to merge11 commits intoapache:main
base:main
Choose a base branch
Loading
fromnetvetra:main
Draft

pr-type/refactor: #8514#8527

netvetra wants to merge11 commits intoapache:mainfromnetvetra:main

Conversation

@netvetra
Copy link

@netvetranetvetra commentedAug 6, 2025
edited
Loading

…ube projects list for user rights issue#8514

[Refactor][sonarqube] Can you please change API used to obtain SonarQube projects list for user rights issue#8514

Line changed: 134 only.

⚠️ Pre Checklist

Please completeALL items in this checklist, and remove before submitting

  • I have read through theContributing Documentation.
  • I have added relevant tests.
  • I have added relevant documentation.
  • I will add labels to the PR, such aspr-type/bug-fix,pr-type/feature-development, etc.

Summary

Replace /api/projects/search with /api/components/search_projects endpoint works without admin rights.

Does this close any open issues?

Closes#8514

Screenshots

N/A

Other Information

N/A

…ube projects list for user rights issueapache#8514[Refactor][sonarqube] Can you please change API used to obtain SonarQube projects list for user rights issueapache#8514Line changed: 134 only.
@dosubotdosubotbot added size:XSThis PR changes 0-9 lines, ignoring generated files. component/pluginsThis issue or PR relates to plugins pr-type/refactorThis PR refactors existing features labelsAug 6, 2025
Copy link
Contributor

@kleshklesh left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.
I think we need to add thequalifiers=TRK parameter in order for the API to return projects only according tohttps://next.sonarqube.com/sonarqube/web_api/api/components

@gpzma
Copy link

gpzma commentedAug 14, 2025
edited
Loading

Hi@klesh and@netvetra!

We are also experiencing issues with to obtain SonarQube projects' list due to not user permissions and just came across with this PR. I have seen your changes and we are waiting for this PR to be merged to deploy a new image for our Devlake application. I wanted to confirm, should not we also make the change below in remote_api.go:

if page.Page == 0 {    page.Page = 1}res, err := apiClient.Get("components/search", url.Values{    "p":          {fmt.Sprintf("%v", page.Page)},    "ps":         {fmt.Sprintf("%v", page.PageSize)},    "q":          {keyword},    "qualifiers": {"TRK"},}, nil)if err != nil {    return}
hemaprakashvothesar reacted with thumbs up emoji

klesh
klesh previously approved these changesAug 21, 2025
@klesh
Copy link
Contributor

Hi@netvetra, have these changes been tested and are they ready to be merged?

Remove a space for:  backend/plugins/sonarqube/api/blueprint_v200.go:134: File is not `gofmt`-ed with `-s` (gofmt)  query.Set("qualifiers", "TRK")
@dosubotdosubotbot added size:SThis PR changes 10-29 lines, ignoring generated files. and removed size:XSThis PR changes 0-9 lines, ignoring generated files. labelsSep 17, 2025
ifpage.Page==0 {
page.Page=1
}
res,err:=apiClient.Get("projects/search", url.Values{

Choose a reason for hiding this comment

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

Thisprojects/search call can also be changed tocomponents/search_projects to avoid admin access restrictions

klesh reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

@netvetra can you confirm this is correct?

"p": []string{fmt.Sprintf("%v",page.Page)},
"ps": []string{fmt.Sprintf("%v",page.PageSize)},
"q": []string{keyword},
"qualifiers": []string{"TRK"},
Copy link
Contributor

Choose a reason for hiding this comment

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

issue(blocking): please don't hardcode values.

@petkostas
Copy link
Contributor

Please add a proper title and a description for this PR.

@petkostaspetkostas marked this pull request as draftOctober 9, 2025 16:41
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@kleshkleshklesh left review comments

@petkostaspetkostaspetkostas requested changes

+1 more reviewer

@gnpgqgnpgqgnpgq left review comments

Reviewers whose approvals may not affect merge requirements

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

component/pluginsThis issue or PR relates to pluginspr-type/refactorThis PR refactors existing featuressize:SThis PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Refactor][sonarqube] Can you please change API used to obtain SonarQube projects list for user rights issue

5 participants

@netvetra@gpzma@klesh@petkostas@gnpgq

[8]ページ先頭

©2009-2025 Movatter.jp