[BUG]: RepositoryContentsClient.GetArchive does not return the expected binary content #2802
Closed
1 task done
Labels
Status: Triage
This is being looked at and prioritized
Type: Bug
Something isn't working as documented
What happened?
This commit which was published in Octokit v8.1.1 introduced a change in
HttpClientAdapter.cs
to return binary content as a stream rather than an array of byte. However, the code in RepositoryContentsClient.GetArchive still expectsbyte[]
and was not adjusted to handle a stream.This problem was not caught in unit testing because none of the tests in
RepositoryContentsClientTests
validate that GetArchive returns the expected array of bytes. I wrote the following unit test to demonstrate the problem. This unit test fails because the response does not contain the expected bytes:I will submit a PR to resolve this problem and ensure that the unit test presented above completes successfully.
Versions
This problem can be observed in Octokit 8.1.1.
I verified 7.1.0, 7.2.0, 8.0.0 and 8.0.1 and they work fine. Meaning: they return the expected array of bytes.
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: