Azure / Azure/azure-sdk-tools

[APIView] WI-16: GetReviewStatus & Copilot Trigger

Open
#15,007 0 comments 0 reactions 0 assignees View on GitHub
APIView
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
144

Description

## Goal

Make `GetReviewStatus` version-aware and implement version-level Copilot automation triggers.

**Area:** Approvals · **Depends on:** WI-3 · **Stable alone:** ✅ Yes — additive, backward-compatible

## Deliverables

### Update `GetReviewStatus` (release gating)

Update `AutoReviewController.GetReviewStatus`:
- **Before:** Iterates revisions to find matching `PackageVersion`, checks `IsApproved`
- **After:** `NormalizeVersion(packageVersion)` → look up `APIVersion` by `(reviewId, versionIdentifier)` → return `version.IsApproved`
- Backward compatible: if no matching `APIVersion` exists, fall through to revision-level check

### Update Copilot automation trigger

Per §7.2:
1. On version creation/new revision, check `APIVersionModel.IsReviewedByCopilot`
2. If `false` and `Kind = Stable` (or PR resolving to stable): enqueue Copilot review, set `IsReviewedByCopilot = true`
3. `Preview`/`RollingPrerelease`: skip automatic trigger
4. Manual Copilot requests tracked via `ReviewRequestIds`, don't set `IsReviewedByCopilot`

### Tests

- `ReviewsControllerTests.cs` — `GetReviewStatus` returns from version; backward-compatible fallback
- `CopilotTriggerTests.cs` — Stable triggers; preview doesn't; rolling prerelease doesn't; duplicate prevention

### Documentation

Update `docs/release_approval.md` §6: `GetReviewStatus` resolves by version.

Contributor guide

Open the contributing guide

Research direction

Start with AutoReviewController.GetReviewStatus and the version models involved in the issue, then read ReviewsControllerTests.cs and CopilotTriggerTests.cs. Run the named tests to understand current revision fallback and trigger behavior. Done means version-aware status with fallback, correct Stable/Preview/RollingPrerelease and duplicate handling, passing tests, and the §6 update in docs/release_approval.md.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, documentation, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.