- Remove client IP removal capability (keep backend methods removed too) - Add copy-to-clipboard buttons for IP addresses with tooltip feedback - Replace OS dropdown with tile gallery (grouped, searchable, brand colors, EOL badges) in rebuild panel and checkout page - Add inline server rename with friendly name generator and RFC 1123 validation - Add traffic statistics canvas chart with responsive resize in resources panel - Add backup listing timeline in manage panel with show-all expansion - Add VNC enable/disable toggle with connection details and password copy - Add server root password reset with auto-clipboard copy (never displayed) - Add skeleton loading placeholders, action cooldowns (power 3s, rebuild 30s), progress indicator with elapsed timer - Sanitize all client-facing error messages (no raw API errors exposed) - Convert all state-mutating AJAX calls from GET to POST - Add explicit break after all output() calls in client.php - Add Redis-backed API response caching (Cache.php): OS templates 10min, traffic/backups 2min, currencies 30min, packages 10min - Add GitHub Actions workflow for weekly VirtFusion API change detection - Move cache busting step after semantic-release in publish workflow - Add endpoint doc generator script and OpenAPI baseline placeholder - Improve hostname generation entropy (bin2hex random_bytes) - Add .superpowers/ to .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
66 lines
2.7 KiB
YAML
66 lines
2.7 KiB
YAML
name: VirtFusion API Change Detection
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 9 * * 1' # Monday 9am UTC
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check-api:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
issues: write
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download current API spec
|
|
run: curl -sSL -o /tmp/openapi-current.yaml https://docs.virtfusion.com/api/openapi.yaml
|
|
|
|
- name: Compare with baseline
|
|
id: diff
|
|
run: |
|
|
if [ ! -f docs/openapi-baseline.yaml ]; then
|
|
echo "No baseline found — creating initial baseline"
|
|
cp /tmp/openapi-current.yaml docs/openapi-baseline.yaml
|
|
echo "changed=initial" >> "$GITHUB_OUTPUT"
|
|
elif ! diff -q docs/openapi-baseline.yaml /tmp/openapi-current.yaml > /dev/null 2>&1; then
|
|
echo "API spec has changed"
|
|
diff docs/openapi-baseline.yaml /tmp/openapi-current.yaml > /tmp/api-diff.txt || true
|
|
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "No changes detected"
|
|
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Create issue on change
|
|
if: steps.diff.outputs.changed == 'true'
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
const fs = require('fs');
|
|
const diff = fs.readFileSync('/tmp/api-diff.txt', 'utf8').substring(0, 60000);
|
|
await github.rest.issues.create({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
title: `VirtFusion API spec changed (${new Date().toISOString().split('T')[0]})`,
|
|
body: `The VirtFusion OpenAPI spec has been updated.\n\n<details><summary>Diff</summary>\n\n\`\`\`diff\n${diff}\n\`\`\`\n</details>\n\nReview the changes and update the module if needed.`,
|
|
labels: ['api-sync']
|
|
});
|
|
|
|
- name: Update baseline and create PR
|
|
if: steps.diff.outputs.changed == 'true' || steps.diff.outputs.changed == 'initial'
|
|
run: |
|
|
cp /tmp/openapi-current.yaml docs/openapi-baseline.yaml
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
BRANCH="api-sync/$(date +%Y-%m-%d)"
|
|
git checkout -b "$BRANCH"
|
|
git add docs/openapi-baseline.yaml
|
|
git commit -m "chore: update VirtFusion API baseline spec"
|
|
git push origin "$BRANCH"
|
|
gh pr create --title "chore: update VirtFusion API baseline" --body "Automated update of the VirtFusion OpenAPI baseline spec." --base main
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|