fix: correct jq array indexing for journal branch creation
This commit is contained in:
parent
0d2ed587c1
commit
bcad5c7638
1 changed files with 1 additions and 1 deletions
|
|
@ -312,7 +312,7 @@ EOF
|
||||||
# Get the commit hash of main
|
# Get the commit hash of main
|
||||||
local main_commit
|
local main_commit
|
||||||
main_commit=$(curl -sf -H "Authorization: token ${FORGE_TOKEN}" \
|
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
|
if [ -n "$main_commit" ]; then
|
||||||
curl -sf -X POST \
|
curl -sf -X POST \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue