Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
/scripts/validate-playground-templates.mjs @browserbase/dashboard
/scripts/playground-ci.mjs @browserbase/dashboard
/scripts/lib/playground-checks.mjs @browserbase/dashboard
/.github/workflows/playground.yml @browserbase/dashboard
/.github/workflows/playground-production.yml @browserbase/dashboard
/.github/workflows/playground-test-production.yml @browserbase/dashboard
48 changes: 5 additions & 43 deletions .github/workflows/playground-production.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Validates TypeScript → JavaScript builds for templates exposed by the public
# templates API (playgroundRunnable). Intended for the `production` branch workflow
# described in https://github.com/browserbase/templates (branch protection: require
# this check + Dashboard team review before merge).
#
# Set TEMPLATES_API_URL to override the default public endpoint (e.g. staging).
# Triggers the shared playground workflow for the `production` branch.
# All CI steps live in playground.yml — edit there to change behavior.

name: Playground templates (production)

Expand All @@ -21,40 +17,6 @@ permissions:

jobs:
playground-templates:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Clean javascript output directory
run: rm -rf javascript && mkdir -p javascript

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build and validate playground TypeScript templates
env:
TEMPLATES_API_URL: ${{ vars.TEMPLATES_API_URL }}
run: pnpm run ci:playground

- name: Commit and push playground javascript (push to production only)
if: github.event_name == 'push'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A javascript/
if git diff --staged --quiet; then
echo "No javascript changes to commit."
else
git commit -m "chore: regenerate playground javascript templates"
git push
fi
uses: ./.github/workflows/playground.yml
with:
branch: production
48 changes: 5 additions & 43 deletions .github/workflows/playground-test-production.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Validates TypeScript → JavaScript builds for templates exposed by the public
# templates API (playgroundRunnable). Intended for the `test-production` branch workflow
# described in https://github.com/browserbase/templates (branch protection: require
# this check + Dashboard team review before merge).
#
# Set TEMPLATES_API_URL to override the default public endpoint (e.g. staging).
# Triggers the shared playground workflow for the `test-production` branch.
# All CI steps live in playground.yml — edit there to change behavior.

name: Playground templates (test production)

Expand All @@ -21,40 +17,6 @@ permissions:

jobs:
playground-templates:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Clean javascript output directory
run: rm -rf javascript && mkdir -p javascript

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build and validate playground TypeScript templates
env:
TEMPLATES_API_URL: ${{ vars.TEMPLATES_API_URL }}
run: pnpm run ci:playground

- name: Commit and push playground javascript (push to test-production only)
if: github.event_name == 'push'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A javascript/
if git diff --staged --quiet; then
echo "No javascript changes to commit."
else
git commit -m "chore: regenerate playground javascript templates"
git push
fi
uses: ./.github/workflows/playground.yml
with:
branch: test-production
58 changes: 58 additions & 0 deletions .github/workflows/playground.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Reusable workflow: validates TypeScript → JavaScript builds for playground-
# runnable templates and optionally commits the generated javascript/ tree.
#
# Called by playground-production.yml and playground-test-production.yml so that
# CI steps are defined in exactly one place.

name: Playground templates

on:
workflow_call:
inputs:
branch:
description: Target branch name (used only in log messages)
required: true
type: string
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required workflow input branch is never used

Low Severity

The branch input is declared as required: true and its description claims it is "used only in log messages," but inputs.branch is never referenced anywhere in the workflow steps. Both caller workflows (playground-production.yml and playground-test-production.yml) are required to pass this parameter for no effect. This is dead code with a misleading description.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a143d03. Configure here.


permissions:
contents: write

jobs:
playground-templates:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Clean javascript output directory
run: rm -rf javascript && mkdir -p javascript

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build and validate playground TypeScript templates
env:
TEMPLATES_API_URL: ${{ vars.TEMPLATES_API_URL }}
run: pnpm run ci:playground

- name: Commit and push playground javascript (push only)
if: github.event_name == 'push'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A javascript/
if git diff --staged --quiet; then
echo "No javascript changes to commit."
else
git commit -m "chore: regenerate playground javascript templates"
git push
fi
2 changes: 0 additions & 2 deletions javascript/amazon-global-price-comparison/.env.example

This file was deleted.

66 changes: 0 additions & 66 deletions javascript/amazon-global-price-comparison/README.md

This file was deleted.

Loading
Loading