Skip to content

Commit

Permalink
[feat]: Adding missing properties to PushEventPayload (#2795)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljolley committed Oct 9, 2023
1 parent fdd93c8 commit 7b3abda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Octokit.Tests/Clients/EventsClientTests.cs
Expand Up @@ -6,6 +6,7 @@
using System.Threading.Tasks;
using NSubstitute;
using Octokit.Internal;
using Octokit.Tests.Helpers;
using Xunit;

using static Octokit.Internal.TestSetup;
Expand Down Expand Up @@ -880,6 +881,9 @@ public async Task DeserializesPushEventCorrectly()
head = "head",
@ref = "ref",
size = 1337,
before = "before",
distinct_size = 1337,
push_id = 1337,
commits = new []
{
new
Expand All @@ -902,6 +906,9 @@ public async Task DeserializesPushEventCorrectly()
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]
Expand Down
3 changes: 3 additions & 0 deletions Octokit/Models/Response/ActivityPayloads/PushEventPayload.cs
Expand Up @@ -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; }
Expand Down

0 comments on commit 7b3abda

Please sign in to comment.