Skip to content

Commit

Permalink
Refresh API review when additional changes are detected in API review…
Browse files Browse the repository at this point in the history
… token file in a new run (#5532)
  • Loading branch information
praveenkuttappan authored Feb 22, 2023
1 parent 8a02e02 commit 4663446
Showing 1 changed file with 9 additions and 4 deletions.
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

0 comments on commit 4663446

Please sign in to comment.