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)

thx
Daniel

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.

 
HT(theoretically)H
:joy:
Ann

: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.projectKey=$(params.SONAR_PROJECT_KEY)
-Dsonar.pullrequest.base=$(params.SONAR_PR_BASE) -Dsonar.pullrequest.branch=$(params.SONAR_PR_BRANCH)
-Dsonar.pullrequest.key=$(params.SONAR_PR_KEY)
-Dsonar.host.url=$(params.SONAR_HOST_URL)

1 Like

Hi,

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

Thanks for the details.

 
Ann

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