fix(github): remove forked repo from list after deleting

This commit is contained in:
Rhys Arkins 2020-08-11 22:43:19 +02:00
parent 3e5ead7111
commit efbe610de8

View file

@ -374,6 +374,11 @@ export async function initRepo({
token: forkToken || opts.token, token: forkToken || opts.token,
}); });
logger.info('Fork deleted'); logger.info('Fork deleted');
if (is.nonEmptyArray(existingRepos)) {
existingRepos = existingRepos.filter(
(repo) => repo !== config.repository
);
}
} catch (deleteErr) { } catch (deleteErr) {
logger.warn({ err: deleteErr }, 'Could not delete fork'); logger.warn({ err: deleteErr }, 'Could not delete fork');
} }