Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.
/ pr-police Public archive

Commit

Permalink
feat: add different text when no PRs need review
Browse files Browse the repository at this point in the history
Currently when no pull requests were needing review, the message would
show the same header, mentioning that there are pull requests to be
reviewed, followed by an empy list.

This commit fixes that and adds its own message stating that there are
no pull requests waiting for review.
  • Loading branch information
rogeriopvl committed May 3, 2017
1 parent 8de6e14 commit cd0901c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ module.exports = function server () {
}

function buildMessage (data) {
if (data.length < 1) {
return Promise.resolve(
':oncoming_police_car: No pull requests are waiting for review! :tada:'
)
}

const headers = [
':police_car: The following pull requests are waiting for a review:',
'\n'
Expand Down

0 comments on commit cd0901c

Please sign in to comment.