Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
fix: enabled naming the app via env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
newnewb authored and z0al committed Jul 8, 2018
1 parent 75ac164 commit c44093c
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@
*/
async function checkComments(issues,pull){
const comments = await issues.getComments(pull)
let result
//iterates over all the comments
for (comment of comments['data']){
if(comment.user.login=='commitlint[bot]'&&comment.user.type=='Bot'){ //looks for the first comment made by the bot
result = comment
break
}
}

return result
return comment = comments.data.find(comment => comment.user.login === process.env.APP_NAME + '[bot]')
}

module.exports = checkComments

0 comments on commit c44093c

Please sign in to comment.