From 100c8f9bcfd7c2e8096a7b2f8cc1b5da5227bf49 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Fri, 20 Jan 2023 00:32:02 +0100 Subject: [PATCH] CI: Add GitHub author presence check in commit linter If GitHub is unable to match a commit's author to a GitHub user, the `.author` object is set to `null` in the API's response. --- .github/workflows/lintcommits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lintcommits.yml b/.github/workflows/lintcommits.yml index ade728c8db7..f90630f1a7e 100644 --- a/.github/workflows/lintcommits.yml +++ b/.github/workflows/lintcommits.yml @@ -66,7 +66,7 @@ jobs: const errors = []; for (const { sha, commit: { message }, author } of commits) { - if (excludedBotIds.includes(author.id)) { + if (author !== null && excludedBotIds.includes(author.id)) { continue; } const commitErrors = [];