You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add step in publish pipeline to create PR to azure-sdk-for-net (#7426)
This PR adds automation to create a pull request in the Azure SDK for
.NET repository that updates the dependency on http-client-csharp when a
new version is published.
## Implementation Details
1. Created a new script in `internal-build-utils` package:
- Added `create-azure-sdk-for-net-pr.ts` to handle PR creation
- Added `http-client.ts` for GitHub API requests
- Updated the CLI to include a new command for creating PRs
2. Modified the `http-client-csharp` publish pipeline:
- Added a new stage that runs after successful publish
- Calls the PR creation command with proper parameters
- Only runs on the main branch (not on PRs)
3. Added documentation:
- Created a `CONTRIBUTING.md` for http-client-csharp
- Documented the automated PR creation process and manual fallback
## How It Works
When a new version of http-client-csharp is published from the main
branch:
1. The script clones the azure-sdk-for-net repository
2. Creates a new branch
3. Updates the Microsoft.TypeSpec.Generator.ClientModel package
reference in Directory.Packages.props
4. Creates a PR with appropriate title and description including a link
back to the original TypeSpec PR
This automation helps ensure that the Azure SDK for .NET always uses the
latest version of the TypeSpec-generated client components, improving
consistency across repositories.
Fixes#7110.
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Co-authored-by: weshaggard <9010698+weshaggard@users.noreply.github.com>
Co-authored-by: christothes <1279263+christothes@users.noreply.github.com>
Creates a pull request in the Azure SDK for .NET repository to update the UnbrandedGeneratorVersion property in eng/Packages.Data.props and the @typespec/http-client-csharp dependency in eng/packages/http-client-csharp/package.json.
6
+
.PARAMETERPackageVersion
7
+
The version of the Microsoft.TypeSpec.Generator.ClientModel package to update to.
8
+
.PARAMETERTypeSpecPRUrl
9
+
The URL of the pull request in the TypeSpec repository that triggered this update.
10
+
.PARAMETERAuthToken
11
+
A GitHub personal access token for authentication.
12
+
.PARAMETERBranchName
13
+
The name of the branch to create in the azure-sdk-for-net repository.
$PRTitle="Update UnbrandedGeneratorVersion to $PackageVersion"
41
+
$PRBody=@"
42
+
This PR updates the UnbrandedGeneratorVersion property in eng/Packages.Data.props and the @typespec/http-client-csharp dependency in eng/packages/http-client-csharp/package.json to version $PackageVersion.
0 commit comments