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

Commit c44093c

Browse files
newnewbz0al
authored andcommitted
fix: enabled naming the app via env variable
1 parent 75ac164 commit c44093c

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

Diff for: lib/comments.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,7 @@
33
*/
44
async function checkComments(issues,pull){
55
const comments = await issues.getComments(pull)
6-
let result
7-
//iterates over all the comments
8-
for (comment of comments['data']){
9-
if(comment.user.login=='commitlint[bot]'&&comment.user.type=='Bot'){ //looks for the first comment made by the bot
10-
result = comment
11-
break
12-
}
13-
}
14-
15-
return result
6+
return comment = comments.data.find(comment => comment.user.login === process.env.APP_NAME + '[bot]')
167
}
178

189
module.exports = checkComments

0 commit comments

Comments
 (0)