ghapi.repos#
- class ghapi.repos.Repository(owner: str, name: str, conn: Optional[Connection] = None)[source]#
Implements a Repository object
>>> from ghapi.repos import Repository >>> repo = Repository("frgfm", "torch-cam") >>> repo.list_pulls()
- Parameters
owner – GitHub login of the repository’s owner
name – name of the repository
conn – connection object
- list_pulls(**kwargs: Any) List[int] [source]#
List the pull requests of a repository.
- Parameters
kwargs – query parameters of GitHub API
- Returns
list of pull request numbers
- get_content(file_path: str, **kwargs: Any) Dict[str, Any] [source]#
Retrieve a file content from the repository.
- Parameters
file_path – path to the file
kwargs –
query parameters of GitHub API
- Returns
the file content payload