Skip to content

Commit

Permalink
Fix detailed PipelineSchedule model deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
mlemieuxlafontaine-ubi committed Oct 24, 2024
1 parent 57c85d4 commit ce4b5e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 0 additions & 2 deletions NGitLab.Mock/PipelineScheduleCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public override void Add(PipelineSchedule schedule)
schedule.Id = Server.GetNewPipelineScheduleId();
}

// MLL-TODO Check branch?

base.Add(schedule);
}
}
11 changes: 11 additions & 0 deletions NGitLab/Models/PipelineSchedule.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace NGitLab.Models;

public class PipelineSchedule
{
[JsonPropertyName("id")]
public int Id { get; set; }

[JsonPropertyName("description")]
public string Description { get; set; }

[JsonPropertyName("ref")]
public string Ref { get; set; }

[JsonPropertyName("cron")]
public string Cron { get; set; }

[JsonPropertyName("next_run_at")]
public DateTime NextRunAt { get; set; }

[JsonPropertyName("active")]
public bool Active { get; set; }

[JsonPropertyName("created_at")]
public DateTime CreatedAt { get; set; }

[JsonPropertyName("updated_at")]
public DateTime UpdatedAt { get; set; }

[JsonPropertyName("owner")]
public User Owner { get; set; }

[JsonPropertyName("variables")]
public IEnumerable<PipelineVariable> Variables { get; set; }
}

0 comments on commit ce4b5e2

Please sign in to comment.