Michael Dorner
Michael Dorner

Reputation: 20135

List all participants in a GitHub issue

How can I list all active participants (commenters, reviewers, including reactions) in a GitHub pull request?

So far I do

GET /repos/{owner}/{repo}/issues/{issue_number}/comments
GET /repos/{owner}/{repo}/pulls/{issue_number}/comments
GET /repos/{owner}/{repo}/issues/{issue_number}/events
GET /repos/{owner}/{repo}/pulls/{issue_number}/reviews

and for the reactions on issues and pulls reactions

GET /repos/{owner}/{repo}/issues/{issue_comment_number}/reactions
GET /repos/{owner}/{repo}/pulls/{pull_comment_number}/reactions

for all pull requests needed.

Is there a faster/efficient way?

Upvotes: 4

Views: 387

Answers (1)

Bruno Lobo
Bruno Lobo

Reputation: 252

It is a partial answer. It may satisfy you somehow:

  1. Get HTML content with HTTP request GET /repos/{owner}/{repo}/pulls/{issue_number}
  2. Flush it to a file, namely issue_html.txt;
  3. Open the file;
  4. Search for the keyword "partial-users-participants".

There are 20 participants.

Upvotes: 0

Related Questions