[github_releases] Refactor script (#226)
Make the script more readable, mostly by: - using the Product and AutoConfig classes, - removing the use of functions when unnecessary, - a little bit of renaming and documentation.
This commit is contained in:
@@ -38,7 +38,7 @@ def update_product(product_name, configs):
|
||||
versions = {}
|
||||
|
||||
for config in configs:
|
||||
t = config.get("template", endoflife.DEFAULT_TAG_TEMPLATE)
|
||||
t = config.get("template", endoflife.DEFAULT_VERSION_TEMPLATE)
|
||||
regex = config.get("regex", endoflife.DEFAULT_VERSION_REGEX)
|
||||
regex = regex.replace("(?<", "(?P<") # convert ruby regex to python regex
|
||||
versions = versions | fetch_releases(config[METHOD], regex, t)
|
||||
|
||||
Reference in New Issue
Block a user