Skip to content

[BUG]: octokit.rest.apps.getInstallation(installation_id) calls GET /app/installations when it should call GET /app/installations/{installation_id} #779

Description

@kevinwright

What happened?

I first identified the problem when I called octokit.rest.apps.getInstallation, and expected it to return a single Installation instance as per the declared return type.

What I discovered was that the return value breached the return-type contract and instead contained an array of all installations for the app, as per octokit.rest.apps.listInstallations. This then caused a runtime failure due to the conflic between the declared return type and the actual return type.

Further investigation by way of the https://github.com/octokit/plugin-request-log.js plugin confirms that the wrong endpoint is being called.

Versions

octokit.js 4.0.2
@octokit/plugin-rest-endpoint-methods 13.2.6

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as documented

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions