Skip to content

[azsdk-cli] Unified the path parameter#12067

Merged
raych1 merged 3 commits into
mainfrom
user/raych1/unify-path-param
Sep 16, 2025
Merged

[azsdk-cli] Unified the path parameter#12067
raych1 merged 3 commits into
mainfrom
user/raych1/unify-path-param

Conversation

@raych1

@raych1 raych1 commented Sep 12, 2025

Copy link
Copy Markdown
Member

Unified the path parameter of all the functions in GitHelper:

  • accept any path within a repo folder
  • calls DiscoverRepoRoot() internally to find the repo root
  • use consistent naming

@benbp @praveenkuttappan could you review this PR?

Copilot AI review requested due to automatic review settings September 12, 2025 21:27
@raych1 raych1 self-assigned this Sep 12, 2025
@github-actions github-actions Bot added the azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli label Sep 12, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 unifies the path parameter handling across all GitHelper functions by accepting any path within a repository folder and consistently calling DiscoverRepoRoot() internally to find the repository root.

  • Renamed all path parameters to pathInRepo for clarity and consistency
  • Updated method implementations to call DiscoverRepoRoot() before creating Repository instances
  • Added comprehensive XML documentation for all public methods

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
GitHelper.cs Updated interface and implementation to use consistent pathInRepo parameter naming, added repo root discovery calls, and comprehensive XML documentation
GitHelperTests.cs Added new test cases for subdirectory path handling and updated existing tests to reflect new exception types

Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Helpers/GitHelper.cs
Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Helpers/GitHelper.cs Outdated
@raych1
raych1 merged commit 4b0fa79 into main Sep 16, 2025
13 checks passed
@raych1
raych1 deleted the user/raych1/unify-path-param branch September 16, 2025 18:04
@raych1 raych1 changed the title Unified the path parameter [azsdk-cli] Unified the path parameter Sep 16, 2025
@kurtzeborn kurtzeborn moved this from 🔬 Dev in PR to 🎊 Closed in Azure SDK EngSys 🚀🌒🧑‍🚀 Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli

Projects

Development

Successfully merging this pull request may close these issues.

5 participants