incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

pr-type/refactor: #8514

Open netvetra opened this issue 7 months ago • 3 comments

…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 complete ALL items in this checklist, and remove before submitting

  • [x] I have read through the Contributing Documentation.
  • [x] I have added relevant tests.
  • [x] I have added relevant documentation.
  • [x] I will add labels to the PR, such as 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

netvetra avatar Aug 06 '25 23:08 netvetra

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
}

gpzma avatar Aug 14 '25 13:08 gpzma

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

klesh avatar Aug 21 '25 07:08 klesh

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

petkostas avatar Oct 09 '25 16:10 petkostas