Improve stale release warning feature (#528)

- Use days instead of years to be aligned with the warning message,
- Allow configure a threshold per release.
This commit is contained in:
Marc Wrobel
2025-11-09 12:46:46 +01:00
committed by GitHub
parent e1fdfb3e78
commit fcd3193fe1

View File

@@ -258,9 +258,11 @@ def __raise_alert_for_unmatched_releases(name: str, output: GitHubOutput, produc
def __raise_alert_for_stale_releases(name: str, output: GitHubOutput, product: Product) -> None:
threshold = product.data.get("staleReleaseThresholdYears", 1) * 365
global_threshold = product.data.get("staleReleaseThresholdDays", 365)
for release in product.releases:
threshold = release.data.get("staleReleaseThresholdDays", global_threshold)
logging.debug(f"checking staleness of {name}:{release.name}")
eol = release.eol()