[FEAT] Allow users to fetch all commits for two commits comparision (#2690)

This commit is contained in:
Roman
2023-04-14 22:41:24 +04:00
committed by GitHub
parent aed70e335a
commit 7b1fa04b38
6 changed files with 188 additions and 2 deletions
@@ -297,6 +297,28 @@ public class RepositoryCommitsClientTests
Assert.NotNull(sha1);
}
[IntegrationTest]
public async Task CanFetchAllCommitsInComparision()
{
const string @base = "8dcb1db0da7c86596bf1d63631bd335363c64b8c";
const string head = "7349ecd6685c370ba84eb13f4c39f75f33";
var compareResultWithoutOptions = await _fixture.Compare(octokitNetRepositoryId, @base, head);
Assert.Equal(250, compareResultWithoutOptions.Commits.Count);
var compareResult = await _fixture.Compare(octokitNetRepositoryId, @base, head, new ApiOptions { PageSize = 100 });
Assert.Equal(534, compareResult.Commits.Count);
}
[IntegrationTest]
public async Task CanCompareTheSameCommitWithApiOptions()
{
const string head = "7349ecd6685c370ba84eb13f4c39f75f33";
var compareResult = await _fixture.Compare(octokitNetRepositoryId, head, head, new ApiOptions { PageSize = 100 });
Assert.Equal(0, compareResult.Commits.Count);
}
}
public class TestsWithNewRepository : IDisposable
@@ -503,4 +525,4 @@ public class RepositoryCommitsClientTests
_context.Dispose();
}
}
}
}