python - Why aren't conversation comments in a pull request being returned from PullRequest.iter_comments()? -
i using github3 python api , have piece of code:
# create new pr or existing 1 prs = [pr pr in repo.iter_pulls(state="open", base="master", head="rev_testrev2")] if len(prs) > 0: pr = prs[0] else: pr = repo.create_pull("my pull request", "master", "rev_testrev2", "this test pull request") comments = [c c in pr.iter_comments()] print str(comments) in pr, in github web page, have several comments in "conversation" tab , 1 in "files changed" tab.
the code above prints comments made in "files changed" tab, associated file changed on commit.
how list or create pr comment created in "conversation" tab?
you can't list of comments on pull request @ once if remember correctly. said, can review comments iter_comments you're doing.
it's important keep in mind far github concerned, pull requests issues little on top. comments in conversation tab, need use iter_issue_comments.
print(list(pr.iter_issue_comments()))
Comments
Post a Comment