diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index a9deca3b5f4f..a400a04ae96f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -19,7 +19,7 @@ body: attributes: label: To Reproduce description: >- - Please create a reproduction by running `npx sb@next repro` and + Please create a reproduction by running `npx sb@next sandbox` and following the instructions. Read our [documentation](https://storybook.js.org/docs/react/contribute/how-to-reproduce) to learn more about creating reproductions. diff --git a/.github/workflows/generate-repros-next.yml b/.github/workflows/generate-repros-next.yml deleted file mode 100644 index 8d84278b2eeb..000000000000 --- a/.github/workflows/generate-repros-next.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Generate and push repros to the next branch - -on: - schedule: - - cron: '2 2 */1 * *' - workflow_dispatch: - # To remove when the branch will be merged - push: - branches: - - vite-frameworks-xyz - -jobs: - generate: - runs-on: ubuntu-latest - env: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - CLEANUP_REPRO_NODE_MODULES: true - steps: - - uses: actions/setup-node@v3 - with: - node-version: 16 - - uses: actions/checkout@v3 - - name: Setup git user - run: | - git config --global user.name "Storybook Bot" - git config --global user.email "bot@storybook.js.org" - - name: Install dependencies - run: node ./scripts/check-dependencies.js - - name: Compile Storybook libraries - run: yarn task --task publish --start-from=auto --no-link - - name: Running local registry - run: yarn local-registry --open & - working-directory: ./code - - name: Wait for registry - run: yarn wait-on http://localhost:6001 - working-directory: ./code - - name: Generate repros - run: yarn generate-repros-next --local-registry - working-directory: ./code - - name: Publish repros to GitHub - run: yarn publish-repros --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/repro-templates-temp.git --push - working-directory: ./code diff --git a/.github/workflows/generate-repros.yml b/.github/workflows/generate-repros.yml index 4981d8e76da1..352128e157a5 100644 --- a/.github/workflows/generate-repros.yml +++ b/.github/workflows/generate-repros.yml @@ -1,4 +1,4 @@ -name: Generate And Push Repros +name: Generate and push repros to Github on: schedule: @@ -7,13 +7,14 @@ on: # To remove when the branch will be merged push: branches: - - generate-repros + - vite-frameworks-xyz jobs: - update: + generate: runs-on: ubuntu-latest env: YARN_ENABLE_IMMUTABLE_INSTALLS: false + CLEANUP_SANDBOX_NODE_MODULES: true steps: - uses: actions/setup-node@v3 with: @@ -23,11 +24,19 @@ jobs: run: | git config --global user.name "Storybook Bot" git config --global user.email "bot@storybook.js.org" - - name: Change directory - run: cd code - name: Install dependencies - run: yarn install - - name: Generate repros with Latest Storybook CLI - run: yarn generate-repros --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/repro-templates.git --push --force-push - - name: Generate repros with Next Storybook CLI - run: yarn generate-repros --next --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/repro-templates.git --push --force-push + run: node ./scripts/check-dependencies.js + - name: Compile Storybook libraries + run: yarn task --task publish --start-from=auto --no-link + - name: Running local registry + run: yarn local-registry --open & + working-directory: ./code + - name: Wait for registry + run: yarn wait-on http://localhost:6001 + working-directory: ./code + - name: Generate repros + run: yarn generate-sandboxes --local-registry + working-directory: ./code + - name: Publish sandboxes to GitHub + run: yarn publish-sandboxes --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/sandboxes.git --push + working-directory: ./code diff --git a/code/lib/cli/src/generate.ts b/code/lib/cli/src/generate.ts index 5637d5ffb09e..57d351769ef2 100644 --- a/code/lib/cli/src/generate.ts +++ b/code/lib/cli/src/generate.ts @@ -13,8 +13,7 @@ import { add } from './add'; import { migrate } from './migrate'; import { extract } from './extract'; import { upgrade, type UpgradeOptions } from './upgrade'; -import { repro } from './repro'; -import { reproNext } from './repro-next'; +import { sandbox } from './sandbox'; import { link } from './link'; import { automigrate } from './automigrate'; import { generateStorybookBabelConfigInCWD } from './babel-config'; @@ -142,31 +141,14 @@ program ); program - .command('repro [outputDirectory]') - .description('Create a reproduction from a set of possible templates') - .option('-f --renderer ', 'Filter on given renderer') - .option('-t --template