(self, shared)
| 21 | |
| 22 | class FetchRepo(Node): |
| 23 | def prep(self, shared): |
| 24 | repo_url = shared.get("repo_url") |
| 25 | local_dir = shared.get("local_dir") |
| 26 | project_name = shared.get("project_name") |
| 27 | |
| 28 | if not project_name: |
| 29 | # Basic name derivation from URL or directory |
| 30 | if repo_url: |
| 31 | project_name = repo_url.split("/")[-1].replace(".git", "") |
| 32 | else: |
| 33 | project_name = os.path.basename(os.path.abspath(local_dir)) |
| 34 | shared["project_name"] = project_name |
| 35 | |
| 36 | # Get file patterns directly from shared |
| 37 | include_patterns = shared["include_patterns"] |
| 38 | exclude_patterns = shared["exclude_patterns"] |
| 39 | max_file_size = shared["max_file_size"] |
| 40 | |
| 41 | return { |
| 42 | "repo_url": repo_url, |
| 43 | "local_dir": local_dir, |
| 44 | "token": shared.get("github_token"), |
| 45 | "include_patterns": include_patterns, |
| 46 | "exclude_patterns": exclude_patterns, |
| 47 | "max_file_size": max_file_size, |
| 48 | "use_relative_paths": True, |
| 49 | } |
| 50 | |
| 51 | def exec(self, prep_res): |
| 52 | if prep_res["repo_url"]: |
nothing calls this directly
no outgoing calls
no test coverage detected