Details
Description
Assume a user that wants to make sure that old projects are not bloating his SonarQube instance, so he wants to clean up everything where the latest analysis is older than three months. But he has some projects where short-lived branches are being actively analysed, but the master (which holds the release) isn’t analysed for a period longer than three months.
Quite reasonably, he wants his cleanup mechanism to leave these projects alone since they’re actually active.
But,
- the project management page doesn't take into account analyses on branches
- the analyzedBefore parameter to api/projects/search and api/projects/bulk_delete isn’t branch-aware: it only looks at the analysis date of the main branch.
So the following changes are done with this ticket:
- The analyzedBefore parameter for api/projects/search and api/projects/bulk_delete applies to all branches and PRs, meaning that all analysis in all branches/PRs of the projects returned were done before the date.
- The field lastAnalysisDate in the projects returned is the last analysis date across all branches and PRs of the project
- The field revision is unchanged. It's the revision of the last analysis of the main branch
Attachments
Issue Links
- is related to
-
SUPPORT-16921 Loading...
-
SUPPORT-19140 Loading...
-
SUPPORT-20645 Loading...
-
SUPPORT-21228 Loading...
-
SUPPORT-22037 Loading...
-
SUPPORT-22360 Loading...
-
SUPPORT-14848 Loading...
- links to
- relates to
-
SUPPORT-26351 Loading...
-
SUPPORT-26438 Loading...
-
SUPPORT-27006 Loading...
-
SUPPORT-30562 Loading...