From 915cebf5be38322c3af1b2297ca0656052857275 Mon Sep 17 00:00:00 2001 From: calilkhalil Date: Fri, 2 Jan 2026 14:35:10 -0800 Subject: [PATCH 1/2] fix(habits): add null check for commit author property Fixes TypeError when GitHub API returns commits without author data. Some events (from bots, deleted users, or malformed API responses) don't have the author property defined, causing the destructuring to fail with 'Cannot destructure property author of undefined'. --- source/plugins/habits/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugins/habits/index.mjs b/source/plugins/habits/index.mjs index 3a1a437d602..3c5801a3d74 100644 --- a/source/plugins/habits/index.mjs +++ b/source/plugins/habits/index.mjs @@ -48,7 +48,7 @@ export default async function({login, data, rest, imports, q, account}, {enabled ...await Promise.allSettled( commits .flatMap(({payload}) => payload.commits) - .filter(({author}) => data.shared["commits.authoring"].filter(authoring => author?.login?.toLocaleLowerCase().includes(authoring) || author?.email?.toLocaleLowerCase().includes(authoring) || author?.name?.toLocaleLowerCase().includes(authoring)).length) + .filter(commit => commit?.author && data.shared["commits.authoring"].filter(authoring => commit.author?.login?.toLocaleLowerCase().includes(authoring) || commit.author?.email?.toLocaleLowerCase().includes(authoring) || commit.author?.name?.toLocaleLowerCase().includes(authoring)).length) .map(async commit => (await rest.request(commit)).data.files), ), ] From ad8c55e705eea48fdc69cad50a0c9260fcd29a84 Mon Sep 17 00:00:00 2001 From: calilkhalil Date: Fri, 2 Jan 2026 14:38:18 -0800 Subject: [PATCH 2/2] fix(docker): add xz-utils and libxml2-dev for nokogiri compilation --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3ff5209a48a..2e20d47054c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN chmod +x /metrics/source/app/action/index.mjs \ && apt-get install -y curl unzip \ && curl -fsSL https://deno.land/x/install/install.sh | DENO_INSTALL=/usr/local sh \ # Install ruby to support github licensed gem - && apt-get install -y ruby-full git g++ cmake pkg-config libssl-dev \ + && apt-get install -y ruby-full git g++ cmake pkg-config libssl-dev xz-utils libxml2-dev libxslt-dev \ && gem install licensed \ # Install python for node-gyp && apt-get install -y python3 \