octokit / octokit.net

A GitHub API client library for .NET
https://octokitnet.readthedocs.io/en/latest/
MIT License
2.65k stars 1.08k forks source link

If a folder or file name contains "#", the content cannot be retrieved. #2587

Open minoura-a opened 1 year ago

minoura-a commented 1 year ago

In the following folder structure of GitHub, I tried to get the contents under #aaa1 by specifying "AAA/#aaa1" in the path of Client.GetAllContents().

GitHub
├AAA
│#aaa1
│└││aaa_xxx.xlsx
│#aaa2
└#aaa3
└BBB
  └#bbb1
    └│bbb_xxx.xlsx

I thought I could get #aaa_xxx.xlsx, but #aaa1, #aaa2, and #aaa3 were got. This bug occurs only when the folder or file name contains #.

nickfloyd commented 1 year ago

Hey @minoura-a, Thanks for reporting this ❤️ . We'll prioritize this to be worked on, but feel free to submit a PR for a fix if you have time!

minoura-a commented 1 year ago

Hello @nickfloyd, thank you for your comments. I would like to make a pull request. I think I can solve the problem by URL encoding the #. May I implement a method that specifies the path to a folder or file that encodes #?

nickfloyd commented 1 year ago

Sounds good! Thanks for taking the time to make the fix! ❤️ Go ahead and PR your change, and we'll get it reviewed.

nickfloyd commented 1 year ago

Hey @minoura-a, happy Tuesday!

Just a friendly ping - we're you still planning on giving this fix a shot and submitting a PR?

minoura-a commented 1 year ago

Hello @nickfloyd , thanks for the follow up. Sorry for the delay. I have not taken the time to work on it, but will create a PR. I can create it by the end of next week. Is that OK with you?

nickfloyd commented 1 year ago

Hey @minoura-a, for sure! I just wanted to follow up with you to see if you were still interested. Thank you so much for helping to make our community and this SDK better! ❤️