Skip to content

Commit

Permalink
Correct First Release Approver (#7816)
Browse files Browse the repository at this point in the history
  • Loading branch information
chidozieononiwu authored Mar 6, 2024
1 parent 2038a7b commit f644c24
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/dotnet/APIView/APIViewWeb/Pages/Assemblies/Review.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,19 @@
!(LanguageServiceHelpers.MapLanguageAliases(new List<string> { "Swagger", "TypeSpec" })).Contains(Model.ReviewContent.Review.Language))
{
var reviewIsApproved = Model.ReviewContent.Review.IsApproved;
var approver = (reviewIsApproved) ? "azure-sdk" : null;
string approver = null;
if (reviewIsApproved)
{
var changeAction = Model.ReviewContent.Review.ChangeHistory.First(_ => _.ChangeAction == ReviewChangeAction.Approved);
if (changeAction != null)
{
approver = changeAction.ChangedBy;
}
else
{
approver = "azure-sdk";
}
}

@if (!reviewIsApproved)
{
Expand Down

0 comments on commit f644c24

Please sign in to comment.