8000 Do not throw error when no reviewer found · TailorDev/assignees@915239d · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit

Permalink
Do not throw error when no reviewer found
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Feb 21, 2017
1 parent 7cd57ac commit 915239d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions tasks/findReviewers.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,9 @@ exports.configure = config => async (repositoryId, number, author, logger) => {
.then(take(repository.max_reviewers))
// create review request
.then((selected) => {
if (selected.length === 0) {
throw createHttpError(422, 'aborted', 'no reviewers found');
}

logSelectReviewers(logger, repository, number, selected);

if (config.createReviewRequest === false) {
if (selected.length === 0 || config. 8000 createReviewRequest === false) {
return Promise.resolve();
}

Expand Down
2 changes: 1 addition & 1 deletion test/tasks/findReviewers.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('tasks/findReviewers', () => {
expect(reviewers).to.deep.equal({});
});

it('should does not return any reviewer when no collaborators', () => {
it('should not return any reviewer when no collaborators', () => {
const reviewers = getPotentialReviewers({ boo: 23, baz: 1 }, {});

expect(reviewers).to.deep.equal({});
Expand Down

0 comments on commit 915239d

Please sign in to comment.
0