Skip to content

Commit e4dd1b9

Browse files
CopilotMalcolmnixon
andcommitted
Fix code formatting (whitespace) issues
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
1 parent 8ee15f2 commit e4dd1b9

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/DemaConsulting.BuildMark/RepoConnectors/GitHubRepoConnector.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ public override async Task<BuildInformation> GetBuildInformationAsync(DemaConsul
8181
// Build a mapping from commit SHA to pull request.
8282
// This is used to associate commits with their pull requests for change tracking.
8383
var commitHashToPr = BuildCommitToPrMap(pullRequests);
84-
84+
8585
// Build a set of commit SHAs in the current branch.
8686
// This is used for efficient filtering of branch-related tags.
8787
var branchCommitShas = new HashSet<string>(commits.Select(c => c.Sha));
88-
88+
8989
// Build a set of tags filtered to those on the current branch.
9090
// This is used for efficient filtering of branch-related releases.
9191
var branchTagNames = new HashSet<string>(
@@ -153,7 +153,7 @@ public override async Task<BuildInformation> GetBuildInformationAsync(DemaConsul
153153
// Determine the starting release for comparing changes
154154
DemaConsulting.BuildMark.Version? fromTagInfo = null;
155155
string? fromHash = null;
156-
156+
157157
if (releaseVersions.Count > 0)
158158
{
159159
// Find the position of target version in release history
@@ -210,7 +210,7 @@ public override async Task<BuildInformation> GetBuildInformationAsync(DemaConsul
210210
}
211211

212212
// Get commit hash for baseline version if one was found
213-
if (fromTagInfo != null &&
213+
if (fromTagInfo != null &&
214214
tagToRelease.TryGetValue(fromTagInfo.Tag, out var fromRelease) &&
215215
tagsByName.TryGetValue(fromRelease.TagName!, out var fromTagCommit))
216216
{
@@ -232,8 +232,8 @@ public override async Task<BuildInformation> GetBuildInformationAsync(DemaConsul
232232
{
233233
// Find issues that are linked to this PR
234234
// Use Issue.PullRequest.HtmlUrl to match with PullRequest.HtmlUrl
235-
var linkedIssues = issues.Where(i =>
236-
i.State == ItemState.Closed &&
235+
var linkedIssues = issues.Where(i =>
236+
i.State == ItemState.Closed &&
237237
i.PullRequest != null &&
238238
i.PullRequest.HtmlUrl == pr.HtmlUrl).ToList();
239239

@@ -250,7 +250,7 @@ public override async Task<BuildInformation> GetBuildInformationAsync(DemaConsul
250250

251251
allChangeIds.Add(issueId);
252252
var itemInfo = CreateItemInfoFromIssue(issue, pr.Number);
253-
253+
254254
if (itemInfo.Type == "bug")
255255
{
256256
bugs.Add(itemInfo);
@@ -269,7 +269,7 @@ public override async Task<BuildInformation> GetBuildInformationAsync(DemaConsul
269269
{
270270
allChangeIds.Add(prId);
271271
var itemInfo = CreateItemInfoFromPullRequest(pr);
272-
272+
273273
if (itemInfo.Type == "bug")
274274
{
275275
bugs.Add(itemInfo);
@@ -330,7 +330,7 @@ private static async Task<IReadOnlyList<GitHubCommit>> GetAllCommitsAsync(GitHub
330330
private static Dictionary<string, PullRequest> BuildCommitToPrMap(IReadOnlyList<PullRequest> pullRequests)
331331
{
332332
var map = new Dictionary<string, PullRequest>();
333-
333+
334334
foreach (var pr in pullRequests.Where(p => p.Merged && p.MergeCommitSha != null))
335335
{
336336
map[pr.MergeCommitSha] = pr;

test/DemaConsulting.BuildMark.Tests/BuildInformationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@ public async Task BuildInformation_GetBuildInformationAsync_OrdersChangesByIndex
172172
Assert.AreEqual(10, buildInfo.Changes[0].Index);
173173
Assert.AreEqual("#13", buildInfo.Changes[1].Id);
174174
Assert.AreEqual(13, buildInfo.Changes[1].Index);
175-
175+
176176
// Verify Index values are in ascending order
177177
for (var i = 0; i < buildInfo.Changes.Count - 1; i++)
178178
{
179-
Assert.IsLessThanOrEqualTo(buildInfo.Changes[i + 1].Index, buildInfo.Changes[i].Index,
179+
Assert.IsLessThanOrEqualTo(buildInfo.Changes[i + 1].Index, buildInfo.Changes[i].Index,
180180
$"Changes should be ordered by Index. Found {buildInfo.Changes[i].Index} before {buildInfo.Changes[i + 1].Index}");
181181
}
182182
}

0 commit comments

Comments
 (0)