Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / class
RepoRef
codeintel.git_source.RepoRef
PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.
PHAROS at 975a38dMIT license
Around this symbol
Search all symbolsLoading
| Symbol | File | Resolved by |
|---|---|---|
| _local_ref | git_source.py | same file |
| parse_repo_spec | git_source.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| is_github | git_source.py | same file |
| raw_url | git_source.py | same file |
| web_url | git_source.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| git_source | git_source.py | same file |
codeintel.git_source.RepoRefbackend/app/codeintel/git_source.py, lines 62–87Open source
@dataclass(frozen=True)class RepoRef: """A validated repository reference.""" #: Stable identity used as ``repositories.url``. canonical_url: str #: "github" | "git" | "local" source_type: str #: Human-readable name, e.g. "owner/repo". name: str #: https URL git clones from (remote only). clone_url: str | None = None #: Absolute path of a local repository (local only). local_path: str | None = None host: str | None = None @property def is_github(self) -> bool: return self.source_type == "github" def raw_url(self, commit: str, path: str) -> str | None: """URL serving the file's raw bytes at ``commit`` (None for local repos).""" return raw_file_url(self.canonical_url, commit, path) def web_url(self, commit: str, path: str, start: int | None, end: int | None) -> str | None: return web_file_url(self.canonical_url, commit, path, start, end)What the index recorded
- Signature
class RepoRef:- File
backend/app/codeintel/git_source.py- Lines
- 62–87
- Parser
- python-ast
- Git blob
6f88470169e4935929c5f865a974bd86da564c1a- Call sites
- 1 named, 0 resolved, 1 left unlinked
