INNER CODE UNIT · Python
_history_url
dotnet/sdk · .github/scripts/check_vendored_files.py:370
def _history_url(repo: str, ref: str, path: str) -> str:
return f"https://github.com/{repo}/commits/{ref}/{path}"
def _blob_url(repo: str, ref: str, path: str) -> str:
return f"https://github.com/{repo}/blob/{ref}/{path}"
def _compare_url(repo: str, old_sha: str, new_sha: str) -> str:
return f"https://github.com/{repo}/compare/{old_sha}...{new_sha}"
def _gh(args: list[str], input_data: str | None = None) -> tuple[int, str, str]:
proc = subprocess.run(
["gh", *args], input=input_data, capture_output=True, text=True, check=False,
)
return proc.returncode, proc.stdout, proc.stderr