Skip to content

Commit

Permalink
Fix to bad situation when repo could be nuill
Browse files Browse the repository at this point in the history
  • Loading branch information
samsmithnz committed Jun 21, 2023
1 parent dd9f5d6 commit 323ab3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/DevOpsMetrics.Core/DataAccess/DORASummaryDA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static async Task<DORASummaryItem> GetDORASummaryItem(TableStorageConfigu
{
foreach (DORASummaryItem item in doraItems)
{
if ((project != null && item.Project == project) || (item.Repo.ToLower() == repo.ToLower()))
if ((project != null && item.Project == project) || (item.Repo?.ToLower() == repo.ToLower()))
{
result = item;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
using DevOpsMetrics.Core.DataAccess.TableStorage;
using DevOpsMetrics.Core.Models.Common;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Build.Framework;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;

namespace DevOpsMetrics.Service.Controllers
{
Expand Down Expand Up @@ -56,7 +54,7 @@ public async Task<ProcessingResult> UpdateDORASummaryItem(
Microsoft.Extensions.Logging.ILogger log = null,
bool useCache = true,
bool isGitHub = true,
bool useParallelProcessing = false)
bool useParallelProcessing = true)
{
//Start timer
DateTime startTime = DateTime.Now;
Expand Down
10 changes: 4 additions & 6 deletions src/DevOpsMetrics.Tests/Service/DORASummaryControllerTests.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Threading.Tasks;
using DevOpsMetrics.Core.DataAccess.TableStorage;
using DevOpsMetrics.Core.Models.AzureDevOps;
using DevOpsMetrics.Core.Models.Common;
using DevOpsMetrics.Core.Models.GitHub;
using DevOpsMetrics.Service.Controllers;
using Microsoft.AspNetCore.Mvc;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace DevOpsMetrics.Tests.Service
Expand Down Expand Up @@ -40,10 +38,10 @@ public async Task DORASummaryControllerGitHubUpdateIntegrationTest()
{
//Arrange
string project = null;
string organization = "DeveloperMetrics";
string repo = "DevOpsMetrics";
//string organization = "samsmithnz";
//string repo = "Sams2048";
//string organization = "DeveloperMetrics";
//string repo = "DevOpsMetrics";
string organization = "samsmithnz";
string repo = "SamsFeatureFlags";
//string organization = "samsmithnz";
//string repo = "CustomQueue";
//string organization = "samsmithnz";
Expand Down

0 comments on commit 323ab3d

Please sign in to comment.