Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]: Adding missing properties to PushEventPayload #2795

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Octokit.Tests/Clients/EventsClientTests.cs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading