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:
@@ -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:
|
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:
|
for release in product.releases:
|
||||||
|
threshold = release.data.get("staleReleaseThresholdDays", global_threshold)
|
||||||
|
|
||||||
logging.debug(f"checking staleness of {name}:{release.name}")
|
logging.debug(f"checking staleness of {name}:{release.name}")
|
||||||
eol = release.eol()
|
eol = release.eol()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user