MCPcopy Index your code
hub / github.com/github/copilot-sdk / PushAttachmentGitHubSide

Class PushAttachmentGitHubSide

python/copilot/generated/rpc.py:14125–14170  ·  view source on GitHub ↗

File location on the base side of the diff. Absent for additions. One side of a file diff (head or base) File location on the head side of the diff. Absent for deletions. Base side of the comparison One side of a tree comparison (head or base) Head side of the comparison

Source from the content-addressed store, hash-verified

14123
14124@dataclass
14125class PushAttachmentGitHubSide:
14126 """File location on the base side of the diff. Absent for additions.
14127
14128 One side of a file diff (head or base)
14129
14130 File location on the head side of the diff. Absent for deletions.
14131
14132 Base side of the comparison
14133
14134 One side of a tree comparison (head or base)
14135
14136 Head side of the comparison
14137 """
14138 repo: PushGitHubRepoRef
14139 """Repository the file lives in
14140
14141 Repository the revision belongs to
14142 """
14143 path: str | None = None
14144 """Repository-relative path to the file"""
14145
14146 ref: str | None = None
14147 """Git ref (branch, tag, or commit SHA) the file is read at"""
14148
14149 revision: str | None = None
14150 """Git revision (branch, tag, or commit SHA)"""
14151
14152 @staticmethod
14153 def from_dict(obj: Any) -> 'PushAttachmentGitHubSide':
14154 assert isinstance(obj, dict)
14155 repo = PushGitHubRepoRef.from_dict(obj.get("repo"))
14156 path = from_union([from_str, from_none], obj.get("path"))
14157 ref = from_union([from_str, from_none], obj.get("ref"))
14158 revision = from_union([from_str, from_none], obj.get("revision"))
14159 return PushAttachmentGitHubSide(repo, path, ref, revision)
14160
14161 def to_dict(self) -> dict:
14162 result: dict = {}
14163 result["repo"] = to_class(PushGitHubRepoRef, self.repo)
14164 if self.path is not None:
14165 result["path"] = from_union([from_str, from_none], self.path)
14166 if self.ref is not None:
14167 result["ref"] = from_union([from_str, from_none], self.ref)
14168 if self.revision is not None:
14169 result["revision"] = from_union([from_str, from_none], self.revision)
14170 return result
14171
14172# Experimental: this type is part of an experimental API and may change or be removed.
14173@dataclass

Callers 1

from_dictMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…