You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "netvetra (via GitHub)" <gi...@apache.org> on 2025/08/06 23:20:14 UTC
[PR] pr-type/refactor: #8514 [incubator-devlake]
netvetra opened a new pull request, #8527:
URL: https://github.com/apache/incubator-devlake/pull/8527
…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.
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
### ⚠️ Pre Checklist
> Please complete _ALL_ items in this checklist, and remove before submitting
- [ ] I have read through the [Contributing Documentation](https://devlake.apache.org/community/).
- [ ] I have added relevant tests.
- [ ] I have added relevant documentation.
- [ ] I will add labels to the PR, such as `pr-type/bug-fix`, `pr-type/feature-development`, etc.
<!--
Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes.
Please fill out as many sections below as possible.
-->
### 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pr-type/refactor: #8514 [incubator-devlake]
Posted by "petkostas (via GitHub)" <gi...@apache.org>.
petkostas commented on code in PR #8527:
URL: https://github.com/apache/incubator-devlake/pull/8527#discussion_r2417347470
##########
backend/plugins/sonarqube/api/remote_api.go:
##########
@@ -49,9 +49,10 @@ func querySonarqubeProjects(
page.Page = 1
}
res, err := apiClient.Get("projects/search", url.Values{
- "p": {fmt.Sprintf("%v", page.Page)},
- "ps": {fmt.Sprintf("%v", page.PageSize)},
- "q": {keyword},
+ "p": []string{fmt.Sprintf("%v", page.Page)},
+ "ps": []string{fmt.Sprintf("%v", page.PageSize)},
+ "q": []string{keyword},
+ "qualifiers": []string{"TRK"},
Review Comment:
issue(blocking): please don't hardcode values.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pr-type/refactor: #8514 [incubator-devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8527:
URL: https://github.com/apache/incubator-devlake/pull/8527#issuecomment-3900291792
This pull request has been closed because it has not had recent activity. You could reopen it if you try to continue your work, and anyone who are interested in it are encouraged to continue work on this pull request.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pr-type/refactor: #8514 [incubator-devlake]
Posted by "gnpgq (via GitHub)" <gi...@apache.org>.
gnpgq commented on code in PR #8527:
URL: https://github.com/apache/incubator-devlake/pull/8527#discussion_r2398222938
##########
backend/plugins/sonarqube/api/remote_api.go:
##########
@@ -49,9 +49,10 @@ func querySonarqubeProjects(
page.Page = 1
}
res, err := apiClient.Get("projects/search", url.Values{
Review Comment:
This `projects/search` call can also be changed to `components/search_projects` to avoid admin access restrictions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pr-type/refactor: #8514 [incubator-devlake]
Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on code in PR #8527:
URL: https://github.com/apache/incubator-devlake/pull/8527#discussion_r2415491095
##########
backend/plugins/sonarqube/api/remote_api.go:
##########
@@ -49,9 +49,10 @@ func querySonarqubeProjects(
page.Page = 1
}
res, err := apiClient.Get("projects/search", url.Values{
Review Comment:
@netvetra can you confirm this is correct?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pr-type/refactor: #8514 [incubator-devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #8527: pr-type/refactor: #8514
URL: https://github.com/apache/incubator-devlake/pull/8527
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pr-type/refactor: #8514 [incubator-devlake]
Posted by "petkostas (via GitHub)" <gi...@apache.org>.
petkostas commented on PR #8527:
URL: https://github.com/apache/incubator-devlake/pull/8527#issuecomment-3386645791
Please add a proper title and a description for this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pr-type/refactor: #8514 [incubator-devlake]
Posted by "gpzma (via GitHub)" <gi...@apache.org>.
gpzma commented on PR #8527:
URL: https://github.com/apache/incubator-devlake/pull/8527#issuecomment-3188422814
Hi @klesh!
We are also experiencing issues with to obtain SonarQube projects' list due to not user permissions. 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
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pr-type/refactor: #8514 [incubator-devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8527:
URL: https://github.com/apache/incubator-devlake/pull/8527#issuecomment-3863142499
This pull request has been automatically marked as stale because it has not had recent activity for 120 days. It will be closed in 7 days if no further activity occurs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pr-type/refactor: #8514 [incubator-devlake]
Posted by "petkostas (via GitHub)" <gi...@apache.org>.
petkostas commented on PR #8527:
URL: https://github.com/apache/incubator-devlake/pull/8527#issuecomment-3386636279
> 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
> }
> ```
Please don't hardcode values like that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] pr-type/refactor: #8514 [incubator-devlake]
Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on PR #8527:
URL: https://github.com/apache/incubator-devlake/pull/8527#issuecomment-3209344861
Hi @netvetra, have these changes been tested and are they ready to be merged?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org