Skip to content
Permalink
Browse files

build: add missing deprecation for find-user-installation

  • Loading branch information...
gr2m committed Apr 18, 2019
1 parent f66d4f5 commit d79523e53e6b36fe83b12b5b734838f29254722d
Showing with 19 additions and 0 deletions.
  1. +19 −0 lib/endpoint/overrides/deprecations.js
@@ -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)
@@ -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) {

0 comments on commit d79523e

Please sign in to comment.
You can’t perform that action at this time.