blackducksoftware / hub-rest-api-python

HUB REST API Python bindings
Apache License 2.0
89 stars 104 forks source link

Utility/example for deleting empty project versions older than <d> days #174

Closed OffBy0x01 closed 3 years ago

OffBy0x01 commented 3 years ago

Was needing to write something like this anyway, though #173 gave me a little extra motivation :)

Note: I've not been able to fully test this script - please give it a go and let me know if everything looks right.

skiyooka commented 3 years ago

You may find https://github.com/blackducksoftware/sage/blob/master/sage_version_activity_to_csv.py interesting as it creates a .csv with one line per project version. The .csv includes all columns I can think of containing decision criteria for deletion. The intended pipeline is to run Sage, then the above script, then filter_activity.py to trim the list to the stuff one just wants to delete.