Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh API review when additional changes are detected #5532

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/dotnet/APIView/APIViewWeb/Managers/PullRequestManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,16 @@ private async Task CreateRevisionIfRequired(CodeFile codeFile,
{
// Check if API surface level matches with any revisions
var renderedCodeFile = new RenderedCodeFile(codeFile);
if (await IsReviewSame(review, renderedCodeFile))
// pullRequestModel.ReviewId == null means: First time getting a request to check for API changes in the given package for a PR
if (pullRequestModel.ReviewId == null)
{
return;
}

//No API changes detected from baseline
if (await IsReviewSame(review, renderedCodeFile))
{
return;
}
}
// Below steps will remove last revision from previously created API review from the pull request and recreate new revision using latest token code file
if (pullRequestModel.ReviewId != null)
{
//Refresh baseline using latest from automatic review
Expand Down