INNER CODE UNIT · Python

list_pull_commits

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

    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
            page += 1
        return commits

    def set_status(self, sha: str, state: str, description: str, target_url: str | None = None) -> None:
        payload = {
            "state": state,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…