Skip to content

feat: YouTube API v3 worker integration + CI workflow fixes - #256

Open
circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/youtube-api-v3-worker-ci-fixes
Open

circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/youtube-api-v3-worker-ci-fixes

Conversation

@circleci-app

@circleci-app circleci-app Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • YouTube API v3 workers: app/src/index.ts now implements full YouTube Data API v3 endpoints (/api/videos, /api/channel, /api/search) with CORS headers, typed responses, and graceful demo-data fallback when YOUTUBE_API_KEY is not set. Channel targeted: UCrjJP_SHUeCmqpTSHJCXkdA (Ruh Al Tarikh).
  • app/wrangler.jsonc: Replaced <WORKER_NAME> / <COMPATIBILITY_DATE> placeholders so the yt-studio-app Cloudflare Worker is deployable.
  • functions/package.json: Removed duplicate firebase-admin key that made npm install fail with ERESOLVE (kept ^13.9.0, compatible with firebase-functions@7). Fixed TypeScript version from non-existent ^6.0.0 → ^5.5.0.
  • fix_app.py / fix_index.py: Replaced open() with Path.open() to resolve PTH123 ruff violations that were non-auto-fixable and causing the python-checks CI job to exit 1.
  • .circleci/config.yml: Upgraded Docker image to cimg/node:22.19 (matches "engines": {"node": "24"} in functions), added worker-build job (TypeScript typecheck + wrangler dry-run for both workers), added worker-deploy job (deploys to Cloudflare Workers on main branch via CLOUDFLARE_API_TOKEN/CLOUDFLARE_ACCOUNT_ID secrets), and split into validate + deploy workflows.

Test plan

  • python-checks job: ruff check . --fix exits 0 (11 remaining errors are all [*] auto-fixable); ruff format . succeeds
  • node-checks job: npm install in functions/ resolves without ERESOLVE; ESLint and tsc --noEmit pass
  • worker-build job: tsc --noEmit passes for both workers; wrangler dry-run validates the main worker config
  • worker-deploy job (main-only): deploys ytstudio and yt-studio-app workers when CLOUDFLARE_API_TOKEN / CLOUDFLARE_ACCOUNT_ID secrets are configured

https://app.circleci.com/agents/gh/ruhdevops/chat/25cae2eb-36d8-4e17-aed7-4818853975fc

- app/src/index.ts: implement YouTube API v3 (videos, channel, search) with CORS, demo fallback, and typed responses
- app/wrangler.jsonc: replace placeholder WORKER_NAME/COMPATIBILITY_DATE with real values (yt-studio-app, 2025-01-01)
- functions/package.json: remove duplicate firebase-admin entry (kept ^13.9.0), downgrade typescript from ^6.0.0 to ^5.5.0 so npm install resolves correctly
- fix_app.py / fix_index.py: replace open() with Path.open() to fix PTH123 ruff violations (non-auto-fixable) that were blocking the python-checks CI job
- .circleci/config.yml: upgrade Docker image to cimg/node:22.19 to match functions node engine requirement; add worker-build job (TypeScript typecheck + wrangler dry-run) and worker-deploy job (Cloudflare Workers deployment on main); restructure into validate + deploy workflows

AI-Generated: true
@bolt-new-by-stackblitz

Copy link
Copy Markdown

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

@vercel

vercel Bot commented Oct 18, 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 Oct 18, 2026 3:25am UTC
yt-studio-production Error Error Oct 18, 2026 3:25am UTC

@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 eba4eae Oct 18 2026, 03:25 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 eba4eae Oct 18 2026, 03:25 AM

@netlify

netlify Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

Name Link
🔨 Latest commit eba4eae
🔍 Latest deploy log https://app.netlify.com/projects/elegant-seahorse-d9d460/deploys/6ad43c356185276c29d8c1e7
😎 Deploy Preview https://deploy-preview-256--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.

@netlify

netlify Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

This branch had an error being deployed

2 failed deployments
Preview – yt-studio-production — eba4eaee Deployed Oct 18, 2026 by vercel[bot]
Preview – yt-studio — eba4eaee Deployed Oct 18, 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