Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 3 additions & 9 deletions azure_pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pool:
vmImage: ubuntu-latest
name: Azure Pipelines
demands: java

Expand All @@ -21,15 +22,8 @@ steps:

- task: CmdLine@2
inputs:
script: dotnet build --no-incremental
displayName: 'Run dotnet build'

- task: DotNetCoreCLI@2
displayName: 'Run dotnet test'
inputs:
command: test
projects: '**/*[Tt]ests/*.csproj'
arguments: '--configuration $(BuildConfiguration) /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --collect "Code Coverage" /p:Exclude=[xunit.*]*'
script: dotnet test --configuration $(BuildConfiguration) /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --collect "Code Coverage" /p:Exclude=[xunit.*]*
displayName: 'Run Tests'

- task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
displayName: 'Run Code Analysis'
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/WorkItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void AddTimeByState(TimeByState timeByState)

public void AddTimesByState(IEnumerable<TimeByState> timesByState)
{
if (timesByState is not null && !timesByState.Any())
if (timesByState is null || timesByState?.Any() == false)
return;

foreach (var timeByState in timesByState)
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/HelperExtenions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static string ExtractEmail(this string user)
if (!user.Contains(" <") && !user.TrimEnd().Contains(">"))
return user;

return user.Split("<").LastOrDefault().Split(">").FirstOrDefault();
return user.Split("<").LastOrDefault()?.Split(">")?.FirstOrDefault();
}

public static string ToTextTime(this TimeSpan timeSpan)
Expand Down