INNER CODE UNIT · Python
DriftResult
dotnet/sdk · .github/scripts/check_vendored_files.py:208
class DriftResult:
entry: Entry
source_index: int
source: Source
status: str # "drift", "missing", "ref_missing", "ok", "error"
current_blob_sha: str | None
current_ref_sha: str | None
detail: str
diff_text: str
def _resolve_ref_sha(repo: str, ref: str) -> str | None:
status, data = api_json(f"/repos/{repo}/commits/{urllib.parse.quote(ref, safe='/')}")
if status == 200 and isinstance(data, dict):
return data.get("sha")
return None