Currently, we just get issues comments when looking for a LGTM string. However, GitHub's API has different types of comments:
Issues comments: these are the comments found in issues, but also in pull requests except for those attached to the unified diff, because pull requests are considered as issues.
Pull request comments: these are the comments attached to a pull request' unified diff.
Commit comments.
Getting only issues comments prevents us from finding a LGTM written in a comment attached to a PR's diff. https://github.com/joyent/sdc-vmapi/pull/8 is a good example of such a PR:
➜ sdc-vmapi git:(master) node ~/dev/git-apply-pr/apply-pr.js joyent/sdc-vmapi#8 | git am -
this PR has not been LGTMd
➜ sdc-vmapi git:(master)
The fix should be simple, as replacing github.issues.getComments by github.pullRequests.getComments fixed this specific example. I should be able to put together a PR for that soon.
Currently, we just get issues comments when looking for a LGTM string. However, GitHub's API has different types of comments:
Getting only issues comments prevents us from finding a
LGTM
written in a comment attached to a PR's diff. https://github.com/joyent/sdc-vmapi/pull/8 is a good example of such a PR:The fix should be simple, as replacing
github.issues.getComments
bygithub.pullRequests.getComments
fixed this specific example. I should be able to put together a PR for that soon.