From 002bdc46760dfb32ef97b49501b38698a3d6a60a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Sep 2025 15:33:47 +0000 Subject: [PATCH 1/4] Initial plan From f80bc28b942ba3b273374bee3e4bde6cc349385d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Sep 2025 15:41:39 +0000 Subject: [PATCH 2/4] Change GitHub Actions prompt to default to true instead of false Co-authored-by: mxschmitt <17984549+mxschmitt@users.noreply.github.com> --- src/generator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generator.ts b/src/generator.ts index e01ca40..7801f6e 100644 --- a/src/generator.ts +++ b/src/generator.ts @@ -129,7 +129,7 @@ export class Generator { type: 'confirm', name: 'installGitHubActions', message: 'Add a GitHub Actions workflow?', - initial: !!this.options.gha, + initial: true, skip: !!this.options.gha, }, { From 83b0d2d895343b8feb2c71a46b9892378b79a17e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 19 Sep 2025 15:43:41 +0000 Subject: [PATCH 3/4] Add tests to verify new GitHub Actions default behavior Co-authored-by: mxschmitt <17984549+mxschmitt@users.noreply.github.com> --- tests/integration.spec.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/integration.spec.ts b/tests/integration.spec.ts index 35153ec..e738d8d 100644 --- a/tests/integration.spec.ts +++ b/tests/integration.spec.ts @@ -185,4 +185,25 @@ test('is proper yarn berry', async ({ packageManager, exec }) => { test.skip(packageManager !== 'yarn-berry'); const result = await exec('yarn --version', [], { cwd: test.info().outputDir, shell: true }); expect(result.stdout).toMatch(/^4\./); +}); + +test('should default GitHub Actions to true when accepting default', async ({ run, dir }) => { + // This tests the new default behavior - GitHub Actions should be created when user accepts the default + await run([], { installGitHubActions: true, testDir: 'tests', language: 'TypeScript', installPlaywrightDependencies: false, installPlaywrightBrowsers: false }); + + // Verify GitHub Actions workflow was created + expect(fs.existsSync(path.join(dir, '.github/workflows/playwright.yml'))).toBeTruthy(); + + // Verify the workflow file contains expected content + const workflowContent = fs.readFileSync(path.join(dir, '.github/workflows/playwright.yml'), 'utf8'); + expect(workflowContent).toContain('name: Playwright Tests'); + expect(workflowContent).toContain('npx playwright test'); +}); + +test('should allow opting out of GitHub Actions despite default being true', async ({ run, dir }) => { + // This tests that users can still opt out even though the default is now true + await run([], { installGitHubActions: false, testDir: 'tests', language: 'TypeScript', installPlaywrightDependencies: false, installPlaywrightBrowsers: false }); + + // Verify GitHub Actions workflow was NOT created when user opts out + expect(fs.existsSync(path.join(dir, '.github/workflows/playwright.yml'))).toBeFalsy(); }); \ No newline at end of file From b190a23c6012fb0f71c10118ad8f7b6b183208d0 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Mon, 22 Sep 2025 15:02:16 +0200 Subject: [PATCH 4/4] remove test --- tests/integration.spec.ts | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tests/integration.spec.ts b/tests/integration.spec.ts index e738d8d..35153ec 100644 --- a/tests/integration.spec.ts +++ b/tests/integration.spec.ts @@ -185,25 +185,4 @@ test('is proper yarn berry', async ({ packageManager, exec }) => { test.skip(packageManager !== 'yarn-berry'); const result = await exec('yarn --version', [], { cwd: test.info().outputDir, shell: true }); expect(result.stdout).toMatch(/^4\./); -}); - -test('should default GitHub Actions to true when accepting default', async ({ run, dir }) => { - // This tests the new default behavior - GitHub Actions should be created when user accepts the default - await run([], { installGitHubActions: true, testDir: 'tests', language: 'TypeScript', installPlaywrightDependencies: false, installPlaywrightBrowsers: false }); - - // Verify GitHub Actions workflow was created - expect(fs.existsSync(path.join(dir, '.github/workflows/playwright.yml'))).toBeTruthy(); - - // Verify the workflow file contains expected content - const workflowContent = fs.readFileSync(path.join(dir, '.github/workflows/playwright.yml'), 'utf8'); - expect(workflowContent).toContain('name: Playwright Tests'); - expect(workflowContent).toContain('npx playwright test'); -}); - -test('should allow opting out of GitHub Actions despite default being true', async ({ run, dir }) => { - // This tests that users can still opt out even though the default is now true - await run([], { installGitHubActions: false, testDir: 'tests', language: 'TypeScript', installPlaywrightDependencies: false, installPlaywrightBrowsers: false }); - - // Verify GitHub Actions workflow was NOT created when user opts out - expect(fs.existsSync(path.join(dir, '.github/workflows/playwright.yml'))).toBeFalsy(); }); \ No newline at end of file