Skip to content
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

Allow displaying Github reviews #5

Closed
ncalexan opened this issue Oct 17, 2018 · 5 comments
Closed

Allow displaying Github reviews #5

ncalexan opened this issue Oct 17, 2018 · 5 comments

Comments

@ncalexan
Copy link

I do some of my work in mozilla-central (which means BZ and Phab reviews) but a lot of my work in github.com/mozilla/application-services, for example (which means GH reviews). Can we generalize to a third system?

@ncalexan ncalexan changed the title Allow displaying Github reviews as well Allow displaying Github reviews Oct 17, 2018
@mikeconley
Copy link
Owner

I'm all for it.

GitHub's API documentation is here. Here's the section on Pull Requests. A quick glance doesn't show a quick and easy way of getting the list of open pull requests for a user across repositories, so we might need to first query for the repository list, and then ask each of them for an open pull request count.

It might be possible to work with the Notification API to get that information as well.

@ncalexan
Copy link
Author

This information is already present, per-user, in https://github.com/pulls/review-requested so surely we can either use the API or scrape that.

@thomcc
Copy link
Contributor

thomcc commented Oct 17, 2018

Their v4 API is GraphQL based, which IIUC allows getting this stuff without scraping, even if the REST API doesn't support it. There's even a neat tool to try queries with: https://developer.github.com/v4/explorer/

@jaredhirsch
Copy link
Contributor

Found a stackoverflow answer with the correct snippet (just need to sub in the user for 'refack'): https://stackoverflow.com/questions/48255251/how-to-query-review-requests-by-user-using-githubs-v4-graphql-api

@thomcc
Copy link
Contributor

thomcc commented Oct 17, 2018

Actually, https://developer.github.com/v3/search/#search-issues seems to work for q = 'type:pr review-requested:$username is:open'

mikeconley added a commit that referenced this issue Oct 17, 2018
Fetch and display pending github review requests. Fixes #5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants