Skip to content

Methods for alternative org routes #15

@jeffwilcox

Description

@jeffwilcox

With the move in the latest releases to begin legacy deprecation of a few of the get-by-ID style APIs such as teams.getLegacy, I'm wondering what the maintainers think about exposing officially the newer org-based get by ID routes directly?

While there is some prior history in this project around the /repositories/:id endpoint that was not officially documented (see: #163), the newer routes such as GET /organizations/:org_id/team/:team_id are mentioned in the official documentation for the APIs such as "Get team by name" at https://developer.github.com/v3/teams/#get-team-by-name.

As a GitHub App developer, we're often having to worry about multi-hop resolutions to accommodate renames of teams, repos and other assets, and even orgs, so being able to directly hit ID-based routes by org ID and team ID drastically reduces errors and the need to implement eventual consistency checks that look for renamed slugs, names, etc.

Obviously not a blocker, since we can still directly call the routes from Octokit rest.js without an actual named method; however, it's possible that other app developers adopting this library may use the numeric ID-based routes if the methods were exposed, potentially yielding less errors or end user experience issues.

There may be prior conversations documented elsewhere (there's mention of "consensus around ID names" in https://github.com/octokit/rest.js/issues/886) but I can't find more context.

Thanks for your thoughts. Happy to help expose the methods if there is interest in this; otherwise, this issue, when closed with comments, can help provide historical context for others who have the same question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: BlockedSome technical or requirement is blocking the issueType: SupportAny questions, information, or general needs around the SDK or GitHub APIs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions