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
Repositories.GetCommitSHA1 doesn't work as expected #39
Comments
Hi @liranelisha , I think I know what the problem is. It should be an easy fix. Let me check a couple of things. Possibly related to last parameters having a forward slash like in: #26 |
Hi @liranelisha , I've found the problem. It was due to the way GH matches request params in the URL. It was a smal change as I knew these edge cases would happen. I'm just finishing implementing some unittests. |
@liranelisha Could you try to use this branch to see if it fixes your problem? #40 The real change was: https://github.com/migueleliasweb/go-github-mock/pull/40/files#diff-de3bdf480ea16b407da4a65310f90bc74c077b9f15f2cfcb54d509c1d65cb894R13 |
Cool, I will create a new release 👍 |
I'm starting to use this awesome mock package, and doing some tests on the different endpoints
I've notices that i can mock
client.Repositories.GetCommitSHA1
using theGetReposCommitsByOwnerByRepoByRef
. At first it worked great, but once i've started to send more complexref
it fell apart.for example
sha, resp, err := ghClient.Repositories.GetCommitSHA1(context.Background(), "gg", "mocked-repo-2", "refs/heads/ddd", "")
panics out. this is due to the
/heads/ddd
is added to the endpoint, and so i'm guessing is not get picked up by the mock implementation....currently i've manually added
but it could be nice if the mock package can solve this
The text was updated successfully, but these errors were encountered: