A common question we get from students using NetBox Branching is:
How can I automatically remove stale branches from NetBox?
Therefore, I thought I’d share the latest addition to NetBox Branching, introduced in v1.1.2.
This release adds the auto_archive_days setting, allowing you to automatically archive merged branches after a specified number of days.
# configuration.py
PLUGINS_CONFIG = {
'netbox_branching': {
'auto_archive_days': 30,
}
}
A few things to note:
- A daily background job archives merged branches older than the specified number of days, helping reduce database bloat.
- Automatic archival is disabled by default.
- Once a branch has been archived, it can no longer be reverted.
