fix: dispatcher.sh: handle direct-commit low-tier vault actions (#439)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

This commit is contained in:
Agent 2026-04-08 20:15:26 +00:00
parent 16c917bdf2
commit 605fc136ae
3 changed files with 44 additions and 8 deletions

View file

@ -173,7 +173,13 @@ vault_request() {
# For low-tier actions, commit directly to ops main using FORGE_ADMIN_TOKEN
if [ "$vault_tier" = "low" ]; then
_vault_log "low-tier — committed directly to ops main"
_vault_commit_direct "$ops_api" "$tmp_toml" "${action_id}"
# Add dispatch_mode field to indicate direct commit (no PR)
local direct_toml
direct_toml=$(mktemp /tmp/vault-direct-XXXXXX.toml)
trap 'rm -f "$tmp_toml" "$direct_toml"' RETURN
# Prepend dispatch_mode = "direct" to the TOML
printf 'dispatch_mode = "direct"\n%s\n' "$toml_content" > "$direct_toml"
_vault_commit_direct "$ops_api" "$direct_toml" "${action_id}"
return 0
fi