octokit / rest.js

GitHub REST API client for JavaScript
https://octokit.github.io/rest.js
MIT License
525 stars 62 forks source link

[BUG]: The placeholders are not replaced for the method getEnvironmentPublicKey #437

Open bogdanmanate-kion opened 3 weeks ago

bogdanmanate-kion commented 3 weeks ago

What happened?

Calling the getEnvironmentPublicKey should return the public key for a specific environment, instead a 404 error code is returned. and it can be seen from the error stack that the placeholders for owner and repo are not replaced. And example can be found here: https://runkit.com/bogdanmanate-kion/666985abdb0e230008ad9ce7

Versions

Octokitjs 20.0.2, Node v18.11.0

Relevant log output

No response

Code of Conduct

github-actions[bot] commented 3 weeks ago

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

gr2m commented 3 weeks ago

repositories/octokit/restjs

this should be /repos/octokit/rest.js, see https://github.com/octokit/plugin-rest-endpoint-methods.js/blob/e96924537da2ff115643efebfb6b58e740a35e38/src/generated/endpoints.ts#L129-L131

bogdanmanate-kion commented 3 weeks ago

@gr2m Yes, that is the endpoint, "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key" from what I see in the error log, only the environment_name is replaced. Please have a look at the provided runkit link.