-
Notifications
You must be signed in to change notification settings - Fork 24
Conversation
lib/comments.js
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this but it has to better a better way to check for bot's comment other that it's login name.
This won't work for self-deployed instance since app names are unique.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahmed-taj What do you think about https://developer.github.com/v3/apps/#get-the-authenticated-github-app & http://octokit.github.io/rest.js/#api-Apps-get?
Hey @newnewb thank you so much for this 👌 I took a quick review and it looks good. I've and commented on some parts, though. Also, please add some tests that cover your changes. Don't hesitate to ask for help here if you feel stuck. Thanks again for contributing 🌟 |
Added comment lookup
Fixed the indentation and formatting issue caused by the mapping