Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
fix: Add review none to query to return onlu unreviewed PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
HazAT committed Sep 27, 2017
1 parent e03c28a commit 8b1d4bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ module.exports = class Reporter {
const github = await this.getGithub();
const login = user.login.toLowerCase();
const org = this.installation.account.login;
const query = `is:pr is:open review-requested:${login} org:${org}`;
// review:none returns all PRs without a review
// sadly there is a bug in github that if you commit after
// someone requested changes, the pr is still reviewed
// so it will no longer show up whenever someone already reviewed it ever
const query = `is:pr is:open review:none review-requested:${login} org:${org}`;
const request = github.search.issues({ q: query, per_page: 100 });
const pullRequests = await github.paginate(request, response => response.data.items
.filter(pr => this.isStale(pr)));
Expand Down

0 comments on commit 8b1d4bb

Please sign in to comment.