INNER CODE UNIT · JavaScript
eachInstallation
mergeability/mergeable · scheduler/index.js:82
async function eachInstallation (callback) {
app.log.trace('Fetching installations')
const github = await app.auth()
const installations = await github.paginate(
github.apps.listInstallations.endpoint.merge({ per_page: 100 })
)
const filteredInstallations = options.filter
? installations.filter(inst => options.filter(inst))
: installations
return filteredInstallations.forEach(callback)
}
async function eachRepository (installation, callback) {
app.log.trace({ installation }, 'Fetching repositories for installation')
const github = await app.auth(installation.id)