Skip to content

Commit 3d315b1

Browse files
Copilotdylan-smith
andcommitted
Fix formatting issues - add missing final newlines and apply dotnet format
Co-authored-by: dylan-smith <1508559+dylan-smith@users.noreply.github.com>
1 parent 167fa8a commit 3d315b1

File tree

10 files changed

+13
-16
lines changed

10 files changed

+13
-16
lines changed

src/Octoshift/DependabotAlertState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ public static class DependabotAlertState
2020
public static bool IsValidDismissedReason(string reason) =>
2121
reason?.Trim().ToLower() is
2222
FalsePositive or Inaccurate or NotUsed or NoBandwidth or TolerableRisk;
23-
}
23+
}

src/Octoshift/Models/DependabotAlert.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ public class DependabotAlertSecurityVulnerability
3838
public string Severity { get; set; }
3939
public string VulnerableVersionRange { get; set; }
4040
public string FirstPatchedVersion { get; set; }
41-
}
41+
}

src/Octoshift/Services/DependabotAlertService.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Linq;
33
using System.Threading.Tasks;
44
using Octoshift.Models;
5-
using OctoshiftCLI.Models;
65

76
namespace OctoshiftCLI.Services;
87

@@ -104,4 +103,4 @@ private DependabotAlert FindMatchingTargetAlert(List<DependabotAlert> targetAler
104103
targetAlert.Dependency?.Package == sourceAlert.Dependency?.Package &&
105104
targetAlert.Dependency?.Manifest == sourceAlert.Dependency?.Manifest);
106105
}
107-
}
106+
}

src/OctoshiftCLI.Tests/Octoshift/Services/DependabotAlertServiceTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
using System.Collections.Generic;
21
using System.Linq;
32
using System.Threading.Tasks;
43
using FluentAssertions;
54
using Moq;
65
using Octoshift.Models;
7-
using OctoshiftCLI.Models;
86
using OctoshiftCLI.Services;
97
using Xunit;
108

@@ -280,4 +278,4 @@ await _alertService.Invoking(x => x.MigrateDependabotAlerts(SOURCE_ORG, SOURCE_R
280278
.Should().ThrowAsync<OctoshiftCliException>()
281279
.WithMessage("Migration of Dependabot Alerts failed.");
282280
}
283-
}
281+
}

src/OctoshiftCLI.Tests/Octoshift/Services/GithubApiTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3923,7 +3923,7 @@ public async Task GetDependabotAlertsForRepository_Returns_Correct_Data()
39233923
// Assert
39243924
results.Count().Should().Be(1);
39253925
var alert = results.First();
3926-
3926+
39273927
alert.Number.Should().Be(1);
39283928
alert.State.Should().Be("dismissed");
39293929
alert.DismissedReason.Should().Be("false_positive");
@@ -3933,16 +3933,16 @@ public async Task GetDependabotAlertsForRepository_Returns_Correct_Data()
39333933
alert.HtmlUrl.Should().Be($"https://github.com/{GITHUB_ORG}/{GITHUB_REPO}/security/dependabot/1");
39343934
alert.CreatedAt.Should().NotBeNull();
39353935
alert.UpdatedAt.Should().NotBeNull();
3936-
3936+
39373937
alert.Dependency.Package.Should().Be("lodash");
39383938
alert.Dependency.Manifest.Should().Be("package.json");
39393939
alert.Dependency.Scope.Should().Be("runtime");
3940-
3940+
39413941
alert.SecurityAdvisory.GhsaId.Should().Be("GHSA-1234-5678-9abc");
39423942
alert.SecurityAdvisory.CveId.Should().Be("CVE-2023-1234");
39433943
alert.SecurityAdvisory.Summary.Should().Be("Prototype Pollution in lodash");
39443944
alert.SecurityAdvisory.Severity.Should().Be("high");
3945-
3945+
39463946
alert.SecurityVulnerability.Package.Should().Be("lodash");
39473947
alert.SecurityVulnerability.Severity.Should().Be("high");
39483948
alert.SecurityVulnerability.VulnerableVersionRange.Should().Be("< 4.17.21");

src/OctoshiftCLI.Tests/gei/Commands/MigrateDependabotAlerts/MigrateDependabotAlertsCommandTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ public void Source_Pat_Should_Default_To_Target_Pat()
6666

6767
_mockDependabotAlertServiceFactory.Verify(m => m.Create(It.IsAny<string>(), targetToken, It.IsAny<string>(), targetToken, It.IsAny<bool>()));
6868
}
69-
}
69+
}

src/gei/Commands/MigrateDependabotAlerts/MigrateDependabotAlertsCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ public override MigrateDependabotAlertsCommandHandler BuildHandler(MigrateDepend
9393

9494
return new MigrateDependabotAlertsCommandHandler(log, dependabotAlertService);
9595
}
96-
}
96+
}

src/gei/Commands/MigrateDependabotAlerts/MigrateDependabotAlertsCommandArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ public override void Validate(OctoLogger log)
2727
log?.LogInformation("Since target-repo is not provided, source-repo value will be used for target-repo.");
2828
}
2929
}
30-
}
30+
}

src/gei/Commands/MigrateDependabotAlerts/MigrateDependabotAlertsCommandHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ await _dependabotAlertService.MigrateDependabotAlerts(
3737
_log.LogSuccess($"Dependabot alerts successfully migrated.");
3838
}
3939
}
40-
}
40+
}

src/gei/Factories/DependabotAlertServiceFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ public virtual DependabotAlertService
3434

3535
return new(sourceGithubApi, _targetGithubApiFactory.Create(targetApi, targetToken), _octoLogger);
3636
}
37-
}
37+
}

0 commit comments

Comments
 (0)