Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

Commit

Permalink
build: add missing deprecation for find-user-installation
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Apr 18, 2019
1 parent f66d4f5 commit d79523e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/endpoint/overrides/deprecations.js
Expand Up @@ -240,6 +240,7 @@ function deprecations (endpoints) {
// 2019-04-18 Method name changes
// - "Find organization installation" => "Get an organization installation" (find-org-installation => get-org-installation)
// - "Find repository installation" => "Get a repository installation" (find-repo-installation => get-repo-installation)
// - "Find user installation" => "Get a user installation" (find-user-installation => get-user-installation)
const getOrgInstallation = findByRoute(endpoints, 'GET /orgs/:org/installation')
if (getOrgInstallation) {
const deprecated = Object.assign({}, getOrgInstallation)
Expand Down Expand Up @@ -275,6 +276,24 @@ function deprecations (endpoints) {
}
endpoints.push(deprecated)
}

const getUserInstallation = findByRoute(endpoints, 'GET /users/:username/installation')
if (getUserInstallation) {
const deprecated = Object.assign({}, getUserInstallation)
deprecated.name = 'Find repository installation'
deprecated.idName = 'find-user-installation'
deprecated.deprecated = {
date: '2019-04-10',
message: '"Find repository installation" renamed to "Get a repository installation"',
before: {
idName: 'find-user-installation'
},
after: {
idName: 'get-user-installation'
}
}
endpoints.push(deprecated)
}
}

function findByRoute (endpoints, route) {
Expand Down

0 comments on commit d79523e

Please sign in to comment.