We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23c3e96 commit 608b400Copy full SHA for 608b400
scripts/generate-routes.js
@@ -1,26 +1,14 @@
1
const camelCase = require('lodash.camelcase')
2
const sortKeys = require('sort-keys')
3
-const routes = require('@octokit/routes')
+const SCIM_ROUTES = require('@octokit/routes').scim
4
5
const newRoutes = {}
6
7
function normalize (methodName) {
8
return camelCase(methodName)
9
}
10
11
-const endpoints = Object.keys(routes).reduce((result, scope) => {
12
- const scopeEndpoints = routes[scope]
13
- scopeEndpoints.forEach(endpoint => {
14
- endpoint.scope = scope
15
- })
16
- return result.concat(scopeEndpoints)
17
-}, [])
18
-
19
-endpoints.forEach(endpoint => {
20
- if (endpoint.scope !== 'scim') {
21
- return
22
- }
23
+SCIM_ROUTES.forEach(endpoint => {
24
const idName = normalize(endpoint.idName)
25
26
// new route
0 commit comments