Skip to content

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

Open
@gr2m

Description

@gr2m

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as documented

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions