diff --git a/Octokit.Tests.Integration/Clients/RepositoryCommitsClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoryCommitsClientTests.cs index c5a3e3c4d1..c0bf59bcfa 100644 --- a/Octokit.Tests.Integration/Clients/RepositoryCommitsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoryCommitsClientTests.cs @@ -20,6 +20,13 @@ public TestsWithExistingRepositories() _fixture = client.Repository.Commit; } + [IntegrationTest] + public async Task CanGetMergeBaseCommit() + { + var compareResult = await _fixture.Compare("octokit", "octokit.net", "65a22f4d2cff94a286ac3e96440c810c5509196f", "65a22f4d2cff94a286ac3e96440c810c5509196f"); + Assert.NotNull(compareResult.MergeBaseCommit); + } + [IntegrationTest] public async Task CanGetCommit() { diff --git a/Octokit/Models/Response/CompareResult.cs b/Octokit/Models/Response/CompareResult.cs index 38588f38b0..bd47b7ce42 100644 --- a/Octokit/Models/Response/CompareResult.cs +++ b/Octokit/Models/Response/CompareResult.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; @@ -9,7 +10,7 @@ public class CompareResult { public CompareResult() { } - public CompareResult(string url, string htmlUrl, string permalinkUrl, string diffUrl, string patchUrl, GitHubCommit baseCommit, GitHubCommit mergedBaseCommit, string status, int aheadBy, int behindBy, int totalCommits, IReadOnlyList commits, IReadOnlyList files) + public CompareResult(string url, string htmlUrl, string permalinkUrl, string diffUrl, string patchUrl, GitHubCommit baseCommit, GitHubCommit mergeBaseCommit, string status, int aheadBy, int behindBy, int totalCommits, IReadOnlyList commits, IReadOnlyList files) { Url = url; HtmlUrl = htmlUrl; @@ -17,7 +18,7 @@ public CompareResult(string url, string htmlUrl, string permalinkUrl, string dif DiffUrl = diffUrl; PatchUrl = patchUrl; BaseCommit = baseCommit; - MergedBaseCommit = mergedBaseCommit; + MergeBaseCommit = mergeBaseCommit; Status = status; AheadBy = aheadBy; BehindBy = behindBy; @@ -32,7 +33,9 @@ public CompareResult(string url, string htmlUrl, string permalinkUrl, string dif public string DiffUrl { get; protected set; } public string PatchUrl { get; protected set; } public GitHubCommit BaseCommit { get; protected set; } + [Obsolete("This property is obsolete. Use MergeBaseCommit instead.", false)] public GitHubCommit MergedBaseCommit { get; protected set; } + public GitHubCommit MergeBaseCommit { get; protected set; } public string Status { get; protected set; } public int AheadBy { get; protected set; } public int BehindBy { get; protected set; }