INNER CODE UNIT · Python

get_repository

RockxyApp/Rockxy · .github/tools/cla_gate.py:77

    def get_repository(self) -> dict:
        status, data = self._request("GET", f"/repos/{self._repo}")
        if status != 200 or not isinstance(data, dict):
            raise RuntimeError(f"failed to fetch repository settings: HTTP {status}")
        return data

    def list_pull_commits(self, number: int) -> list[dict]:
        commits: list[dict] = []
        page = 1
        while True:
            status, data = self._request(
                "GET", f"/repos/{self._repo}/pulls/{number}/commits?per_page=100&page={page}"
            )
            if status != 200 or not isinstance(data, list):
                raise RuntimeError(f"failed to list commits for pull #{number}: HTTP {status}")
            commits.extend(data)
            if len(data) < 100:
                break

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…