Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
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

‎lib/comments.js‎

Lines changed: 1 addition & 10 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /