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

GetAllContentsByRef doesn't properly handle trailing slash #2243

Closed
jepetty opened this issue Sep 3, 2020 · 0 comments · Fixed by #2486
Closed

GetAllContentsByRef doesn't properly handle trailing slash #2243

jepetty opened this issue Sep 3, 2020 · 0 comments · Fixed by #2486
Labels
Type: Bug Something isn't working as documented

Comments

@jepetty
Copy link

jepetty commented Sep 3, 2020

Hi! We're using Octokit.NET in our service, and we found a bug where it doesn't look like it's properly handling trailing slashes in GetAllContentsByRef. The repo, commitId, and tree we use for testing is vs-threading.

In our first test call, we call:

client.Repository.Content.GetAllContentsByRef("Microsoft", "vs-threading", "src/IsolatedTestHost", "1e187c0a93afb43f08cc36517b44b653a8934b79")

and we get the expected response of 4 files in the tree. When we call it again though but with a trailing slash on our path (like so):

client.Repository.Content.GetAllContentsByRef("Microsoft", "vs-threading", "src/IsolatedTestHost/", "1e187c0a93afb43f08cc36517b44b653a8934b79")

we get an additional file App.Config which does not exist at the commit specified, but does at a later commit.

Looks like somehow the response is coming from the default branch?

@nickfloyd nickfloyd added the bug label Apr 25, 2022
@nickfloyd nickfloyd added Type: Bug Something isn't working as documented and removed category: bug labels Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants