We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaa9457 commit 808d16dCopy full SHA for 808d16d
lib/comments.js
@@ -3,16 +3,7 @@
3
*/
4
async function checkComments(issues,pull){
5
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
+ return comment = comments.data.find(comment => comment.user.login === process.env.APP_NAME + '[bot]')
16
}
17
18
module.exports = checkComments
0 commit comments