:calls: `GET /repos/{owner}/{repo}/compare/{base...:head} `_ Identical to calling :meth:`github.Comparison.Comparison.commits`, except that this uses the given ``per_page`` value. For more details, see :m
(self, *, comparison_commits_per_page: int | None = None)
| 167 | return self._total_commits.value |
| 168 | |
| 169 | def get_commits(self, *, comparison_commits_per_page: int | None = None) -> PaginatedList[Commit]: |
| 170 | """ |
| 171 | :calls: `GET /repos/{owner}/{repo}/compare/{base...:head} <https://docs.github.com/en/rest/commits/commits#compare-two-commits>`_ |
| 172 | |
| 173 | Identical to calling :meth:`github.Comparison.Comparison.commits`, except that this uses the given ``per_page`` value. |
| 174 | |
| 175 | For more details, see :meth:`github.Comparison.Comparison.commits`. |
| 176 | |
| 177 | :param comparison_commits_per_page: int Number of commits retrieved per page. |
| 178 | Iterating over the commits will fetch pages of this size. The default page size is 250, the maximum is 1000. |
| 179 | At most 10000 commits can be retrieved. |
| 180 | """ |
| 181 | return PaginatedList( |
| 182 | github.Commit.Commit, |
| 183 | self._requester, |
| 184 | self.url, |
| 185 | self._pagination_parameters_with(page=1, per_page=comparison_commits_per_page), |
| 186 | headers=None, |
| 187 | list_item="commits", |
| 188 | ) |
| 189 | |
| 190 | def _useAttributes(self, attributes: dict[str, Any]) -> None: |
| 191 | super()._useAttributes(attributes) |
no test coverage detected