diff --git a/dist/index.js b/dist/index.js index 4c5ab3f..8f428b8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14701,8 +14701,8 @@ async function getPrFilesWithBlobSize(pullRequestNumber) { }) : data; const prFilesWithBlobSize = await Promise.all(files - // Cannot get blobs for files without sha (e.g. happens when only changing a permission bit on the file) - .filter(file => file.sha != null) + // Cannot get blobs for files without sha (e.g. happens when only changing a permission bit on the file) or without blob_url (e.g. submodules) + .filter(file => file.sha != null && file.blob_url != null) .map(async (file) => { const { filename, sha, patch } = file; const { data: blob } = await octokit.rest.git.getBlob({ diff --git a/src/index.ts b/src/index.ts index a3bad0e..9894510 100644 --- a/src/index.ts +++ b/src/index.ts @@ -199,8 +199,8 @@ async function getPrFilesWithBlobSize(pullRequestNumber: number) { const prFilesWithBlobSize = await Promise.all( files - // Cannot get blobs for files without sha (e.g. happens when only changing a permission bit on the file) - .filter(file => file.sha != null) + // Cannot get blobs for files without sha (e.g. happens when only changing a permission bit on the file) or without blob_url (e.g. submodules) + .filter(file => file.sha != null && file.blob_url != null) .map(async file => { const {filename, sha, patch} = file; const {data: blob} = await octokit.rest.git.getBlob({