Skip to content

feat: add YouTube API v3 worker deployment + fix CI workflow failures - #425

Open
circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/changes-1796354392586
Open

circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/changes-1796354392586

Conversation

@circleci-app

@circleci-app circleci-app Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added worker-build job to .circleci/config.yml that TypeScript-validates src/youtube-worker.ts (the YouTube API v3 Cloudflare Worker) and deploys it to Cloudflare as the ytstudio worker when CLOUDFLARE_API_TOKEN is set — gracefully skips deployment otherwise
  • Fixed node-checks job: added npm install --legacy-peer-deps for the functions/ directory before running lint and tsc (was entirely missing, causing all lint/type-check steps to fail)
  • Fixed python-checks job: replaced ruff check . --fix with read-only ruff check . and ruff format --check . — write-mode tools in CI produce misleading results and can exit non-zero on unfixable issues
  • Fixed functions/package.json: removed duplicate firebase-admin key (^10.3.0 shadowing ^13.9.0); the ^10.3.0 version doesn't satisfy firebase-functions@7's peer dep, causing npm ERESOLVE on every install
  • Fixed functions/.eslintrc.js: reformatted from minified single-line to readable multi-line; added .eslintrc.js itself to ignorePatterns so ESLint no longer reports 40 errors against its own config
  • Regenerated functions/package-lock.json with the corrected dependency tree
  • Updated validate workflow to include the new worker-build job

Worker endpoints (YouTube API v3)

The ytstudio Cloudflare Worker (src/youtube-worker.ts) exposes:

  • GET / or /health — health check with endpoint listing
  • GET /api/channel — channel stats for UCrjJP_SHUeCmqpTSHJCXkdA
  • GET /api/videos?maxResults=N — paginated video list
  • GET /api/search?q=query — channel video search

Falls back to demo data when YOUTUBE_API_KEY secret is not bound.

Test plan

  • CI validate workflow runs all three jobs: python-checks, node-checks, worker-build
  • node-checks passes lint (--max-warnings 0) and tsc after functions install
  • worker-build completes TypeScript check and prints wrangler version
  • No ERESOLVE errors during npm install in functions

https://app.circleci.com/agents/gh/ruhdevops/chat/18583633-9b6e-4f13-974a-2977744d6ee7

- Add `worker-build` job to .circleci/config.yml that TypeScript-checks
  src/youtube-worker.ts and deploys to Cloudflare when credentials available
- Fix node-checks: add npm install --legacy-peer-deps for functions/ before lint/tsc
- Fix python-checks: use ruff check/format --check (read-only CI mode)
- Fix functions/package.json: remove duplicate firebase-admin key (ERESOLVE fix)
- Fix functions/.eslintrc.js: reformat from minified; add self to ignorePatterns
- Regenerate functions/package-lock.json with correct dependency tree
- Update validate workflow to include the new worker-build job

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 Dec 4, 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 Dec 4, 2026 3:31am UTC
yt-studio-production Error Error Dec 4, 2026 3:31am UTC

@netlify

netlify Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

@netlify

netlify Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

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

@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 4d869a6 Dec 04 2026, 03:31 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 4d869a6 Dec 04 2026, 03:31 AM

This branch had an error being deployed

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