>>> create_pull_request(
...     repo_id="username/repo-name",
...     title="Hi from the huggingface_hub library!",
...     token="<insert your access token here>",
... )
DiscussionWithDetails(..., is_pull_request=True)
```  
Managing Pull Requests and Discussions can be done entirely with the [`HfApi`] class. For example:  
* [`comment_discussion`] to add comments
* [`edit_discussion_comment`] to edit comments
* [`rename_discussion`] to rename a Discussion or Pull Request