Add disabled flag support for automation scripts (#553)

- Add 'disabled' field to AutoConfig class
- Skip disabled scripts in update-release-data.py unless force flag is used
This commit is contained in:
Marc Wrobel
2026-02-01 11:13:05 +01:00
committed by GitHub
parent b9eafb3fd7
commit 7bd6cc08fb
2 changed files with 8 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ class AutoConfig:
self.script = f"{self.method}.py"
self.url = data[self.method]
self.version_template = Template(data.get("template", DEFAULT_VERSION_TEMPLATE))
self.disabled = data.get("disabled", False)
regexes_include = data.get("regex", DEFAULT_VERSION_REGEX)
regexes_include = regexes_include if isinstance(regexes_include, list) else [regexes_include]
@@ -45,6 +46,9 @@ class AutoConfig:
logging.debug(f"{version} does not match any include or exclude patterns")
return None
def is_disabled(self) -> bool:
return self.disabled
def is_excluded(self, version: str) -> bool:
return self.first_match(version) is None