MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / get_commit

Method get_commit

github/Repository.py:2398–2409  ·  view source on GitHub ↗

:calls: `GET /repos/{owner}/{repo}/commits/{ref} `_ :param sha: string :param commit_files_per_page: int Number of files retrieved with the commit. Iterating over the files property will fetch pages of this size. Defau

(self, sha: str, *, commit_files_per_page: int | None = None)

Source from the content-addressed store, hash-verified

2396 )
2397
2398 def get_commit(self, sha: str, *, commit_files_per_page: int | None = None) -> Commit:
2399 """
2400 :calls: `GET /repos/{owner}/{repo}/commits/{ref} <https://docs.github.com/en/rest/reference/repos#commits>`_
2401 :param sha: string
2402 :param commit_files_per_page: int Number of files retrieved with the commit. Iterating over the files property will fetch pages of this size. Default is 300. Maximum is 300. At most 3000 files can be retrieved.
2403 :rtype: :class:`github.Commit.Commit`
2404 """
2405 assert isinstance(sha, str), sha
2406 # commit_files_per_page asserted in Commit(CompletableGithubObjectWithPaginatedProperty)
2407 sha = urllib.parse.quote(sha, safe="")
2408 url = f"{self.url}/commits/{sha}"
2409 return github.Commit.Commit(self._requester, url=url, per_page=commit_files_per_page)
2410
2411 def get_commits(
2412 self,

Callers 15

setUpMethod · 0.80
testAllClassesMethod · 0.80
testRepoCommitFilesMethod · 0.80
setUpMethod · 0.80
setUpMethod · 0.80
setUpMethod · 0.80
testCreateCommentMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected