Skip to content

Conversation

@AlitzelMendez
Copy link
Member

closes: #13722

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 the Copilot review gating logic to correctly handle API revisions where packageVersion is missing, so that reviews without a trackable version are not incorrectly blocked by Copilot requirements.

Changes:

  • Updated shouldDisableApproval in review-page-options.component.ts to short‑circuit and not disable approval when activeAPIRevision.packageVersion is falsy, aligning behavior with the requirement that Copilot review is only enforceable when a version is available.
  • Adjusted the corresponding unit test in review-page-options.component.spec.ts to assert that an empty packageVersion results in shouldDisableApproval returning false, reflecting the new intended behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/dotnet/APIView/ClientSPA/src/app/_components/review-page-options/review-page-options.component.ts Adds a guard in shouldDisableApproval so Copilot review is not required when packageVersion is missing, ensuring approval is not disabled in that scenario.
src/dotnet/APIView/ClientSPA/src/app/_components/review-page-options/review-page-options.component.spec.ts Updates the shouldDisableApproval test case to validate that an empty packageVersion no longer disables approval when Copilot review is required.

Copy link
Member

@tjprescott tjprescott left a comment

Choose a reason for hiding this comment

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

It seems to me if version isn't provided, there's no way we should be able to approve it.

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.

[APIView] Missing Package Version in JavaScript Reviews Causes Copilot Review Detection Failure

2 participants