diff --git a/src/build-images-handler.ts b/src/build-images-handler.ts index a81d53c..83d82e2 100644 --- a/src/build-images-handler.ts +++ b/src/build-images-handler.ts @@ -36,7 +36,8 @@ export async function shouldUpdateFiles(octokit: Octokit, oid: string) { export async function getPreviousOid(payload: RegistryPackagePublishedEvent) { const { registry_package, organization } = payload; - const { target_oid, name } = registry_package.package_version; + const { target_oid } = registry_package.package_version; + const { name } = registry_package; try { const octokit = await getOctokit(); diff --git a/src/utils/octokit.ts b/src/utils/octokit.ts index 23298f6..d096905 100644 --- a/src/utils/octokit.ts +++ b/src/utils/octokit.ts @@ -1,5 +1,5 @@ import { Octokit as GitHub } from '@octokit/rest'; -import { createAppAuth, InstallationAccessTokenAuthentication } from '@octokit/auth-app'; +import { createAppAuth } from '@octokit/auth-app'; let octokit: GitHub;