From c59feefb3171bad5fa542e963d426023a8c35dae Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:32:33 +0000 Subject: [PATCH 1/5] Initial plan From 441bf16a1159f517c5857ca109c67386772c26e5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:36:08 +0000 Subject: [PATCH 2/5] Add Copilot setup workflow for automated environment provisioning Co-authored-by: TheRealSeber <111927572+TheRealSeber@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 64 +++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/copilot-setup-steps.yml diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 0000000..f6fa61c --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,64 @@ +name: "Copilot Setup Steps" + +on: + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml + +jobs: + copilot-setup-steps: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install pnpm (pinned version) + run: | + npm install -g pnpm@10.15.1 + pnpm -v + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Prepare project (sync, typecheck, lint) + # Using || true to allow Copilot to start even with minor typecheck/lint issues + run: | + pnpm run prepare + pnpm run check || true + pnpm run lint || true + + - name: Build production frontend + run: pnpm run build + + - name: Preview production build + run: | + pnpm run preview & + # Wait for server to start with retry logic + for i in {1..10}; do + if curl --fail --silent http://localhost:4173/ > /dev/null 2>&1; then + echo "Preview server is ready" + exit 0 + fi + echo "Waiting for preview server... (attempt $i/10)" + sleep 2 + done + echo "Preview server failed to start" + exit 1 + + - name: Save build artifacts (optional) + uses: actions/cache@v4 + with: + path: build + key: build-output-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} From 1050a33e0f8bb5e185e525cbc31e9a7496dbac77 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:42:15 +0000 Subject: [PATCH 3/5] Add Swagger MCP server setup and configuration Co-authored-by: TheRealSeber <111927572+TheRealSeber@users.noreply.github.com> --- .github/copilot/mcp.json | 17 +++++++++++++++++ .github/workflows/copilot-setup-steps.yml | 8 ++++++++ 2 files changed, 25 insertions(+) create mode 100644 .github/copilot/mcp.json diff --git a/.github/copilot/mcp.json b/.github/copilot/mcp.json new file mode 100644 index 0000000..2c0ea0e --- /dev/null +++ b/.github/copilot/mcp.json @@ -0,0 +1,17 @@ +{ + "mcpServers": { + "svelte": { + "type": "http", + "url": "https://mcp.svelte.dev/mcp", + "tools": ["*"] + }, + "swagger": { + "type": "stdio", + "command": "node", + "args": ["/tmp/swagger-mcp/build/index.js"], + "env": { + "SWAGGER_URL": "https://mini-maxit.github.io/backend/master/swagger.yaml" + } + } + } +} diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index f6fa61c..246e9e3 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -32,6 +32,14 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile + - name: Setup Swagger MCP server + run: | + git clone --depth 1 https://github.com/Vizioz/Swagger-MCP.git /tmp/swagger-mcp + cd /tmp/swagger-mcp + npm install + npm run build + echo "Swagger MCP server built successfully" + - name: Prepare project (sync, typecheck, lint) # Using || true to allow Copilot to start even with minor typecheck/lint issues run: | From 44d34292c1f3a265192fb4ba7cc730ebc042fafe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:47:52 +0000 Subject: [PATCH 4/5] Remove mcp.json - MCP config should be in repo settings, not file Co-authored-by: TheRealSeber <111927572+TheRealSeber@users.noreply.github.com> --- .github/copilot/mcp.json | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .github/copilot/mcp.json diff --git a/.github/copilot/mcp.json b/.github/copilot/mcp.json deleted file mode 100644 index 2c0ea0e..0000000 --- a/.github/copilot/mcp.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "mcpServers": { - "svelte": { - "type": "http", - "url": "https://mcp.svelte.dev/mcp", - "tools": ["*"] - }, - "swagger": { - "type": "stdio", - "command": "node", - "args": ["/tmp/swagger-mcp/build/index.js"], - "env": { - "SWAGGER_URL": "https://mini-maxit.github.io/backend/master/swagger.yaml" - } - } - } -} From ed38a926b2c0751cf70e3d9920fda00731e788cb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:59:05 +0000 Subject: [PATCH 5/5] Address review comments: fix step names, align Node.js version, pin Swagger-MCP commit, add preview cleanup Co-authored-by: TheRealSeber <111927572+TheRealSeber@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 246e9e3..ebeb561 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -23,20 +23,23 @@ jobs: npm install -g pnpm@10.15.1 pnpm -v - - name: Setup Node.js + - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: "pnpm" - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Setup Swagger MCP server + - name: Set up Swagger MCP server run: | - git clone --depth 1 https://github.com/Vizioz/Swagger-MCP.git /tmp/swagger-mcp + git clone https://github.com/Vizioz/Swagger-MCP.git /tmp/swagger-mcp cd /tmp/swagger-mcp + git checkout 41c28344ca09be8bc9d83fbc35b6aae75edfb762 npm install + # Create .env file required by the build script + cp .env.example .env npm run build echo "Swagger MCP server built successfully" @@ -53,16 +56,20 @@ jobs: - name: Preview production build run: | pnpm run preview & + PREVIEW_PID=$! + trap "kill $PREVIEW_PID 2>/dev/null || true" EXIT # Wait for server to start with retry logic for i in {1..10}; do if curl --fail --silent http://localhost:4173/ > /dev/null 2>&1; then echo "Preview server is ready" + kill $PREVIEW_PID 2>/dev/null || true exit 0 fi echo "Waiting for preview server... (attempt $i/10)" sleep 2 done echo "Preview server failed to start" + kill $PREVIEW_PID 2>/dev/null || true exit 1 - name: Save build artifacts (optional)