Support multiple allowed repos in git helper

Extend is_official_agent_zero_repo to accept multiple repository owners by replacing the single hardcoded checks with an allowed_repos list and an any() check. This change accepts URLs ending with either 'github.com/{owner}/agent-zero' or 'github.com:{owner}/agent-zero' and adds 'frdel/agent-zero' alongside the existing 'agent0ai/agent-zero'. Existing .git trimming and exception handling are preserved.

frdel committed Feb 21, 2026 at 16:44 UTC ba1c0d19c77a02bd8e0546f83ee5560d51ea4580
1 file changed +9 -1
python/helpers/git.py
+9 -1
@@ -86,7 +86,15 @@ def is_official_agent_zero_repo() -> bool:
86 if remote_url.endswith(".git"):
87 remote_url = remote_url[:-4]
88
89 - return remote_url.endswith("github.com/agent0ai/agent-zero") or remote_url.endswith("github.com:agent0ai/agent-zero")
89 + allowed_repos = [
90 + "agent0ai/agent-zero",
91 + "frdel/agent-zero",
92 + ]
93 + return any(
94 + remote_url.endswith(f"github.com/{repo_name}")
95 + or remote_url.endswith(f"github.com:{repo_name}")
96 + for repo_name in allowed_repos
97 + )
98 except Exception:
99 return False
100