forked from mirrors/probot
fix: Do not crash when suspended in v9 (#1571)
This commit is contained in:
parent
e3f6cf583b
commit
b2694d575e
|
|
@ -54,6 +54,12 @@ export = async (app: Application): Promise<void> => {
|
|||
let popular = await Promise.all(installations.map(async (installation) => {
|
||||
const { account } = installation
|
||||
|
||||
// @ts-expect-error The `suspended_by` property does not exist in this version of the types.
|
||||
if (installation.suspended_by?.login) {
|
||||
app.log.warn({ installation }, 'Installation is suspended')
|
||||
return account
|
||||
}
|
||||
|
||||
if (ignoredAccounts.includes(account.login.toLowerCase())) {
|
||||
account.stars = 0
|
||||
app.log.debug({ installation }, 'Installation is ignored')
|
||||
|
|
|
|||
Loading…
Reference in New Issue