Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config endpoint with url parameter #425

Open
gr2m opened this issue Sep 9, 2021 · 0 comments
Labels
Type: Bug Something isn't working as documented

Comments

@gr2m
Copy link
Contributor

gr2m commented Sep 9, 2021

Follow up to github/docs#9900.

Right now, the following code

await octokit.request('PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config', {
  owner: 'octocat',
  repo: 'hello-world',
  hook_id: 42,
  url: 'url'
})

Sends a PATCH request to /url', because the url parameter overwrites /repos/{owner}/{repo}/hooks/{hook_id}/config from the route option.

I think we should change that behavior. If a route parameter is set, then parameters.url should be passed as query or request body parameter, depending on the method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

2 participants