Skip to content

Commit 27a4523

Browse files
CopilotMalcolmnixon
andcommitted
Address code review feedback - Remove redundant TryGetValue
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
1 parent ab2577f commit 27a4523

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DemaConsulting.BuildMark/RepoConnectors/GitHubRepoConnector.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,11 @@ private static int DetermineSearchStartIndex(int toIndex, int releaseCount)
398398

399399
foreach (var commit in commitsInRange.Where(c => lookupData.CommitHashToPr.ContainsKey(c.Sha)))
400400
{
401-
lookupData.CommitHashToPr.TryGetValue(commit.Sha, out var pr);
401+
var pr = lookupData.CommitHashToPr[commit.Sha];
402402

403403
// Find issue IDs that are linked to this PR using GitHub GraphQL API
404404
// All PRs are also issues, so we need to find the "real" issues (non-PR issues) that link to this PR
405-
var linkedIssueIds = await graphqlClient.FindIssueIdsLinkedToPullRequestAsync(owner, repo, pr!.Number);
405+
var linkedIssueIds = await graphqlClient.FindIssueIdsLinkedToPullRequestAsync(owner, repo, pr.Number);
406406

407407
if (linkedIssueIds.Count > 0)
408408
{

0 commit comments

Comments
 (0)