[BUG]: Path gets URL-encoded when using fine-grained tokens #2422
Labels
hacktoberfest
Issues for participation in Hacktoberfest
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Bug
Something isn't working as documented
What happened?
When using
octokit.rest.repos.getContent
likeusing a classic PAT that looks like
ghp_[REDACTED]
, it works as expected. However, I want to use a fine-grained token with read access to just the repo I need content from for security reasons. When I do exactly the same call as above but substituting a fine-grained PAT that looks likegithub_pat_[REDACTED]
, I get aRequestError [HttpError]: Not Found
. When I log the response I note that therequest
field looks like:It seems that for some reason, using a fine-grained PAT causes
getContent
to go down a branch which URL-encodespath
.Versions
Octokit.js v2.0.14, Node v18.13.0
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: