diff --git a/build/_build.csproj b/build/_build.csproj index 1c682c6..1b7ee0e 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -11,10 +11,10 @@ - - - - + + + + diff --git a/source/Client/Client.csproj b/source/Client/Client.csproj index edeff12..6dd4d7c 100644 --- a/source/Client/Client.csproj +++ b/source/Client/Client.csproj @@ -15,6 +15,6 @@ https://github.com/OctopusDeploy/JiraIntegration - + \ No newline at end of file diff --git a/source/Server.E2E.Tests/Server.E2E.Tests.csproj b/source/Server.E2E.Tests/Server.E2E.Tests.csproj index da66d63..4640fa3 100644 --- a/source/Server.E2E.Tests/Server.E2E.Tests.csproj +++ b/source/Server.E2E.Tests/Server.E2E.Tests.csproj @@ -6,17 +6,17 @@ - - - - - - - - + + + + + + + + - + diff --git a/source/Server.Tests/Server.Tests.csproj b/source/Server.Tests/Server.Tests.csproj index f7ca6ae..8d345dd 100644 --- a/source/Server.Tests/Server.Tests.csproj +++ b/source/Server.Tests/Server.Tests.csproj @@ -6,15 +6,15 @@ Octopus.Server.Extensibility.JiraIntegration.Tests - - - - - - - + + + + + + + - + diff --git a/source/Server/Deployments/JiraDeployment.cs b/source/Server/Deployments/JiraDeployment.cs index 63d2c22..cdc7123 100644 --- a/source/Server/Deployments/JiraDeployment.cs +++ b/source/Server/Deployments/JiraDeployment.cs @@ -158,7 +158,7 @@ async Task PrepareOctopusJiraPayload(string eventType, { new JiraDeploymentData { - DeploymentSequenceNumber = int.Parse(deployment.Id!.ToString().Split('-')[1]), + DeploymentSequenceNumber = int.Parse(deployment.Id!.ToString()!.Split('-')[1]), UpdateSequenceNumber = DateTime.UtcNow.Ticks, DisplayName = serverTask.Description, Associations = new[] diff --git a/source/Server/Integration/JiraConnectAppClient.cs b/source/Server/Integration/JiraConnectAppClient.cs index 16be006..badae68 100644 --- a/source/Server/Integration/JiraConnectAppClient.cs +++ b/source/Server/Integration/JiraConnectAppClient.cs @@ -49,7 +49,7 @@ public JiraConnectAppClient( JsonConvert.DeserializeObject( result.Content.ReadAsStringAsync() .GetAwaiter() - .GetResult()); + .GetResult())!; return authTokenFromConnectApp.Token; } diff --git a/source/Server/Server.csproj b/source/Server/Server.csproj index 423771d..6d5fc3f 100644 --- a/source/Server/Server.csproj +++ b/source/Server/Server.csproj @@ -14,11 +14,11 @@ enable - - - - - - + + + + + + \ No newline at end of file diff --git a/source/Server/WorkItems/WorkItemLinkMapper.cs b/source/Server/WorkItems/WorkItemLinkMapper.cs index 72e2916..bd65d82 100644 --- a/source/Server/WorkItems/WorkItemLinkMapper.cs +++ b/source/Server/WorkItems/WorkItemLinkMapper.cs @@ -38,8 +38,7 @@ public IResultFromExtension Map(OctopusBuildInformation buildInf if (!IsEnabled) return ResultFromExtension.ExtensionDisabled(); - if (string.IsNullOrEmpty(store.GetJiraUsername()) || - string.IsNullOrEmpty(store.GetJiraPassword()?.Value)) + if (string.IsNullOrEmpty(store.GetJiraUsername()) || string.IsNullOrEmpty(store.GetJiraPassword()?.Value)) return FailureWithLog("Username/password not configured"); var baseUrl = store.GetBaseUrl(); @@ -103,7 +102,7 @@ public string GetReleaseNote(JiraIssue issue, string? releaseNotePrefix) var releaseNoteRegex = new Regex($"^{releaseNotePrefix}", RegexOptions.Compiled | RegexOptions.IgnoreCase); - var releaseNote = issue.Fields.Comments.Comments.Select(x => x.Body).Where(x => x is not null).LastOrDefault(c => releaseNoteRegex.IsMatch(c)); + var releaseNote = issue.Fields.Comments.Comments.Select(x => x.Body).Where(x => x is not null).LastOrDefault(c => c is not null && releaseNoteRegex.IsMatch(c)); return !string.IsNullOrWhiteSpace(releaseNote) ? releaseNoteRegex.Replace(releaseNote, string.Empty)?.Trim() ?? string.Empty : issue.Fields.Summary ?? issue.Key;