Skip to content

Add step in publish pipeline to create PR to azure-sdk-for-net #7426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Jun 13, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented May 21, 2025

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 in the docs.

@microsoft-github-policy-service microsoft-github-policy-service bot added compiler:core Issues for @typespec/compiler compiler:emitter-framework Issues for the emitter framework ide Issues for VS, VSCode, Monaco, etc. lib:http lib:openapi lib:rest lib:versioning lib:http-specs For issues/prs related to the @typespec/http-specs package meta:blog Blog updates meta:website TypeSpec.io updates tspd Issues for the tspd tool emitter:client:all General issue for client emitters emitter:client:js Issue for the JS client emitter: @typespec/http-client-js emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp emitter:client:java Issue for the Java client emitter: @typespec/http-client-java emitter:client:python Issue for the Python client emitter: @typespec/http-client-python emitter:graphql Issues for @typespec/graphql emitter emitter:json-schema emitter:protobuf The protobuf emitter emitter:openapi3 Issues for @typespec/openapi3 emitter openapi3:converter Issues for @typespec/openapi3 openapi to typespec converter emitter:service:csharp emitter:service:js emitter:service:java Issue for Java service emitter eng ui:playground labels May 21, 2025
Copilot finished work on behalf of JoshLove-msft June 13, 2025 15:12
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Copilot finished work on behalf of JoshLove-msft June 13, 2025 15:55
…blishing

Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Copilot finished work on behalf of JoshLove-msft June 13, 2025 17:37
@JoshLove-msft JoshLove-msft enabled auto-merge June 13, 2025 17:37
@JoshLove-msft
Copy link
Contributor

Please run pnpm run format on the package directory.

Copy link
Contributor Author

Copilot AI commented Jun 13, 2025

Please run pnpm run format on the package directory.

Ran pnpm run format on the package directory. The formatter made minor whitespace corrections, removing trailing spaces from the publish.yml file.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: node /home/REDACTED/work/typespec/typespec/website/node_modules/.bin/../astro/astro.js build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Copilot finished work on behalf of JoshLove-msft June 13, 2025 17:56
…Pr.ps1

Co-authored-by: christothes <1279263+christothes@users.noreply.github.com>
Copilot finished work on behalf of christothes June 13, 2025 21:59
Copilot finished work on behalf of christothes June 13, 2025 22:01
@JoshLove-msft JoshLove-msft added this pull request to the merge queue Jun 13, 2025
Merged via the queue into main with commit b6bccbf Jun 13, 2025
22 checks passed
@JoshLove-msft JoshLove-msft deleted the copilot/fix-7110 branch June 13, 2025 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add step in publish pipeline to create PR to azure-sdk-for-net
6 participants