You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.
We are experiencing issues with bitbucket cloud integration when analyzing Pull Requests from a forked repo into the main repo. Is there any way to configure the accountName for the source and target independently?
I tried to include only the relevant info in the log. Let me know if any other info is needed to provide a solution.
Actual Behavior
Assume we have a main repo called upstream and a fork called origin.
Running the sonar-runner with account name origin and PR 7375 results in the following error. > sonar-runner -Dsonar.bitbucket.accountName=origin -Dsonar.bitbucket.pullRequestId=7375 -Dsonar.analysis.mode=issues...
18:53:50.746 DEBUG - Post-jobs : Sonar Plug-in for Bitbucket Cloud (wrapped)
18:53:50.746 INFO - Executing post-job Sonar Plug-in for Bitbucket Cloud (wrapped)
18:53:50.899 INFO - [sonar4bitbucket] Pull request with id '7375' not found. No analysis will be performed.
This makes sense since the PR is listed in the upsteam repo.
Running the sonar-runner with account name upstream and PR 7375 results in the following error. > sonar-runner -Dsonar.bitbucket.accountName=upstream -Dsonar.bitbucket.pullRequestId=7375 -Dsonar.analysis.mode=issues ...
18:56:04.369 DEBUG - Post-jobs : Sonar Plug-in for Bitbucket Cloud (wrapped)
18:56:04.369 INFO - Executing post-job Sonar Plug-in for Bitbucket Cloud (wrapped)
18:56:04.652 INFO - [sonar4bitbucket] Plug-in is active and will analyze pull request with #7375...
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 47.238s
Final Memory: 31M/1139M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: POST https://bitbucket.org/api/2.0/repositories/upstream/****/commit/fabac8a20182/statuses/build returned a response status of 404 Not Found
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
This also makes sense since the commit of the PR is not yet merged into upstream. Is there any way to configure the accountName for the source and target independently?
Plug-in version, SonarQube version, CI system, build type
Sonarqube 5.6
Bitbucket for Sonar 1.2.0
The text was updated successfully, but these errors were encountered:
Looking at the code it calls bitbucket to get the pullrequest details. I see that the source branch is also returned, so instead of composing the commit url it could be retrieved from the PR response.
Expected Behavior
We are experiencing issues with bitbucket cloud integration when analyzing Pull Requests from a forked repo into the main repo. Is there any way to configure the accountName for the source and target independently?
I tried to include only the relevant info in the log. Let me know if any other info is needed to provide a solution.
Actual Behavior
Assume we have a main repo called upstream and a fork called origin.
Running the sonar-runner with account name origin and PR 7375 results in the following error.
> sonar-runner -Dsonar.bitbucket.accountName=origin -Dsonar.bitbucket.pullRequestId=7375 -Dsonar.analysis.mode=issues...
This makes sense since the PR is listed in the upsteam repo.
Running the sonar-runner with account name upstream and PR 7375 results in the following error.
> sonar-runner -Dsonar.bitbucket.accountName=upstream -Dsonar.bitbucket.pullRequestId=7375 -Dsonar.analysis.mode=issues ...
This also makes sense since the commit of the PR is not yet merged into upstream. Is there any way to configure the accountName for the source and target independently?
Plug-in version, SonarQube version, CI system, build type
Sonarqube 5.6
Bitbucket for Sonar 1.2.0
The text was updated successfully, but these errors were encountered: