Link to problem report: https://community.sonarsource.com/t/no-housekeeping-for-pull-requests-of-main-branch/33019/8
The issue found: pull requests with a source branch on the list of sonar.dbcleaner.branchesToKeepWhenInactive end up being protected from purge. It's also not possible to undo this problem using the UI after pull request has been analysed.
- never mark PRs as protected from purge
- purge stale PRs (according to sonar.dbcleaner.daysBeforeDeletingInactiveBranchesAndPRs setting) that were already marked as protected from purge