chore(tooling): exclude legacy engine from pyright and narrow gitops target type

- Add scripts/appctl_engine.py to pyproject.toml [tool.pyright] exclude list
- Add assert target_dir is not None guard in gitops_dispatcher after webhook admission
This commit is contained in:
kiskaadee committed 2026-10-07 07:15:31 -05:00
1 parent aca5a71bca
commit 964e633da2
2 files changed
+4

No files matched your search

+3
View File
@@ -1,2 +1,5 @@
[tool.pyright] [tool.pyright]
extraPaths = ["scripts"] extraPaths = ["scripts"]
exclude = [
"scripts/appctl_engine.py",
]
+1
View File
@@ -722,6 +722,7 @@ def main():
sys.exit(0 if "Branch mismatch" in reason else 1) sys.exit(0 if "Branch mismatch" in reason else 1)
logger.info(f"✅ Webhook admission passed: {reason}") logger.info(f"✅ Webhook admission passed: {reason}")
assert target_dir is not None, "admitted deployment must have a valid target directory"
commit_sha = payload.get("after", "") commit_sha = payload.get("after", "")
if not commit_sha and isinstance(payload.get("head_commit"), dict): if not commit_sha and isinstance(payload.get("head_commit"), dict):
commit_sha = payload.get("head_commit", {}).get("id", "") commit_sha = payload.get("head_commit", {}).get("id", "")