[feat]: Adding missing properties to PushEventPayload (#2795)

This commit is contained in:
Michael Jolley
2023-10-09 15:35:41 -05:00
committed by GitHub
parent fdd93c8428
commit 7b3abda711
2 changed files with 10 additions and 0 deletions
@@ -6,6 +6,7 @@ using System.Threading;
using System.Threading.Tasks;
using NSubstitute;
using Octokit.Internal;
using Octokit.Tests.Helpers;
using Xunit;
using static Octokit.Internal.TestSetup;
@@ -880,6 +881,9 @@ namespace Octokit.Tests.Clients
head = "head",
@ref = "ref",
size = 1337,
before = "before",
distinct_size = 1337,
push_id = 1337,
commits = new []
{
new
@@ -902,6 +906,9 @@ namespace Octokit.Tests.Clients
Assert.NotNull(payload.Commits);
Assert.Equal(1, payload.Commits.Count);
Assert.Equal("message", payload.Commits.FirstOrDefault().Message);
Assert.Equal("before", payload.Before);
Assert.Equal(1337, payload.DistinctSize);
Assert.Equal(1337, payload.PushId);
}
[Fact]
@@ -6,6 +6,9 @@ namespace Octokit
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class PushEventPayload : ActivityPayload
{
public int PushId { get; private set; }
public int DistinctSize { get; private set; }
public string Before { get; private set; }
public string Head { get; private set; }
public string Ref { get; private set; }
public int Size { get; private set; }