[FEAT]: Escape slash in request parameters to --
#535
Labels
hacktoberfest
Issues for participation in Hacktoberfest
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Feature
New feature or request
What happened?
I'm using
octokit core
inside of a Github Action- and need to pass a string with a slash in it to arequest
. However, when I do, I get an error like this:Error
RequestError [HttpError]: Not Found at /home/runner/work/_actions/texas-mcallen-mission/actions-secret-modifier/v1.0.24/dist/index.js:2655:21 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async boostrap (/home/runner/work/_actions/texas-mcallen-mission/actions-secret-modifier/v1.0.24/dist/index.js:11488:22) { status: 404, response: { url: 'https://api.github.com/repos/texas-mcallen-mission%2Fdeploy-tester/actions/secrets/TESTING_CLASPRC_JSON', status: 404, ...and so on
My code looks something like this:
this should result in a request that looks like so:
/repos/org-name/repository/secrets/chicken_nugget
but instead results in a request that looks like this:repos/org-name%2Frepository/secrets/chicken_nugget
Putting in a hard-coded request works, but in the context of a reusable workflow is not an adequate solution.
Here's a not-very-good attempt at a runkit demo:
https://runkit.com/harrierpigeon/63a23af06795d60008aa45c8
References:
https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#create-or-update-a-repository-secret
Versions
octokit-core.js/4.1.0 Node.js/16.13.0
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: