Skip to content

Commit

Permalink
Adding count to .NET frameworks (#501)
Browse files Browse the repository at this point in the history
* Added count to code

* Added counter to dotnet languages
  • Loading branch information
samsmithnz committed Jul 29, 2023
1 parent 4c27118 commit 3b3aeb0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/RepoGovernance.Core/Models/Framework.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ public class Framework
{
public string? Name { get; set; }
public string? Color { get; set; }
public int Count { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/RepoGovernance.Core/SummaryItemsDA.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using DotNetCensus.Core.Models;
using GitHubActionsDotNet.Models.Dependabot;
using GitHubActionsDotNet.Serialization;
using Newtonsoft.Json;
using RepoAutomation.Core.APIAccess;
using RepoAutomation.Core.Helpers;
using RepoAutomation.Core.Models;
Expand Down Expand Up @@ -220,7 +219,8 @@ public static List<UserOwnerRepo> GetRepos(string user)
Framework framework = new()
{
Name = frameworkSummary.Framework,
Color = DotNetRepoScanner.GetColorFromStatus(frameworkSummary.Status)
Color = DotNetRepoScanner.GetColorFromStatus(frameworkSummary.Status),
Count = frameworkSummary.Count
};
if (frameworkSummary.Framework != null &&
summaryItem?.DotNetFrameworks.Where(p => p.Name == frameworkSummary.Framework).FirstOrDefault() == null)
Expand Down
2 changes: 1 addition & 1 deletion src/RepoGovernance.Web/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
{
foreach (Framework framework in item.DotNetFrameworks)
{
<span class="badge @framework.Color">@framework.Name</span>
<span class="badge @framework.Color">@framework.Name</span><span> x @framework.Count</span>
<br />
}
}
Expand Down

0 comments on commit 3b3aeb0

Please sign in to comment.