MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / fetch

Method fetch

lib/cli/src/crewai_cli/git.py:54–71  ·  view source on GitHub ↗

Fetch latest updates from the remote.

(self)

Source from the content-addressed store, hash-verified

52 return False
53
54 def fetch(self) -> None:
55 """Fetch latest updates from the remote."""
56 command = ["git", "fetch"]
57 result = subprocess.run( # noqa: S603
58 command,
59 cwd=self.path,
60 capture_output=True,
61 text=True,
62 )
63 if result.returncode == 0:
64 return
65 if "No remote repository specified" in result.stderr:
66 return
67 details = result.stderr.strip() or result.stdout.strip() or "no output"
68 raise ValueError(
69 f"Git fetch failed with exit code {result.returncode} "
70 f"for command {command!r}: {details}"
71 )
72
73 @classmethod
74 def initialize(cls, path: str = ".") -> Repository:

Callers 5

__init__Method · 0.95
publishMethod · 0.95
loadMethod · 0.80
loadMethod · 0.80

Calls 1

runMethod · 0.45

Tested by

no test coverage detected