-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add position property when getting merge request comments (#621)
* Add position property when getting merge request comments * Fix merge requests comments
- Loading branch information
Showing
7 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace NGitLab.Models; | ||
|
||
public class LineRange | ||
{ | ||
[JsonPropertyName("start")] | ||
public Range Start { get; set; } | ||
|
||
[JsonPropertyName("end")] | ||
public Range End { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace NGitLab.Models; | ||
|
||
public class Position | ||
{ | ||
[JsonPropertyName("old_path")] | ||
public string OldPath { get; set; } | ||
|
||
[JsonPropertyName("new_path")] | ||
public string NewPath { get; set; } | ||
|
||
[JsonPropertyName("position_type")] | ||
public DynamicEnum<PositionType> PositionType { get; set; } | ||
|
||
[JsonPropertyName("old_line")] | ||
public int? OldLine { get; set; } | ||
|
||
[JsonPropertyName("new_line")] | ||
public int? NewLine { get; set; } | ||
|
||
[JsonPropertyName("line_range")] | ||
public LineRange LineRange { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace NGitLab.Models; | ||
|
||
public enum PositionType | ||
{ | ||
Text, | ||
Image, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace NGitLab.Models; | ||
|
||
public class Range | ||
{ | ||
[JsonPropertyName("line_code")] | ||
public string LineCode { get; set; } | ||
|
||
[JsonPropertyName("type")] | ||
public DynamicEnum<RangeType> Type { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace NGitLab.Models; | ||
|
||
public enum RangeType | ||
{ | ||
New, | ||
Old, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters