@firestartr/cli 1.50.1-snapshot-39 → 1.50.1-snapshot-41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js
CHANGED
|
@@ -298283,16 +298283,18 @@ async function getOctokitForOrg(org, paginated = false, genGithubAppToken = gene
|
|
|
298283
298283
|
});
|
|
298284
298284
|
const options = { auth: auth };
|
|
298285
298285
|
if (paginated) {
|
|
298286
|
-
options.plugins = [dist_bundle_paginateRest];
|
|
298286
|
+
options.plugins = [dist_bundle_paginateRest, paginateGraphQL];
|
|
298287
298287
|
}
|
|
298288
298288
|
const OctokitWithGraphQL = dist_src_Octokit.plugin(paginateGraphQL);
|
|
298289
298289
|
return new OctokitWithGraphQL(options);
|
|
298290
298290
|
}
|
|
298291
298291
|
async function getOctokitFromPat(envVar) {
|
|
298292
|
-
const
|
|
298293
|
-
return new OctokitWithGraphQL({
|
|
298292
|
+
const options = {
|
|
298294
298293
|
auth: process.env[envVar],
|
|
298295
|
-
|
|
298294
|
+
plugins: [dist_bundle_paginateRest, paginateGraphQL],
|
|
298295
|
+
};
|
|
298296
|
+
const OctokitWithGraphQL = dist_src_Octokit.plugin(paginateGraphQL);
|
|
298297
|
+
return new OctokitWithGraphQL(options);
|
|
298296
298298
|
}
|
|
298297
298299
|
/* harmony default export */ const src_auth = ({ getOctokitForOrg });
|
|
298298
298300
|
|
|
@@ -298355,10 +298357,9 @@ async function getOrgInfo(org) {
|
|
|
298355
298357
|
async function getOrgTeamsDirectAccess(org) {
|
|
298356
298358
|
github_src_logger.info(`Getting teams for org ${org}`);
|
|
298357
298359
|
const octokit = await getOctokitForOrg(org);
|
|
298358
|
-
const response = await octokit.graphql.paginate(`
|
|
298359
|
-
|
|
298360
|
-
|
|
298361
|
-
teams(first: 20, after: $cursor) {
|
|
298360
|
+
const response = await octokit.graphql.paginate(`query paginate($cursor: String, $org: String!) {
|
|
298361
|
+
organization(login: $org) {
|
|
298362
|
+
teams(first: 100, after: $cursor) {
|
|
298362
298363
|
nodes {
|
|
298363
298364
|
id
|
|
298364
298365
|
name
|
|
@@ -310743,7 +310744,7 @@ function getClaimPathFromCR(claimsBasePath, cr) {
|
|
|
310743
310744
|
FirestartrGithubRepository: 'components',
|
|
310744
310745
|
FirestartrGithubMembership: 'users',
|
|
310745
310746
|
};
|
|
310746
|
-
return external_path_.join(claimsBasePath, mapCrsToClaims[cr.kind], `${cr.metadata.
|
|
310747
|
+
return external_path_.join(claimsBasePath, mapCrsToClaims[cr.kind], `${cr.metadata.annotations[catalog_common.generic.getFirestartrAnnotation('external-name')]}.yaml`.toLowerCase());
|
|
310747
310748
|
}
|
|
310748
310749
|
function getCrPath(crsBasePath, cr) {
|
|
310749
310750
|
return external_path_.join(crsBasePath, `${cr.kind}.${cr.metadata.name}.yaml`);
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { Octokit } from '@octokit/rest';
|
|
2
2
|
import type { Api } from '@octokit/plugin-rest-endpoint-methods/dist-types/types';
|
|
3
3
|
import type { PaginateInterface } from '@octokit/plugin-paginate-rest/dist-types/types';
|
|
4
|
-
import type { paginateGraphQLInterface } from
|
|
4
|
+
import type { paginateGraphQLInterface } from '@octokit/plugin-paginate-graphql/dist-types/index.js';
|
|
5
5
|
export declare const generateGithubAppToken: (config: any) => Promise<string>;
|
|
6
6
|
export declare function getGithubAppToken(org: string, genGithubAppToken?: any): Promise<string>;
|
|
7
|
-
type
|
|
7
|
+
type ExtendedOctokit = Octokit & Api & {
|
|
8
8
|
paginate: PaginateInterface;
|
|
9
9
|
} & paginateGraphQLInterface;
|
|
10
|
-
export
|
|
11
|
-
export declare function
|
|
10
|
+
export { ExtendedOctokit };
|
|
11
|
+
export declare function getOctokitForOrg(org: string, paginated?: boolean, genGithubAppToken?: any): Promise<ExtendedOctokit>;
|
|
12
|
+
export declare function getOctokitFromPat(envVar: string): Promise<ExtendedOctokit>;
|
|
12
13
|
declare const _default: {
|
|
13
14
|
getOctokitForOrg: typeof getOctokitForOrg;
|
|
14
15
|
};
|