INNER CODE UNIT · Python
get_allowed_repos
nolabs-ai/deepfabric · tools-sdk/components/github/app.py:39
def get_allowed_repos() -> set[str]:
"""Get set of allowed repositories from Spin variables."""
try:
repos_str = variables.get("allowed_repos")
if not repos_str or repos_str == "{{ allowed_repos }}":
return set() # Empty means allow all (for backwards compat)
return {r.strip().lower() for r in repos_str.split(",") if r.strip()}
except Exception:
return set()
def is_writes_allowed() -> bool:
"""Check if write operations are allowed."""
try:
allow_writes = variables.get("allow_writes")
return allow_writes.lower() == "true"
except Exception:
return False