python - How to create an issue comment on a pull request? -


according this question pr issue things on top.

how associated issue id?

i saw issue_url attribute pull request object. also, pr has method create_review_comment no method create_issue_comment.

how such method like?

how create issue comment in pull request?

i able getting issue pr number. indeed, in github "hidden" issue created every time create pull request.

so following code worked:

gh = ... # connection repo = gh.repository(user, repo_name) pr = repo.create_pull(description, base, from_branch, detailed) issue = repo.issue(pr.number) issue.create_comment(comment) 

one use other ways issue pr number.

not sure if there way more straightforward this


Comments