Skip to content

fix: YouTube API v3 worker deploy + resolve node-checks lint failures - #317

Open
circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/youtube-api-worker-deploy-fix-lint
Open

circleci-app[bot] wants to merge 1 commit into
mainfrom
chunk/youtube-api-worker-deploy-fix-lint

Conversation

@circleci-app

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

Copy link
Copy Markdown
Contributor

Summary

  • Fixed node-checks lint failure — functions/.eslintrc.js was minified to a single 483-char line, causing 40 ESLint errors (max-len, key-spacing, comma-spacing, eol-last) that failed the job with --max-warnings 0. Reformatted to proper multi-line style; lint and TypeScript type-check now both pass cleanly.
  • Fixed functions/package.json — removed a duplicate firebase-admin key, removed a spurious lint: ^1.2.2 dependency, and pinned typescript to ^5.7.0 (the declared ^6.0.0 does not exist on npm, causing npm ci to fail).
  • Updated functions/package-lock.json — regenerated to match the corrected package.json.
  • Wired deploy-worker CI job in .circleci/config.yml — runs wrangler deploy src/youtube-worker.ts --name ytstudio on main branch only, after node-checks passes, using CLOUDFLARE_API_TOKEN env var.

YouTube API v3 Worker (src/youtube-worker.ts)

The Cloudflare Worker already implements a full YouTube Data API v3 proxy for channel UCrjJP_SHUeCmqpTSHJCXkdA (Ruh Al Tarikh):

Endpoint Description
GET / or /health Health check + endpoint manifest
GET /api/channel Channel statistics & snippet
GET /api/videos Uploads playlist with pagination
GET /api/search?q=… Keyword search scoped to channel

All endpoints fall back to demo data when YOUTUBE_API_KEY is absent.

Test plan

  • Confirm node-checks job passes with --max-warnings 0
  • Confirm deploy-worker job triggers on merge to main
  • Verify Cloudflare Worker /health endpoint returns {"status":"healthy",...}
  • Verify /api/videos returns demo data when no API key is bound

https://app.circleci.com/agents/gh/ruhdevops/chat/abdc44fe-072f-45fd-8ea0-ab67935074a4

…deploy

- Reformat functions/.eslintrc.js from minified single-line to proper
  multi-line style; the 40 ESLint errors (max-len, key-spacing, etc.)
  blocked the node-checks job with --max-warnings 0
- Add deploy-worker CI job to .circleci/config.yml that runs wrangler
  deploy on main branch after node-checks passes
- Fix functions/package.json: remove duplicate firebase-admin key,
  remove invalid lint dependency, pin typescript to ^5.7.0 (^6.0.0
  does not exist and caused npm ci to fail)
- Update functions/package-lock.json to match cleaned package.json

The youtube-worker.ts (src/) already implements YouTube Data API v3:
  GET /api/channel   - channel statistics and snippet
  GET /api/videos    - uploads playlist with pagination
  GET /api/search    - keyword search scoped to channel
  GET /             - health + endpoint manifest
Falls back to demo data when YOUTUBE_API_KEY is absent.

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 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 3:33am UTC
yt-studio-production Error Error Nov 2, 2026 3:33am 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 ed2cdce Nov 02 2026, 03:33 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 ed2cdce Nov 02 2026, 03:33 AM

@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for ytr-studio failed.

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

@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for elegant-seahorse-d9d460 ready!

Name Link
🔨 Latest commit ed2cdce
🔍 Latest deploy log https://app.netlify.com/projects/elegant-seahorse-d9d460/deploys/6ae8048431bf745c7ab51bd2
😎 Deploy Preview https://deploy-preview-317--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 — ed2cdce5 Deployed Nov 2, 2026 by vercel[bot]
Preview – yt-studio-production — ed2cdce5 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