joyent / git-apply-pr

Validate GitHub PullRequests and add metadata
MIT License
8 stars 4 forks source link

Get pull request review comments, not just issues comments #10

Closed misterdjules closed 8 years ago

misterdjules commented 9 years ago

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:

➜  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.