Skip to content

Commit

Permalink
fix: handle "new_permissions_accepted" installation action explicitly…
Browse files Browse the repository at this point in the history
…, not as fallback
  • Loading branch information
gr2m committed Nov 17, 2020
1 parent 1e24067 commit 74428ff
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions lib/handle-installation.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,20 @@ async function handleInstallation(app, context) {
});
}

// action === new_permissions_accepted
log.info(`👌 ${account.type} ${account.login} accepted new permissions`);
if (action === "new_permissions_accepted") {
log.info(`👌 ${account.type} ${account.login} accepted new permissions`);

const options = context.github.apps.listRepos.endpoint.merge({
per_page: 100,
});
const options = context.github.apps.listRepos.endpoint.merge({
per_page: 100,
});

return resetRepositories({
app,
context,
account,
repositories: await context.github.paginate(options),
});
return resetRepositories({
app,
context,
account,
repositories: await context.github.paginate(options),
});
}

log.info(`ℹ️ installation.${action} by ${account.login}`);
}

0 comments on commit 74428ff

Please sign in to comment.