From 954bcc5538adee954aa7f9974913411e935473ef Mon Sep 17 00:00:00 2001 From: Miguel Ramos Date: Mon, 22 Jul 2024 10:37:36 +0100 Subject: [PATCH] chore: fail safe to current commit id --- actions.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/actions.mjs b/actions.mjs index 393136c..61b78da 100644 --- a/actions.mjs +++ b/actions.mjs @@ -3,6 +3,7 @@ import { getChange, removeChange, getChangedPackages, + gitCurrentSha, } from "@websublime/workspace-tools"; import { inspect } from "node:util"; @@ -32,7 +33,8 @@ export function getActionInfo({ context, root, branch, repoName }) { context?.payload?.before ?? context?.payload?.pull_request?.head?.sha, commitIdAfter: context?.payload?.after ?? - context?.payload?.pull_request?.merge_commit_sha, + context?.payload?.pull_request?.merge_commit_sha ?? + gitCurrentSha(projectRoot), ref, eventName: context?.eventName, headRef,