You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's have repo "Test_Repo" of "Programmer" owner with following structure:
/src
--/back-end
----code.cs
Let's have 2 branches of this repo: main and dev.
I want to get contents of "src/back-end" folder in "dev" branch.
I call the method with following arguments: "Programmer", "Test_Repo", "src/back-end", "dev".
OK, it returns actual file from dev branch.
But if I pass "src/back-end/" (path ends with slash) then I will get the file from main branch.
As traced with Fiddler, in the second scenario the built URL is ...src/back-end/?ref=dev and the lib sees that it is strange and performs request to check if such resource exists. Obviously it is not found and then it simply throws out ref parameter value and executes request for main branch.
Probably would be better to trim path parameter value in such case.
The text was updated successfully, but these errors were encountered:
The issue was observed on method specified below but would be also produced on some similar methods.
Task<IReadOnlyList> GetAllContentsByRef(string owner, string name, string path, string reference);
Let's have repo "Test_Repo" of "Programmer" owner with following structure:
/src
--/back-end
----code.cs
Let's have 2 branches of this repo: main and dev.
I want to get contents of "src/back-end" folder in "dev" branch.
I call the method with following arguments: "Programmer", "Test_Repo", "src/back-end", "dev".
OK, it returns actual file from dev branch.
But if I pass "src/back-end/" (path ends with slash) then I will get the file from main branch.
As traced with Fiddler, in the second scenario the built URL is ...src/back-end/?ref=dev and the lib sees that it is strange and performs request to check if such resource exists. Obviously it is not found and then it simply throws out ref parameter value and executes request for main branch.
Probably would be better to trim path parameter value in such case.
The text was updated successfully, but these errors were encountered: