Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 532c04c

Browse files
committed
Don't duplicate DiffLineType information in constructor
1 parent 532063e commit 532c04c

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/GitHub.InlineReviews/Models/InlineCommentThreadModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public InlineCommentThreadModel(
3131
string originalCommitSha,
3232
int originalPosition,
3333
IList<DiffLine> diffMatch,
34-
DiffChangeType diffLineType,
3534
IEnumerable<IPullRequestReviewCommentModel> comments)
3635
{
3736
Guard.ArgumentNotNull(relativePath, nameof(relativePath));
@@ -40,7 +39,7 @@ public InlineCommentThreadModel(
4039

4140
Comments = comments.ToList();
4241
DiffMatch = diffMatch;
43-
DiffLineType = diffLineType;
42+
DiffLineType = diffMatch[0].Type;
4443
OriginalCommitSha = originalCommitSha;
4544
OriginalPosition = originalPosition;
4645
RelativePath = relativePath;

src/GitHub.InlineReviews/Services/PullRequestSessionService.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,11 @@ public IReadOnlyList<IInlineCommentThreadModel> BuildCommentThreads(
9999
continue;
100100
}
101101

102-
var diffLineType = firstLine.Type;
103102
var thread = new InlineCommentThreadModel(
104103
relativePath,
105104
comments.Key.Item1,
106105
comments.Key.Item2,
107106
diffLines,
108-
diffLineType,
109107
comments);
110108
threads.Add(thread);
111109
}

0 commit comments

Comments
 (0)