Warn before initializing from archived template repositories - #9541
Warn before initializing from archived template repositories#9541Victor Vazquez (vhvb1989) wants to merge 3 commits into
Conversation
Detect archived GitHub repositories before cloning templates and require an explicit, default-No confirmation. Preserve safe non-interactive behavior and document GitHub metadata authentication variables. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 254ebc9e-ea83-47b8-b307-309ba40685f4
|
Azure Pipelines: Successfully started running 1 pipeline(s). 20 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Mark the archived-template decline sentinel as handled by azd init so the package-level telemetry mapping guard recognizes the intentional control-flow error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 254ebc9e-ea83-47b8-b307-309ba40685f4
Update the template initialization functional test to explicitly accept the archived repository warning before supplying the environment name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 254ebc9e-ea83-47b8-b307-309ba40685f4
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Summary
azd init --templaterepository[y/N]confirmation--no-promptmode and clean up auto-created project directories when the user declinesUser experience
Metadata checks use a bounded timeout and degrade to the existing clone behavior when GitHub metadata cannot be retrieved. Context cancellation is still propagated.
Validation
go test ./internal/repository ./cmd -run 'TestGitHubRepositoryStatusChecker|TestInitializerConfirmArchivedTemplate|TestInitArchivedTemplateDeclinedCleansCreatedDirectory|Test_Initializer_Initialize'go test ./internal/repositorygo build ./...golangci-lint run ./internal/repository/... ./cmd/...--no-promptagainstAzure-Samples/todo-csharp-sql-swa-func; initialization stopped before cloning and left the working directory unchangedCloses #9540