Skip to content

Commit a362e02

Browse files
authored
Extended Note model with Resolved, ResolvedBy and Position properties. (#133)
1 parent 8767ded commit a362e02

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

src/GitLabApiClient/Models/Notes/Responses/Note.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,15 @@ public sealed class Note : ModifiableObject
2424

2525
[JsonProperty("resolvable")]
2626
public bool Resolvable { get; set; }
27+
28+
[JsonProperty("resolved")]
29+
public bool? Resolved { get; set; }
30+
31+
[JsonProperty("resolved_by")]
32+
public Author ResolvedBy { get; set; }
33+
34+
[JsonProperty("position")]
35+
public Position Position { get; set; }
36+
2737
}
2838
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using Newtonsoft.Json;
2+
3+
namespace GitLabApiClient.Models.Notes.Responses
4+
{
5+
public sealed class Position
6+
{
7+
[JsonProperty("base_sha")]
8+
public string BaseSha { get; set; }
9+
10+
[JsonProperty("start_sha")]
11+
public string StartSha { get; set; }
12+
13+
[JsonProperty("head_sha")]
14+
public string HeadSha { get; set; }
15+
16+
[JsonProperty("position_type")]
17+
public PositionType PositionType { get; set; }
18+
19+
[JsonProperty("old_path")]
20+
public string OldPath { get; set; }
21+
22+
[JsonProperty("new_path")]
23+
public string NewPath { get; set; }
24+
25+
[JsonProperty("old_line")]
26+
public int? OldLine { get; set; }
27+
28+
[JsonProperty("new_line")]
29+
public int? NewLine { get; set; }
30+
31+
}
32+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace GitLabApiClient.Models.Notes.Responses
2+
{
3+
public enum PositionType
4+
{
5+
Text,
6+
Image
7+
}
8+
}

0 commit comments

Comments
 (0)