Skip to content

Add internal Go extension scaffolding to azd x init#8570

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/add-internal-flag-azd-x-init
Draft

Add internal Go extension scaffolding to azd x init#8570
Copilot wants to merge 4 commits into
mainfrom
copilot/add-internal-flag-azd-x-init

Conversation

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

azd x init did not generate the repo-level files required for first-party extensions under cli/azd/extensions. This adds an internal scaffold path focused on Go extensions.

  • CLI

    • Adds azd x init --internal
    • Defaults internal scaffolds to Go and 0.0.1-preview
    • Adds --codeowners for non-interactive CODEOWNERS generation
    • Prompts for CODEOWNERS in interactive internal mode
  • Generated internal files

    • Extension-local: ci-build.ps1, ci-test.ps1, version.txt, cspell.yaml
    • Repo-level: .github/workflows/lint-ext-<id>.yml
    • Repo-level: eng/pipelines/release-ext-<id>.yml
    • Updates .github/CODEOWNERS with the extension path
  • Safety / scope

    • Restricts --internal to Go extensions for now
    • Requires execution from inside the Azure/azure-dev repo
    • Validates extension IDs before writing repo-level paths

Example:

azd x init --internal --no-prompt \
  --id azure.ai.example \
  --name "Azure AI Example" \
  --namespace ai.example \
  --capabilities custom-commands \
  --codeowners @owner,@Azure/team

Copilot AI changed the title [WIP] Add support for --internal flag to azd x init Add internal Go extension scaffolding to azd x init Jun 8, 2026
Copilot AI requested a review from JeffreyCA June 8, 2026 22:38
@JeffreyCA

Copy link
Copy Markdown
Contributor

@copilot could we have the template files be separate files instead of being inlined? Like what's in cli/azd/extensions/microsoft.azd.extensions/internal/resources/languages/go/

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot could we have the template files be separate files instead of being inlined? Like what's in cli/azd/extensions/microsoft.azd.extensions/internal/resources/languages/go/

Addressed in b92ef04 by moving the internal scaffold templates into embedded resource files and updating azd x init --internal to load them from there.

Copilot AI and others added 4 commits June 9, 2026 18:50
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
- Introduced a constant for the default extension version.
- Updated internal scaffold logic to use the new version constant.
- Refactored codeowners handling in the internal scaffold process.
- Enhanced tests to reflect changes in default version behavior.
@JeffreyCA JeffreyCA force-pushed the copilot/add-internal-flag-azd-x-init branch from b92ef04 to 2795dfb Compare June 9, 2026 18:51
@github-actions github-actions Bot added the ext-x microsoft.azd.extensions developer extension (azd x) label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-x microsoft.azd.extensions developer extension (azd x)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

azd x init - support --internal flag that scaffolds required files for 1P extensions in repo

2 participants