Skip to content

Commit

Permalink
Add FailureReason to JobBasic (#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
mchanyeechoy authored Sep 17, 2024
1 parent c5774b7 commit 16bca23
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NGitLab.Mock/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public sealed class Job : GitLabObject

public bool AllowFailure { get; set; }

public string FailureReason { get; set; }

public User User { get; set; }

public string WebUrl => Server.MakeUrl($"{Project.PathWithNamespace}/-/jobs/{Id.ToString(CultureInfo.InvariantCulture)}");
Expand Down Expand Up @@ -84,6 +86,7 @@ internal Bridge ToBridgeClient()
Duration = Duration,
TagList = TagList,
QueuedDuration = QueuedDuration,
FailureReason = FailureReason,
};
}

Expand Down Expand Up @@ -118,6 +121,7 @@ internal Models.Job ToJobClient()
},
Status = Status,
AllowFailure = AllowFailure,
FailureReason = FailureReason,
Tag = Tag,
User = User?.ToClientUser(),
WebUrl = WebUrl,
Expand Down Expand Up @@ -149,6 +153,7 @@ internal Job Clone()
Duration = Duration,
TagList = TagList,
QueuedDuration = QueuedDuration,
FailureReason = FailureReason,
};
}
}
2 changes: 2 additions & 0 deletions NGitLab.Mock/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,8 @@ NGitLab.Mock.Job.DownstreamPipeline.get -> NGitLab.Mock.Pipeline
NGitLab.Mock.Job.DownstreamPipeline.set -> void
NGitLab.Mock.Job.Duration.get -> float?
NGitLab.Mock.Job.Duration.set -> void
NGitLab.Mock.Job.FailureReason.get -> string
NGitLab.Mock.Job.FailureReason.set -> void
NGitLab.Mock.Job.FinishedAt.get -> System.DateTime
NGitLab.Mock.Job.FinishedAt.set -> void
NGitLab.Mock.Job.Id.get -> int
Expand Down
3 changes: 3 additions & 0 deletions NGitLab/Models/JobBasic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public class JobBasic
[JsonPropertyName("tag_list")]
public string[] TagList { get; set; }

[JsonPropertyName("failure_reason")]
public string FailureReason { get; set; }

public class JobPipeline
{
[JsonPropertyName("id")]
Expand Down
2 changes: 2 additions & 0 deletions NGitLab/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2253,6 +2253,8 @@ NGitLab.Models.JobArtifactQuery.RefName.get -> string
NGitLab.Models.JobArtifactQuery.RefName.set -> void
NGitLab.Models.JobBasic
NGitLab.Models.JobBasic.Commit.get -> NGitLab.Models.Commit
NGitLab.Models.JobBasic.FailureReason.get -> string
NGitLab.Models.JobBasic.FailureReason.set -> void
NGitLab.Models.JobBasic.JobBasic() -> void
NGitLab.Models.JobBasic.JobPipeline.JobPipeline() -> void
NGitLab.Models.JobBasic.JobPipeline.ProjectId.get -> int
Expand Down

0 comments on commit 16bca23

Please sign in to comment.