Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Converting a specification from swagger to typespec

Users can convert a specification from swagger to typespec by using `tsp-client` a CLI designed to help developers throughout various stages of typespec development.
Expand Down Expand Up @@ -172,7 +172,7 @@
3. **Pull Request Management**:
- Always start by checking if a pull request exists for spec changes before proceeding with validation or SDK
generation.
- Use `GetPullRequestForCurrentBranch` to query pull requests instead of the `gh` CLI.
- Use `GetPullRequestForCurrentBranch` to query pull requests instead of the `gh` CLI. Skip this step if pull request link is already provided.
- Provide a detailed pull request summary, including:
- Title, link, author, assignee, status (open, closed, merged), and mergeability.
- Check statuses (success or failure) with links and detailed failure reasons.
Expand Down Expand Up @@ -214,5 +214,17 @@
Follow `/typespec-to-sdk` prompt to generate and release SDK from TypeSpec API specification. The process is divided into several steps, each with specific actions to ensure a smooth SDK generation and release process.
Do not skip the step that choose SDK generation method to ensure the user selects the appropriate method for SDK generation, either locally or using the SDK generation pipeline. Do not repeat the steps.

### TypeSpec to SDK Generation Process
1. **Pre-Flight Check**: Ensure user is not on main branch and prompt to create a new branch if necessary.
2. **Identify TypeSpec Project**: Locate the TypeSpec project root path by checking for `tspconfig.yaml` or `main.tsp` files.
3. **Validate TypeSpec Specification**: Ensure the TypeSpec specification compiles without errors.
4. **Verify Authentication and Repository Status**: Ensure user is authenticated and working in the correct public Azure repository.
5. **Review and Commit Changes**: Stage and commit TypeSpec modifications, ensuring the current branch is not "main". Do not create pull request yet.
6. **Choose SDK Generation Method**: Determine how to generate SDKs (locally or via pipeline).
7. **Create Specification Pull Request**: Create a pull request for TypeSpec changes if not already created.
8. **Verify API Readiness**: Ensure the API specification pull request is ready for SDK generation.
9. **Generate SDKs via Pipeline**: Create a release plan, link namespace approval and generate SDKs, monitoring the pipeline status and displaying generated SDK PR links.
10. **Release Readiness Check**: Run `/check-package-readiness` to verify the release readiness of the SDK package.

## Release readiness of SDK and information about the release pipeline
Run `/check-package-readiness` prompt to check the release readiness of an SDK package. This prompt will collect the required information from the user, execute the readiness check, and present the results.
5 changes: 5 additions & 0 deletions .github/prompts/create-release-plan.prompt.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
mode: 'agent'
tools: ['CreateReleasePlan', 'GetReleasePlanForPullRequest', 'GetReleasePlan', 'LinkSdkPullRequestToReleasePlan']
Expand Down Expand Up @@ -41,6 +41,11 @@
- Provide this resource: [Release Plan Creation Guide](https://eng.ms/docs/products/azure-developer-experience/plan/release-plan-create)
- Once all information is gathered, use `CreateReleasePlan` to create the release plan
- Display the newly created release plan details to the user for confirmation
- Run `/sdk-details-in-release-plan` to identify languages configured in the TypeSpec project and add them to the release plan

## Update SDK Details in Release Plan
- Run `/sdk-details-in-release-plan` to add languages and package names to the release plan
- If the TypeSpec project is for a management plane, run `/verify-namespace-approval` if this is first release of SDK.

## Step 5: Link SDK Pull Requests (if applicable)
- Ask the user if they have already created SDK pull requests locally for any programming language
Expand Down
10 changes: 0 additions & 10 deletions .github/prompts/typespec-to-sdk.prompt.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
---
mode: 'agent'
description: 'Generate SDKs from TypeSpec'
---
Your goal is to guide user through the process of generating SDKs from TypeSpec projects. Show all the high level steps to the user to ensure they understand the flow. Use the provided tools to perform actions and gather information as needed.
## TypeSpec to SDK Generation Process
1. **Pre-Flight Check**: Ensure user is not on main branch and prompt to create a new branch if necessary.
2. **Identify TypeSpec Project**: Locate the TypeSpec project root path by checking for `tspconfig.yaml` or `main.tsp` files.
3. **Validate TypeSpec Specification**: Ensure the TypeSpec specification compiles without errors.
4. **Verify Authentication and Repository Status**: Ensure user is authenticated and working in the correct public Azure repository.
5. **Review and Commit Changes**: Stage and commit TypeSpec modifications, ensuring the current branch is not "main".
6. **Choose SDK Generation Method**: Determine how to generate SDKs (locally or via pipeline).
7. **Create Specification Pull Request**: Create a pull request for TypeSpec changes if not already created.
8. **Verify API Readiness**: Ensure the API specification pull request is ready for SDK generation.
9. **Generate SDKs via Pipeline**: Create a release plan and generate SDKs, monitoring the pipeline status and displaying generated SDK PR links.

## Pre-Flight Check
- Verify ${workspaceFolder} is not on main branch
Expand Down
4 changes: 3 additions & 1 deletion .github/prompts/verify-namespace-approval.prompt.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
---
mode: 'agent'
description: 'Verify SDK namespace approval for management plane'
tools: ['GetReleasePlan', 'GetReleasePlanForPullRequest', 'LinkNameSpaceApprovalIssue']
---
This task is required only for management plan API spec and only if a release plan exists for the API spec pull request.

## Step 1: Check if release plan exists and it is for management plane SDK
**Goal**: Determine if a release plan exists for the API spec pull request or work item Id or release plan Id in current context.
**Actions**:
1. Get release plan and check if it is for management plane SDK
2. If not, inform user: "This task is only applicable for management plane SDKs. No action required."
3. Check if release plan already has namespace approval issue.
3. Check if release plan already has namespace approval issue. Also prompt user to check if this is the first release of SDK.
4. If namespace approval issue exists, inform user: "Namespace approval issue already exists for this release plan.". Prompt user to
check if they want to link a different namespace approval issue to the release plan. Show namespace approval status.
5. Move to Step 2 if namespace approval issue does not exist or user wants to link a different namespace approval issue.

## Step 2: Gather Namespace Approval Information
**Goal**: Link namespace approval issue to the release plan.
**Actions**:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"azure-sdk-mcp": {
"type": "stdio",
"command": "pwsh",
"args": ["${workspaceFolder}/eng/common/mcp/azure-sdk-mcp.ps1", "-Run", "-Version", "1.0.0-dev.20250618.1"]
"args": ["${workspaceFolder}/eng/common/mcp/azure-sdk-mcp.ps1", "-Run", "-Version", "1.0.0-dev.20250630.3"]
},
}
}
Loading