Skill Improvements: - BDD Testing Skill: Enhanced step templates, debugging guides, and patterns - Gitea Client Skill: Added wiki management, issue tracking, and workflow monitoring - Product Owner Assistant: Improved user story workflow and documentation - Commit Message Skill: Better gitmoji integration and issue referencing - Changelog Manager: Enhanced change tracking and documentation - Skill Creator: Improved skill generation templates and validation - Swagger Documentation: Updated OpenAPI integration guides Key Features: - BDD best practices documentation - Gitea API client with wiki support - User story implementation workflow - Git commit message standardization - Skill development patterns - OpenAPI/Swagger documentation generation Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
59 lines
1.8 KiB
Bash
Executable File
59 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Test script for Gitea wiki functionality
|
|
|
|
set -e
|
|
|
|
# Configuration
|
|
SKILL_DIR="/Users/gabrielradureau/Work/Vibe/dance-lessons-coach/.vibe/skills/product-owner-assistant"
|
|
GITEA_API="https://gitea.arcodange.lab/api/v1"
|
|
OWNER="arcodange"
|
|
REPO="dance-lessons-coach"
|
|
|
|
# Check if token is available
|
|
if [ -z "$GITEA_API_TOKEN" ] && [ -z "$GITEA_API_TOKEN_FILE" ]; then
|
|
echo "Error: Gitea API token not configured"
|
|
echo "Set GITEA_API_TOKEN or GITEA_API_TOKEN_FILE environment variable"
|
|
exit 1
|
|
fi
|
|
|
|
# Get token
|
|
if [ -n "$GITEA_API_TOKEN_FILE" ]; then
|
|
TOKEN=$(cat "$GITEA_API_TOKEN_FILE")
|
|
else
|
|
TOKEN="$GITEA_API_TOKEN"
|
|
fi
|
|
|
|
# Test 1: List existing wiki pages
|
|
echo "=== Test 1: Listing existing wiki pages ==="
|
|
curl -s -X GET "${GITEA_API}/repos/${OWNER}/${REPO}/wiki/pages" \
|
|
-H "Authorization: token ${TOKEN}" \
|
|
-H "Accept: application/json" | jq '.'
|
|
|
|
echo ""
|
|
echo "=== Test 2: Create a test wiki page ==="
|
|
# Create test content
|
|
CONTENT="# Test Wiki Page\n\nThis is a test page created at $(date)\n\n- Test item 1\n- Test item 2\n"
|
|
CONTENT_BASE64=$(echo -n "$CONTENT" | base64)
|
|
|
|
# Create the page
|
|
curl -s -X POST "${GITEA_API}/repos/${OWNER}/${REPO}/wiki/new" \
|
|
-H "Authorization: token ${TOKEN}" \
|
|
-H "Content-Type: application/json" \
|
|
-d "{
|
|
\"title\": \"TestPage_$(date +%Y%m%d_%H%M%S)\",
|
|
\"content_base64\": \"${CONTENT_BASE64}\",
|
|
\"message\": \"Test page creation\"
|
|
}" | jq '.'
|
|
|
|
echo ""
|
|
echo "=== Test 3: Get a specific wiki page (if exists) ==="
|
|
# Try to get the home page if it exists
|
|
curl -s -X GET "${GITEA_API}/repos/${OWNER}/${REPO}/wiki/page/Home" \
|
|
-H "Authorization: token ${TOKEN}" \
|
|
-H "Accept: application/json" | jq '.' || echo "Home page not found"
|
|
|
|
echo ""
|
|
echo "=== Wiki API Test Complete ==="
|
|
echo "✅ Wiki functionality is working"
|
|
echo "📚 The Product Owner Assistant can create wiki pages for epics" |