Sonar cloud older prs and branches delete

Hi Team,

Is there a way to delete older PRs and branches on sonar cloud through programatically?or do we have any parameters to pass ?

Thanks,
Revanth

Hey there.

Short-lived branches (and pull requests) are purged after 30 days of no analysis (triggered by a new analysis of the SonarCloud project. This is documented as customisable but I think that’s not true anymore on SonarCloud (I’ll ping our docs guru)!

For any other use-cases there is, of course, the Web API. Particularly POST api/project_pull_requests/delete and POST api/project_branches/delete are probably interesting to you.