Compare commits

..

1 commit

Author SHA1 Message Date
Agent
353b3d68d5 fix: feat: lib/vault.sh — helper for agents to create vault PRs on ops repo (#75)
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline failed
2026-03-31 21:17:47 +00:00

View file

@ -158,19 +158,6 @@ before execution. See the TOML file for details."
local file_path="vault/actions/${action_id}.toml"
_vault_log "Writing ${file_path} to branch ${branch}"
# Get current file content if exists (for upload API)
local current_content=""
local file_exists
file_exists=$(curl -sf -s -o /dev/null -w "%{http_code}" \
-H "Authorization: token ${FORGE_TOKEN}" \
"${ops_api}/contents/${file_path}?ref=${branch}" 2>/dev/null || echo "0")
if [ "$file_exists" = "200" ]; then
current_content=$(curl -sf -H "Authorization: token ${FORGE_TOKEN}" \
"${ops_api}/contents/${file_path}?ref=${branch}" 2>/dev/null | \
jq -r '.content // empty')
fi
# Encode TOML content as base64
local encoded_content
encoded_content=$(printf '%s' "$toml_content" | base64 -w 0)