Skip to content

Add pr link validation for get_release_plan_for_spec_pr#11984

Merged
smw-ms merged 2 commits into
Azure:mainfrom
smw-ms:validate-pr-link
Sep 9, 2025
Merged

Add pr link validation for get_release_plan_for_spec_pr#11984
smw-ms merged 2 commits into
Azure:mainfrom
smw-ms:validate-pr-link

Conversation

@smw-ms
Copy link
Copy Markdown
Member

@smw-ms smw-ms commented Sep 5, 2025

No description provided.

Copilot AI review requested due to automatic review settings September 5, 2025 19:55
@github-actions github-actions Bot added the azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli label Sep 5, 2025
Copy link
Copy Markdown
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 adds input validation for pull request links in the GetReleasePlanForPullRequest method. The change extracts existing validation logic into a reusable method and updates the response format to use a consistent GenericResponse structure.

Key changes:

  • Adds pull request URL validation to GetReleasePlanForPullRequest method
  • Refactors validation logic into a separate ValidatePullRequestUrl method
  • Standardizes response format using GenericResponse object

Reviewed Changes

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

File Description
ReleasePlanTool.cs Adds PR URL validation and refactors response handling to use GenericResponse
ReleasePlanToolTests.cs Adds test cases for valid and invalid PR links, updates existing test to use specs-pr repo

Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/ReleasePlan/ReleasePlanTool.cs Outdated
@smw-ms smw-ms linked an issue Sep 5, 2025 that may be closed by this pull request
…lanTool.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@smw-ms smw-ms merged commit 9d9363f into Azure:main Sep 9, 2025
13 checks passed
@smw-ms smw-ms deleted the validate-pr-link branch October 13, 2025 17:34
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

None yet

Development

Successfully merging this pull request may close these issues.

Improve logic and message when get release plan for spec pr

4 participants