Delete pull request analysis for wrong projectKey

hi there,

quick question … say i ran a PR scan and made the scanner deliver it to the server under a wrong - but already valid/existing - projectKey.

how would i undo that in sq server? (totally theoretically :innocent: :sweat_smile: ) (i.e. unconfuse the ppl who look at stuff under the projectKey that the PR scan was delivered to)


Hi Daniel,

Can you share how one might, theoretically, make that happen?

And in the purely hypothetical case that this did happen, I would advise analysing the ‘wrong’ project again, and just deleting the analysis of the previous …‘right’(?) project from the project history, which a project admin can do from the Activity tab.


:slight_smile: me likey. maybe i might be overthinking this :joy_cat:

i am trying to remember pre-weekend-train-of-thought :thinking: … i think i was triggering a pipeline with the wrong sonar.projectKey … and i did not find a way in the gui to delete the PR-Analysis.

Maybe, because it did not manifest inside the SQ instance? Because somewhere on the way from sq-scanner to sq-instance to display in ui it got rejected as “you are not allowed here”? hmmm … gonna dig into that.

despite that: i did the following commandline call to trigger the scanner via gradle. I assumed, that when using the wrong params.SONAR_PROJECT_KEY here, the result will be sent to wrong project.

gradle sonar
-Dsonar.pullrequest.base=$(params.SONAR_PR_BASE) -Dsonar.pullrequest.branch=$(params.SONAR_PR_BRANCH)

1 Like


Yes, sending the wrong project key from the start would indeed post the result to the wrong project.

Thanks for the details.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.