Skip to content

Commit 81cc201

Browse files
CopilotMalcolmnixon
andcommitted
Fix code quality/lint issues: formatting and spelling
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
1 parent 7c05dfc commit 81cc201

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/DemaConsulting.BuildMark/RepoConnectors/GitHubRepoConnector.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public override async Task<List<ItemInfo>> GetChangesBetweenTagsAsync(Version? f
156156
// Parse PR data and extract changes
157157
var changes = new List<ItemInfo>();
158158
var issueNumbers = new HashSet<string>();
159-
var prData = new List<(string number, string title, string url, List<string> issueNums)>();
159+
var prData = new List<(string number, string title, string url, List<string> issueNumbers)>();
160160

161161
// First pass: collect issue numbers and PR data
162162
foreach (var prElement in prArray)
@@ -197,11 +197,11 @@ public override async Task<List<ItemInfo>> GetChangesBetweenTagsAsync(Version? f
197197
{
198198
var issuesOutput = await RunCommandAsync("gh", "issue list --state all --limit 1000 --json number,title,url,labels");
199199
var issuesDoc = JsonDocument.Parse(issuesOutput);
200-
200+
201201
foreach (var issueElement in issuesDoc.RootElement.EnumerateArray())
202202
{
203203
var issueNumber = issueElement.GetProperty("number").GetInt32().ToString();
204-
204+
205205
// Only process issues that are referenced by PRs
206206
if (!issueNumbers.Contains(issueNumber))
207207
{
@@ -270,12 +270,12 @@ public override async Task<List<ItemInfo>> GetChangesBetweenTagsAsync(Version? f
270270
// PR has no issues - need to get labels from the pr list data
271271
// Find the PR element again to get its labels
272272
var prType = "other";
273-
var prElement = prArray.FirstOrDefault(pe =>
274-
pe.TryGetProperty("number", out var numProp) &&
273+
var prElement = prArray.FirstOrDefault(pe =>
274+
pe.TryGetProperty("number", out var numProp) &&
275275
numProp.GetInt32().ToString() == prNumber);
276276

277-
if (prElement.ValueKind != JsonValueKind.Undefined &&
278-
prElement.TryGetProperty("labels", out var labelsElement) &&
277+
if (prElement.ValueKind != JsonValueKind.Undefined &&
278+
prElement.TryGetProperty("labels", out var labelsElement) &&
279279
labelsElement.ValueKind == JsonValueKind.Array)
280280
{
281281
var labels = new List<string>();
@@ -426,7 +426,7 @@ private static string ExtractShasFromCommitsJson(string json)
426426
{
427427
var doc = JsonDocument.Parse(json);
428428
var shas = new List<string>();
429-
429+
430430
foreach (var commit in doc.RootElement.EnumerateArray())
431431
{
432432
if (commit.TryGetProperty("sha", out var shaElement))
@@ -438,7 +438,7 @@ private static string ExtractShasFromCommitsJson(string json)
438438
}
439439
}
440440
}
441-
441+
442442
return string.Join('\n', shas);
443443
}
444444
catch (JsonException)
@@ -458,7 +458,7 @@ private static string ExtractShasFromCompareJson(string json)
458458
{
459459
var doc = JsonDocument.Parse(json);
460460
var shas = new List<string>();
461-
461+
462462
if (doc.RootElement.TryGetProperty("commits", out var commitsElement))
463463
{
464464
foreach (var commit in commitsElement.EnumerateArray())
@@ -473,7 +473,7 @@ private static string ExtractShasFromCompareJson(string json)
473473
}
474474
}
475475
}
476-
476+
477477
return string.Join('\n', shas);
478478
}
479479
catch (JsonException)

test/DemaConsulting.BuildMark.Tests/BuildInformationTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public async Task BuildInformation_CreateAsync_CollectsIssuesCorrectly()
142142
Assert.AreEqual("1", buildInfo.Changes[0].Id);
143143
Assert.AreEqual("Add feature X", buildInfo.Changes[0].Title);
144144
Assert.AreEqual("https://github.com/example/repo/issues/1", buildInfo.Changes[0].Url);
145-
145+
146146
// Second change should be PR #13 (without issues)
147147
Assert.AreEqual("#13", buildInfo.Changes[1].Id);
148148

test/DemaConsulting.BuildMark.Tests/MockRepoConnectorTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ public async Task MockRepoConnector_GetChangesBetweenTagsAsync_IncludesPRsWithou
133133

134134
// Assert - Should have both issue #1 (from PR #10) and PR #13 (without issues)
135135
Assert.HasCount(2, changes);
136-
136+
137137
// First change should be issue #1
138138
Assert.AreEqual("1", changes[0].Id);
139139
Assert.AreEqual("Add feature X", changes[0].Title);
140140
Assert.AreEqual("feature", changes[0].Type);
141-
141+
142142
// Second change should be PR #13
143143
Assert.AreEqual("#13", changes[1].Id);
144144
Assert.AreEqual("PR #13", changes[1].Title);

0 commit comments

Comments
 (0)