Skip to content

v3.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 06 Feb 21:13
· 661 commits to beta since this release
cecf68c

Breaking Changes

  • Node 10 is no longer supported.
  • Parameters passed to endpoint methods such as octokit.issues.create(parameters) are no longer validated on the client. We recommend using TypeScript or taking advantage of the TypeScript definitions in JavaScript.
  • All deprecated methods and options have been removed. Upgrade to the latest 2.x.x version and address all deprecation messages for an easy upgrade.
    • For deprecated endpoint methods that have no replacement, you can fall back to octokit.request(). Note that this is only a temporary solution, as the REST API endpoints will be removed in future.
      • octokit.oauthAuthorizations.createAuthorization()
        octokit.request("POST /authorizations", parameters)
        (see deprecation notice)
      • octokit.oauthAuthorizations.deleteAuthorization()
        octokit.request("DELETE /authorizations/:authorization_id", parameters)
        (see deprecation notice)
      • octokit.oauthAuthorizations.deleteGrant()
        octokit.request("DELETE /applications/grants/:grant_id", parameters)
        (see deprecation notice)
      • octokit.oauthAuthorizations.getAuthorization()
        octokit.request("GET /authorizations/:authorization_id", parameters)
        (see deprecation notice)
      • octokit.oauthAuthorizations.getGrant()
        octokit.request("GET /applications/grants/:grant_id", parameters)
        (see deprecation notice)
      • octokit.oauthAuthorizations.getOrCreateAuthorizationForApp()
        octokit.request("PUT /authorizations/clients/:client_id", parameters)
        (see deprecation notice)
      • octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint()
        octokit.request("PUT /authorizations/clients/:client_id/:fingerprint", parameters)
        (see deprecation notice)
      • octokit.oauthAuthorizations.listAuthorizations()
        octokit.request("GET /authorizations", parameters)
        (see deprecation notice)
      • octokit.oauthAuthorizations.listGrants()
        octokit.request("GET /applications/grants", parameters)
        (see deprecation notice)
      • octokit.oauthAuthorizations.updateAuthorization()
        octokit.request("PATCH /authorizations/:authorization_id", parameters)
        (see deprecation notice)
      • octokit.pulls.createFromIssue()
        octokit.request("POST /repos/:owner/:repo/pulls", parameters)
        (see deprecation notice)
      • octokit.repos.getCommitRefSha()
        octokit.request("GET /repos/:owner/:repo/commits/:ref", parameters)
        (see deprecation notice)
      • octokit.teams.addMemberLegacy()
        octokit.request("PUT /teams/:team_id/members/:username", parameters)
        (see deprecation notice)
      • octokit.teams.getLegacy()
        octokit.request("GET /teams/:team_id", parameters)
        (see deprecation notice)
      • octokit.teams.getMemberLegacy()
        octokit.request("GET /teams/:team_id/members/:username", parameters)
        (see deprecation notice)
      • octokit.teams.removeMemberLegacy()
        octokit.request("DELETE /teams/:team_id/members/:username", parameters)
        (see deprecation notice)
    • Methods have been replaced by new ones, some of which require new parameters
      • octokit.apps.checkAuthorization()
        octokit.apps.checkToken()
      • octokit.apps.resetAuthorization()
        octokit.apps.resetToken()
      • octokit.apps.revokeAuthorizationForApplication()
        octokit.apps.deleteToken()
      • octokit.apps.revokeGrantForApplication()
        octokit.apps.deleteAuthorization()
      • octokit.reactions.createForTeamDiscussionLegacy()
        octokit.reactions.createForTeamDiscussionInOrg()
        (An "org" parameter is now required)
      • octokit.reactions.createForTeamDiscussionCommentLegacy()
        octokit.reactions.createForTeamDiscussionCommentInOrg()
        (An "org" parameter is now required)
      • octokit.reactions.listForTeamDiscussionLegacy()
        octokit.reactions.listForTeamDiscussionInOrg()
        (An "org" parameter is now required)
      • octokit.reactions.listForTeamDiscussionCommentLegacy()
        octokit.reactions.listForTeamDiscussionCommentInOrg()
        (An "org" parameter is now required)
      • octokit.teams.addMemberLegacy()
        octokit.teams.addMemberInOrg()
        (An "org" parameter is now required)
      • octokit.teams.addOrUpdateMembershipLegacy()
        octokit.teams.addOrUpdateMembershipInOrg()
        (An "org" parameter is now required)
      • octokit.teams.addOrUpdateProjectLegacy()
        octokit.teams.addOrUpdateProjectInOrg()
        (An "org" parameter is now required)
      • octokit.teams.addOrUpdateRepoLegacy()
        octokit.teams.addOrUpdateRepoInOrg()
        (An "org" parameter is now required)
      • octokit.teams.checkManagesRepoLegacy()
        octokit.teams.checkManagesRepoInOrg()
        (An "org" parameter is now required)
      • octokit.teams.createDiscussionLegacy()
        octokit.teams.createDiscussionInOrg()
        (An "org" parameter is now required)
      • octokit.teams.createDiscussionCommentLegacy()
        octokit.teams.createDiscussionCommentInOrg()
        (An "org" parameter is now required)
      • octokit.teams.deleteLegacy()
        octokit.teams.deleteInOrg()
        (An "org" parameter is now required)
      • octokit.teams.deleteDiscussionLegacy()
        octokit.teams.deleteDiscussionInOrg()
        (An "org" parameter is now required)
      • octokit.teams.deleteDiscussionCommentLegacy()
        octokit.teams.deleteDiscussionCommentInOrg()
        (An "org" parameter is now required)
      • octokit.teams.getLegacy()
        octokit.teams.getInOrg()
        (An "org" parameter is now required)
      • octokit.teams.getDiscussionLegacy()
        octokit.teams.getDiscussionInOrg()
        (An "org" parameter is now required)
      • octokit.teams.getDiscussionCommentLegacy()
        octokit.teams.getDiscussionCommentInOrg()
        (An "org" parameter is now required)
      • octokit.teams.getMemberLegacy()
        octokit.teams.getMemberInOrg()
        (An "org" parameter is now required)
      • octokit.teams.getMembershipLegacy()
        octokit.teams.getMembershipInOrg()
        (An "org" parameter is now required)
      • octokit.teams.listChildLegacy()
        octokit.teams.listChildInOrg()
        (An "org" parameter is now required)
      • octokit.teams.listDiscussionCommentsLegacy()
        octokit.teams.listDiscussionCommentsInOrg()
        (An "org" parameter is now required)
      • octokit.teams.listDiscussionsLegacy()
        octokit.teams.listDiscussionsInOrg()
        (An "org" parameter is now required)
      • octokit.teams.listMembersLegacy()
        octokit.teams.listMembersInOrg()
        (An "org" parameter is now required)
      • octokit.teams.listPendingInvitationsLegacy()
        octokit.teams.listPendingInvitationsInOrg()
        (An "org" parameter is now required)
      • octokit.teams.listProjectsLegacy()
        octokit.teams.listProjectsInOrg()
        (An "org" parameter is now required)
      • octokit.teams.listReposLegacy()
        octokit.teams.listReposInOrg()
        (An "org" parameter is now required)
      • octokit.teams.removeMemberLegacy()
        octokit.teams.removeMemberInOrg()
        (An "org" parameter is now required)
      • octokit.teams.removeMembershipLegacy()
        octokit.teams.removeMembershipInOrg()
        (An "org" parameter is now required)
      • octokit.teams.removeProjectLegacy()
        octokit.teams.removeProjectInOrg()
        (An "org" parameter is now required)
      • octokit.teams.removeRepoLegacy()
        octokit.teams.removeRepoInOrg()
        (An "org" parameter is now required)
      • octokit.teams.reviewProjectLegacy()
        octokit.teams.reviewProjectInOrg()
        (An "org" parameter is now required)
      • octokit.teams.updateLegacy()
        octokit.teams.updateInOrg()
        (An "org" parameter is now required)
      • octokit.teams.updateDiscussionLegacy()
        octokit.teams.updateDiscussionInOrg()
        (An "org" parameter is now required)
      • octokit.teams.updateDiscussionCommentLegacy()
        octokit.teams.updateDiscussionCommentInOrg()
        (An "org" parameter is now required)
      • octokit.issues.updateLabel({current_name, name})
        octokit.issues.updateLabel({name, new_name})
        (current_name is now name, name is now new_name)

Features

  • reduction in bundle size: 15.3kb down to 6.3kB

  • octokit.repos.uploadReleaseAsset(parameters) now accepts URL parameters

    • owner
    • repo
    • release_id

    Passing url will still work, but is not recommended. Use octokit.request instead:

    octokit.request(url, {
      method: "POST",
      ...parameters
    })