New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I obtain details from a Pull Request? #2204
Comments
this is my code. repo = g.get_repo("xxx/xxxx")
for i in repo.get_pulls():
pprint(i)
pprint(i.body)
pprint(i.comments) but it can't get comments body. |
You can access the comments with get_comments() (https://pygithub.readthedocs.io/en/latest/github_objects/PullRequest.html#github.PullRequest.PullRequest.get_comments) for review comments and get_issue_comments() for all other comments (https://pygithub.readthedocs.io/en/latest/github_objects/PullRequest.html#github.PullRequest.PullRequest.get_issue_comments) Example with your code: # inside loop, i is your PullRequest object
for comment in i.get_issue_comments():
print(comment.body)
for review_comment in i.get_comments():
print(review_comment.body) |
It works. In fact, the results of |
How do I obtain details from a Pull Request?
such as
comments
.The text was updated successfully, but these errors were encountered: