Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Changes

Updated generate_typespec_project() function signature in eng/automation/generate_utils.py to provide sensible defaults:

  • head_sha: """HEAD"
  • repo_url: """Azure/azure-rest-api-specs"

Result

Callers can now omit these parameters when generating from the default specs repo at HEAD:

# Before: required explicit empty strings or values
generate_typespec_project(tsp_project, sdk_root, spec_root, "", "")

# After: can omit when using defaults
generate_typespec_project(tsp_project, sdk_root, spec_root)

# Explicit values still override defaults
generate_typespec_project(tsp_project, sdk_root, spec_root, "abc123", "MyOrg/my-specs")

Existing callers with explicit parameters are unaffected.


💡 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.

…ject

- Set head_sha default to "HEAD"
- Set repo_url default to "Azure/azure-rest-api-specs"

Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
Copilot AI changed the title [WIP] Set default values for head_sha and repo_url in generate_utils.py Set default values for head_sha and repo_url in generate_typespec_project Feb 11, 2026
@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Feb 11, 2026

tsp-client will report error if they are empty, even though it works in "local" mode

Error reading tsp-location.yaml: Error: Invalid tsp-location.yaml, missing required fields: directory, commit, repo

This is for dev use in local for iteration, where they won't need to provide a commit SHA.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates eng/automation/generate_utils.py to make generate_typespec_project() easier to call for the common case of generating from Azure/azure-rest-api-specs at HEAD, by providing non-empty default values for head_sha and repo_url.

Changes:

  • Changed generate_typespec_project() default head_sha from "" to "HEAD".
  • Changed generate_typespec_project() default repo_url from "" to "Azure/azure-rest-api-specs".

@weidongxu-microsoft
Copy link
Member

/check-enforcer override

@weidongxu-microsoft weidongxu-microsoft merged commit cc5845f into main Feb 11, 2026
26 checks passed
@weidongxu-microsoft weidongxu-microsoft deleted the copilot/set-default-values-generate-utils branch February 11, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants