iFixit/git-scripts — pull request #127 by xiongchiamiov (2014-06-24 22:36:25+00:00)
Title: Work with pagination

@BaseInfinity pointed out to me that we were having problems merging a
particular pull. With a bit of investigation, it turned out it wasn't just
that one - it was any pull that was fairly old. This immediately brought to
mind pagination issues, which ended up being the case.

We can't use [the documented approach to pagination][0] because Octokit is now
on version 3.2.0, and we're using [1.25.0][1]. :) So I cloned down the repo,
searched around, and did some guessing, and this approach appears to work:

Before:

[$]> ~/packages/git-scripts/bin/feature merge -n 1087
No pull request found for this branch.
Merge feature branch named: 'my-awesome-branch' ? (y/n): %

After:

[$]> ~/packages/git-scripts/bin/feature merge -n 1087
This pull request has failed to pass continuous integration tests. Merge with caution.
Merge feature branch named: 'my-awesome-branch' ? (y/n): %

[0]: https://octokit.github.io/octokit.rb/#Pagination
[1]: https://github.com/octokit/octokit.rb/releases/tag/v1.25.0

CC @soriat
CC @sctice
CC @copperwall