🔧 feat: upgrade gitea-client get-wiki command to auto-decode base64 content\n\nThe get-wiki command now automatically extracts and base64 decodes the\ncontent_base64 field from wiki page responses, providing readable content\ndirectly to users instead of showing encoded data.\n\nGenerated by Mistral Vibe.\nCo-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -410,7 +410,15 @@ cmd_get_wiki() {
|
||||
fi
|
||||
|
||||
local endpoint="/repos/$owner/$repo/wiki/page/$page_name"
|
||||
api_request "GET" "$endpoint"
|
||||
local response=$(api_request "GET" "$endpoint")
|
||||
|
||||
# Extract and decode the content_base64 field
|
||||
local content_b64=$(echo "$response" | jq -r '.content_base64')
|
||||
if [[ "$content_b64" != "null" && -n "$content_b64" ]]; then
|
||||
echo "$content_b64" | base64 --decode
|
||||
else
|
||||
echo "$response"
|
||||
fi
|
||||
}
|
||||
|
||||
# Trigger workflow
|
||||
|
||||
Reference in New Issue
Block a user