lib/handle.js
/**
 * Iterates over all open Pull Requests and calls `execute` against each.
 *
 * @param {Context} ctx A Probot context
 * @param {object} config The App config object
 */
Iterates over all open Pull Requests and calls `execute` against each.
@param {Context} ctx A Probot context
@param {object} config The App config object
Iterates over all open Pull Requests and calls ` execute ` against each . @param { Context } ctx A Probot context @param { object } config The App config object
async function handle(ctx, config) {
  const repo = ctx.repo()
  const { github } = ctx
  return github.paginate(
    github.pullRequests.getAll({ ...repo, state: 'open', per_page: 100 }),
    async page => {
      for (const pull of page.data) {
        try {
          await execute(ctx, pull, config)
        } catch (err) {
        }
      }
    }
  )
}
async function handle ( ctx , config ) { const repo = ctx . repo ( ) const { github } = ctx return github . paginate ( github . pullRequests . getAll ( { ... repo , state : 'open' , per_page : 100 } ) , async page => { for ( const pull of page . data ) { try { await execute ( ctx , pull , config ) } catch ( err ) { } } } ) }
Iterates over all open Pull Requests and calls `execute` against each.
Iterates over all open Pull Requests and calls ` execute ` against each .
// Extract necessary info // Search for open PRs // Nothing needs to be done. Probably because of `removeLabel`.