diff --git a/src/GitLabApiClient/Models/Issues/Responses/ClosedBy.cs b/src/GitLabApiClient/Models/Issues/Responses/ClosedBy.cs new file mode 100644 index 00000000..887f21de --- /dev/null +++ b/src/GitLabApiClient/Models/Issues/Responses/ClosedBy.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Newtonsoft.Json; + +namespace GitLabApiClient.Models.Issues.Responses +{ + public sealed class ClosedBy : ModifiableObject + { + [JsonProperty("active")] + public string State; + + [JsonProperty("web_url")] + public string WebUrl; + + [JsonProperty("avatar_url")] + public string AvatarUrl; + + [JsonProperty("username")] + public string Username; + + [JsonProperty("id")] + public string Id; + + [JsonProperty("name")] + public string Name; + } +} diff --git a/src/GitLabApiClient/Models/Issues/Responses/Issue.cs b/src/GitLabApiClient/Models/Issues/Responses/Issue.cs index ae7eff55..4e234bb3 100644 --- a/src/GitLabApiClient/Models/Issues/Responses/Issue.cs +++ b/src/GitLabApiClient/Models/Issues/Responses/Issue.cs @@ -38,7 +38,7 @@ public sealed class Issue : ModifiableObject public DateTime? ClosedAt { get; set; } [JsonProperty("closed_by")] - public string ClosedBy { get; set; } + public ClosedBy ClosedBy { get; set; } [JsonProperty("title")] public string Title { get; set; } diff --git a/src/GitLabApiClient/Models/MergeRequests/Responses/MergeRequest.cs b/src/GitLabApiClient/Models/MergeRequests/Responses/MergeRequest.cs index a24c0d8c..c757b695 100644 --- a/src/GitLabApiClient/Models/MergeRequests/Responses/MergeRequest.cs +++ b/src/GitLabApiClient/Models/MergeRequests/Responses/MergeRequest.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using GitLabApiClient.Models.Issues.Responses; using GitLabApiClient.Models.Milestones.Responses; using Newtonsoft.Json; @@ -62,7 +63,7 @@ public sealed class MergeRequest : ModifiableObject public DateTime? ClosedAt { get; set; } [JsonProperty("closed_by")] - public string ClosedBy { get; set; } + public ClosedBy ClosedBy { get; set; } [JsonProperty("target_branch")] public string TargetBranch { get; set; }