40 lines
816 B
C#
40 lines
816 B
C#
namespace Alchegos.Gitea.Webhook.Models;
|
|
using System.Text.Json.Serialization;
|
|
|
|
public class GiteaWebhookPayload
|
|
{
|
|
[JsonPropertyName("repository")]
|
|
public Repository? Repository { get; set; }
|
|
|
|
[JsonPropertyName("pusher")]
|
|
public User? Pusher { get; set; }
|
|
|
|
[JsonPropertyName("commits")]
|
|
public List<CommitInfo>? Commits { get; set; }
|
|
|
|
[JsonPropertyName("head_commit")]
|
|
public CommitInfo? HeadCommit { get; set; }
|
|
|
|
}
|
|
|
|
public class Repository
|
|
{
|
|
[JsonPropertyName("name")]
|
|
public string? Name { get; set; }
|
|
}
|
|
|
|
public class User
|
|
{
|
|
[JsonPropertyName("username")]
|
|
public string? UserName { get; set; }
|
|
}
|
|
|
|
public class CommitInfo
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public string? Id { get; set; }
|
|
|
|
[JsonPropertyName("message")]
|
|
public string? Message { get; set; }
|
|
}
|