- Notifications
You must be signed in to change notification settings - Fork655
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
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…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.
klesh left a comment
There was a problem hiding this 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
append query.Set("qualifiers", "TRK")gpzma commentedAug 14, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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: |
klesh commentedAug 21, 2025
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")Simply format
| ifpage.Page==0 { | ||
| page.Page=1 | ||
| } | ||
| res,err:=apiClient.Get("projects/search", url.Values{ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"}, |
There was a problem hiding this comment.
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 commentedOct 9, 2025
Please add a proper title and a description for this PR. |
Uh oh!
There was an error while loading.Please reload this page.
…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.
pr-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