Skip to content

Commit 1ab864a

Browse files
committed
build(update-endpoints): ignore legacy endpoints unless they are new team legacy endpoints
1 parent c3780f2 commit 1ab864a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

scripts/update-endpoints/code.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ async function generateRoutes() {
2424
ENDPOINTS.concat(WORKAROUNDS).forEach(endpoint => {
2525
const scope = endpoint.scope;
2626

27+
if (endpoint.isLegacy && !/^\/teams\/\{team_id\}/.test(endpoint.url)) {
28+
// ignore legacy endpoints with the exception of the new teams legacy methods
29+
return;
30+
}
31+
2732
if (!newRoutes[scope]) {
2833
newRoutes[scope] = {};
2934
}

scripts/update-endpoints/docs.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ generateRoutes();
1515
async function generateRoutes() {
1616
const examples = ENDPOINTS.concat(WORKAROUNDS)
1717
.map(endpoint => {
18+
if (endpoint.isLegacy && !/^\/teams\/\{team_id\}/.test(endpoint.url)) {
19+
// ignore legacy endpoints with the exception of the new teams legacy methods
20+
return;
21+
}
22+
1823
const paramNames = endpoint.parameters
1924
.filter(parameter => !parameter.alias)
2025
.filter(parameter => !parameter.name.includes("."))

0 commit comments

Comments
 (0)