Skip to content

Commit 06b7a1b

Browse files
CopilotEMaher
andauthored
fix: move AzDo Copilot prompt to .github/prompts/ to match GH Actions location
Agent-Logs-Url: https://github.com/Azure/apiops-cli/sessions/e65579e0-4f52-4f17-a508-cf31aa91bd47 Co-authored-by: EMaher <9244742+EMaher@users.noreply.github.com>
1 parent a94ca57 commit 06b7a1b

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/cli/init-command.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ export function createInitCommand(): Command {
9595
logger.info(' - Follow ./IDENTITY-SETUP-GITHUB.md for manual setup, OR');
9696
logger.info(' - Open ./.github/prompts/apiops-setup-identity.prompt.md with GitHub Copilot for guided setup');
9797
} else {
98-
logger.info(' - Follow ./IDENTITY-SETUP-AZDO.md for manual setup');
98+
logger.info(' - Follow ./IDENTITY-SETUP-AZDO.md for manual setup, OR');
99+
logger.info(' - Open ./.github/prompts/apiops-setup-identity.prompt.md with GitHub Copilot for guided setup');
99100
}
100101
logger.info('');
101102
} catch (error) {

src/services/init-service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class InitServiceImpl implements InitService {
180180
);
181181
const promptFile = path.join(
182182
config.outputDir,
183-
'.azdo/prompts/apiops-setup-identity.prompt.md'
183+
'.github/prompts/apiops-setup-identity.prompt.md'
184184
);
185185

186186
if (await this.fileExists(extractPipeline)) {
@@ -364,17 +364,17 @@ class InitServiceImpl implements InitService {
364364
await fs.writeFile(publishPath, publishContent);
365365
generatedFiles.pipelines.push('.azdo/pipelines/run-apim-publisher.yml');
366366

367-
// Copilot identity setup prompt — goes in .azdo/prompts/
367+
// Copilot identity setup prompt — goes in .github/prompts/ (same as GitHub Actions)
368368
const azdoPromptConfig: IdentitySetupAzdoPromptConfig = {
369369
environments: config.environments,
370370
cloud: config.cloud ?? 'public',
371371
};
372372
const azdoPromptContent = generateIdentitySetupAzdoPrompt(azdoPromptConfig);
373-
const azdoPromptsDir = path.join(config.outputDir, '.azdo/prompts');
373+
const azdoPromptsDir = path.join(config.outputDir, '.github/prompts');
374374
await fs.mkdir(azdoPromptsDir, { recursive: true });
375375
const azdoPromptPath = path.join(azdoPromptsDir, 'apiops-setup-identity.prompt.md');
376376
await fs.writeFile(azdoPromptPath, azdoPromptContent);
377-
generatedFiles.configs.push('.azdo/prompts/apiops-setup-identity.prompt.md');
377+
generatedFiles.configs.push('.github/prompts/apiops-setup-identity.prompt.md');
378378
}
379379

380380
/**

tests/unit/services/init-service.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,9 @@ describe('init-service', () => {
546546

547547
const result = await initService.run(config);
548548

549-
expect(result.configs).toContain('.azdo/prompts/apiops-setup-identity.prompt.md');
549+
expect(result.configs).toContain('.github/prompts/apiops-setup-identity.prompt.md');
550550
const promptCalls = vi.mocked(fs.writeFile).mock.calls.filter(
551-
(call) => call[0] === path.join('/test', '.azdo/prompts/apiops-setup-identity.prompt.md')
551+
(call) => call[0] === path.join('/test', '.github/prompts/apiops-setup-identity.prompt.md')
552552
);
553553
expect(promptCalls).toHaveLength(1);
554554
const content = promptCalls[0][1] as string;

0 commit comments

Comments
 (0)