mirror of
https://github.com/zhigang1992/probot.git
synced 2026-06-16 19:51:43 +08:00
434 B
434 B
next
| next |
|---|
| docs/extensions.md |
Pagination
Many GitHub API endpoints are paginated. The github.paginate method can be used to get each page of the results.
module.exports = robot => {
robot.on('issues.opened', context => {
context.github.paginate(context.github.issues.getAll(context.repo()), res => {
res.data.issues.forEach(issue => {
robot.log('Issue: %s', issue.title)
})
})
})
}