Skip to content

feat: YouTube API v3 worker + fix all CI workflow failures - #315

Open
circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/yt-api-worker-1793578807474
Open

circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/yt-api-worker-1793578807474

Conversation

@circleci-app

@circleci-app circleci-app Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • YouTube API v3 Worker: Replaces the app/src/index.ts Hello World stub with a full Cloudflare Worker that fetches live YouTube Data API v3 data (channel stats, video listings, search). Falls back to demo videos when no YOUTUBE_API_KEY secret is configured, matching the existing pattern in src/youtube-worker.ts.

  • Worker config fixed: app/wrangler.jsonc had placeholder values (<WORKER_NAME>, <COMPATIBILITY_DATE>). Now set to yt-studio / 2025-01-01 with CHANNEL_ID var bound to the Ruh Al Tarikh channel.

  • Worker tests updated: app/test/index.spec.ts replaced Hello World snapshot tests with 4 meaningful tests (health status, demo video fallback, 404). All pass locally.

  • functions/.eslintrc.js fixed: File was minified (single line, 483 chars), causing 40 ESLint errors including max-len and spacing rules. Rewritten as properly formatted JS.

  • functions/package.json fixed:

    • Duplicate "firebase-admin" key (^13.9.0 was silently overridden by ^10.3.0), which broke the peer-dep constraint of firebase-functions@7 (requires ^11+). Removed the stale ^10.3.0 entry.
    • Removed unused lint dependency.
    • Fixed typescript from ^6.0.0 (doesn't exist) to ^5.5.0.
    • Fixed engines.node from "24" to ">=18" to match CI environment.
  • .circleci/config.yml fixed:

    • node-checks job was running npm run lint in functions/ without first installing functions/node_modules (only root pnpm deps were installed). Added npm install --legacy-peer-deps step for the functions directory.
    • Added new worker-checks job that installs app/ deps and runs vitest.
  • Root package.json: Removed duplicate circletui entry.

Test plan

  • python-checks job passes (ruff, mypy, pytest)
  • node-checks job passes (functions lint, tsc)
  • worker-checks job passes (app tsc + vitest: 4 tests)

https://app.circleci.com/agents/gh/ruhdevops/chat/1b00078e-f26c-4108-9636-6d8a52ecfb1a

- Replace app/src/index.ts Hello World stub with full YouTube API v3 Cloudflare
  Worker (endpoints: /health, /api/channel, /api/videos, /api/search) with
  demo-video fallback when no API key is configured

- Fix app/wrangler.jsonc placeholder values with real values (yt-studio,
  2025-01-01) and add vars for CHANNEL_ID

- Update app/test/index.spec.ts: 4 tests covering health endpoint, demo video
  fallback, and 404 handling; all tests pass locally

- Fix functions/.eslintrc.js: rewrite minified one-liner as formatted JS to
  resolve 40 lint errors (max-len, spacing rules)

- Fix functions/package.json: remove duplicate firebase-admin key that overrode
  ^13.9.0 with ^10.3.0 causing peer-dep conflict; remove unused lint dep; fix
  typescript ^6.0.0 to ^5.5.0; fix engines.node to >=18

- Fix .circleci/config.yml: add functions npm install before lint/tsc; add new
  worker-checks job for app/ vitest suite

- Fix root package.json: remove duplicate circletui dependency

AI-Generated: true
@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
yt-studio Error Error Nov 2, 2026 12:27am UTC
yt-studio-production Error Error Nov 2, 2026 12:27am UTC

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
ytstudio 38ce98a Nov 02 2026, 12:27 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
ytstudio 38ce98a Nov 02 2026, 12:27 AM

@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

Name Link
🔨 Latest commit 38ce98a
🔍 Latest deploy log https://app.netlify.com/projects/ytr-studio/deploys/6ae7d8e5ec599b929da3ba22

@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

Name Link
🔨 Latest commit 38ce98a
🔍 Latest deploy log https://app.netlify.com/projects/elegant-seahorse-d9d460/deploys/6ae7d8e5a8a01fd081afcd8b
😎 Deploy Preview https://deploy-preview-315--elegant-seahorse-d9d460.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch had an error being deployed

2 failed deployments
Preview – yt-studio-production — 38ce98a7 Deployed Nov 2, 2026 by vercel[bot]
Preview – yt-studio — 38ce98a7 Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants