From bcad5c7638b95901a38d0352d9d32f2e7003fdd1 Mon Sep 17 00:00:00 2001 From: Agent Date: Wed, 1 Apr 2026 08:33:55 +0000 Subject: [PATCH] fix: correct jq array indexing for journal branch creation --- lib/branch-protection.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/branch-protection.sh b/lib/branch-protection.sh index 6c27cd9..52a9181 100644 --- a/lib/branch-protection.sh +++ b/lib/branch-protection.sh @@ -312,7 +312,7 @@ EOF # Get the commit hash of main local main_commit main_commit=$(curl -sf -H "Authorization: token ${FORGE_TOKEN}" \ - "${api_url}/git/refs/heads/${branch}" 2>/dev/null | jq -r '.object.sha' || echo "") + "${api_url}/git/refs/heads/${branch}" 2>/dev/null | jq -r '.[0].object.sha' || echo "") if [ -n "$main_commit" ]; then curl -sf -X POST \