@firestartr/cli 2.3.0-snapshot-1 → 2.4.0-snapshot
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 +15 -215
- package/build/packages/cdk8s_renderer/imports/firestartr.dev.d.ts +0 -33
- package/build/packages/cdk8s_renderer/src/claims/base/schemas/index.d.ts +0 -36
- package/build/packages/cdk8s_renderer/src/claims/github/component.schema.d.ts +0 -6
- package/build/packages/cdk8s_renderer/src/claims/github/index.d.ts +0 -36
- package/build/packages/cdk8s_renderer/src/claims/github/repository.d.ts +0 -6
- package/build/packages/gh_provisioner/src/entities/ghrepo/helpers/index.d.ts +0 -1
- package/build/packages/gh_provisioner/src/entities/ghrepo/index.d.ts +1 -0
- package/build/packages/github/index.d.ts +0 -2
- package/build/packages/github/src/repository.d.ts +0 -8
- package/package.json +1 -1
- package/build/packages/cdk8s_renderer/src/claims/github/component.labels.schema.d.ts +0 -32
- package/build/packages/cdk8s_renderer/src/initializers/component_labels.d.ts +0 -11
- package/build/packages/gh_provisioner/src/entities/ghrepo/helpers/labels.d.ts +0 -1
package/build/index.js
CHANGED
|
@@ -284669,16 +284669,6 @@ async function getRepoInfo(owner, name) {
|
|
|
284669
284669
|
const res = await octokit.repos.get({ owner: owner, repo: name });
|
|
284670
284670
|
return res['data'];
|
|
284671
284671
|
}
|
|
284672
|
-
async function repoExists(owner, name) {
|
|
284673
|
-
github_src_logger.info(`Checking if repo exists: ${owner}/${name}`);
|
|
284674
|
-
try {
|
|
284675
|
-
await getRepoInfo(owner, name);
|
|
284676
|
-
return true;
|
|
284677
|
-
}
|
|
284678
|
-
catch (error) {
|
|
284679
|
-
return false;
|
|
284680
|
-
}
|
|
284681
|
-
}
|
|
284682
284672
|
async function getPages(owner, name) {
|
|
284683
284673
|
github_src_logger.info(`Getting pages for ${owner}/${name}`);
|
|
284684
284674
|
const octokit = await getOctokitForOrg(owner);
|
|
@@ -284806,20 +284796,6 @@ async function addCommitStatus(state, sha, repo, owner = 'prefapp', target_url =
|
|
|
284806
284796
|
context,
|
|
284807
284797
|
});
|
|
284808
284798
|
}
|
|
284809
|
-
async function getRepoIssuesLabels(owner, repo) {
|
|
284810
|
-
github_src_logger.info(`Getting issues labels for ${owner}/${repo}`);
|
|
284811
|
-
const octokit = await getOctokitForOrg(owner);
|
|
284812
|
-
const res = await octokit.issues.listLabelsForRepo({
|
|
284813
|
-
owner: owner,
|
|
284814
|
-
repo: repo,
|
|
284815
|
-
});
|
|
284816
|
-
const metadataLabels = res.data.map((label) => ({
|
|
284817
|
-
name: label.name,
|
|
284818
|
-
description: label.description || null,
|
|
284819
|
-
color: label.color,
|
|
284820
|
-
}));
|
|
284821
|
-
return metadataLabels;
|
|
284822
|
-
}
|
|
284823
284799
|
/* harmony default export */ const repository = ({
|
|
284824
284800
|
listReleases,
|
|
284825
284801
|
getReleaseByTag,
|
|
@@ -284828,7 +284804,6 @@ async function getRepoIssuesLabels(owner, repo) {
|
|
|
284828
284804
|
uploadFile,
|
|
284829
284805
|
deleteFile,
|
|
284830
284806
|
getRepoInfo,
|
|
284831
|
-
repoExists,
|
|
284832
284807
|
getPages,
|
|
284833
284808
|
getBranchProtection,
|
|
284834
284809
|
getTeams,
|
|
@@ -284836,7 +284811,6 @@ async function getRepoIssuesLabels(owner, repo) {
|
|
|
284836
284811
|
getOIDCRepo,
|
|
284837
284812
|
addStatusCheck,
|
|
284838
284813
|
addCommitStatus,
|
|
284839
|
-
getRepoIssuesLabels,
|
|
284840
284814
|
});
|
|
284841
284815
|
|
|
284842
284816
|
;// CONCATENATED MODULE: ../github/src/team.ts
|
|
@@ -287937,44 +287911,6 @@ MetadataInitializer.applicableKinds = [
|
|
|
287937
287911
|
];
|
|
287938
287912
|
|
|
287939
287913
|
|
|
287940
|
-
;// CONCATENATED MODULE: ../cdk8s_renderer/src/initializers/component_labels.ts
|
|
287941
|
-
|
|
287942
|
-
class ComponentLabelsInitializer extends InitializerPatches {
|
|
287943
|
-
constructor() {
|
|
287944
|
-
super(...arguments);
|
|
287945
|
-
this.applicableProviders = ['github'];
|
|
287946
|
-
}
|
|
287947
|
-
async __validate() {
|
|
287948
|
-
return true;
|
|
287949
|
-
}
|
|
287950
|
-
async __patches(_claim, _previousCR) {
|
|
287951
|
-
return [
|
|
287952
|
-
{
|
|
287953
|
-
validate(cr) {
|
|
287954
|
-
if (cr.spec.repo.labels) {
|
|
287955
|
-
const visited = {};
|
|
287956
|
-
for (const label of cr.spec.repo.labels) {
|
|
287957
|
-
if (visited[label.name]) {
|
|
287958
|
-
throw `There is already a label called ${label.name} in the ComponentClaim ${cr.metadata.name}. Labels must be unique`;
|
|
287959
|
-
}
|
|
287960
|
-
visited[label.name] = true;
|
|
287961
|
-
}
|
|
287962
|
-
}
|
|
287963
|
-
return true;
|
|
287964
|
-
},
|
|
287965
|
-
apply(cr) {
|
|
287966
|
-
return cr;
|
|
287967
|
-
},
|
|
287968
|
-
identify() {
|
|
287969
|
-
return 'initializers/ComponentLabels';
|
|
287970
|
-
},
|
|
287971
|
-
},
|
|
287972
|
-
];
|
|
287973
|
-
}
|
|
287974
|
-
}
|
|
287975
|
-
ComponentLabelsInitializer.applicableKinds = ['ComponentClaim'];
|
|
287976
|
-
|
|
287977
|
-
|
|
287978
287914
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/initializers/index.ts
|
|
287979
287915
|
|
|
287980
287916
|
|
|
@@ -287986,7 +287922,6 @@ ComponentLabelsInitializer.applicableKinds = ['ComponentClaim'];
|
|
|
287986
287922
|
|
|
287987
287923
|
|
|
287988
287924
|
|
|
287989
|
-
|
|
287990
287925
|
const INITIALIZERS = [
|
|
287991
287926
|
UUIDInitializer,
|
|
287992
287927
|
InitializerClaimRef,
|
|
@@ -287994,7 +287929,6 @@ const INITIALIZERS = [
|
|
|
287994
287929
|
PolicyInitializer,
|
|
287995
287930
|
SyncerInitializer,
|
|
287996
287931
|
MetadataInitializer,
|
|
287997
|
-
ComponentLabelsInitializer,
|
|
287998
287932
|
];
|
|
287999
287933
|
const INITIALIZERS_BY_FILE_NAME = {
|
|
288000
287934
|
[TechnologyInitializer.FILE_NAME()]: TechnologyInitializer,
|
|
@@ -289404,12 +289338,6 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
|
|
|
289404
289338
|
pattern: '^[a-z0-9][a-z0-9-]*$',
|
|
289405
289339
|
},
|
|
289406
289340
|
},
|
|
289407
|
-
labels: {
|
|
289408
|
-
type: 'array',
|
|
289409
|
-
items: {
|
|
289410
|
-
$ref: 'firestartr.dev://github/GithubComponentClaimLabel',
|
|
289411
|
-
},
|
|
289412
|
-
},
|
|
289413
289341
|
overrides: {
|
|
289414
289342
|
type: 'object',
|
|
289415
289343
|
properties: {},
|
|
@@ -289618,40 +289546,6 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
|
|
|
289618
289546
|
},
|
|
289619
289547
|
});
|
|
289620
289548
|
|
|
289621
|
-
;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/github/component.labels.schema.ts
|
|
289622
|
-
|
|
289623
|
-
/* harmony default export */ const component_labels_schema = ({
|
|
289624
|
-
$schema: SCHEMA,
|
|
289625
|
-
$id: 'GithubComponentClaimLabels',
|
|
289626
|
-
definitions: {
|
|
289627
|
-
GithubComponentClaimLabel: {
|
|
289628
|
-
$id: 'firestartr.dev://github/GithubComponentClaimLabel',
|
|
289629
|
-
type: 'object',
|
|
289630
|
-
required: ['name', 'color'],
|
|
289631
|
-
properties: {
|
|
289632
|
-
name: {
|
|
289633
|
-
type: 'string',
|
|
289634
|
-
minLength: 1,
|
|
289635
|
-
maxLength: 50,
|
|
289636
|
-
pattern: '^(?!\\s+$).+$',
|
|
289637
|
-
description: 'Label name (1-50 chars, not only whitespaces)',
|
|
289638
|
-
},
|
|
289639
|
-
color: {
|
|
289640
|
-
type: 'string',
|
|
289641
|
-
pattern: '^[0-9a-fA-F]{6}$',
|
|
289642
|
-
description: 'Color in hexadecimal without # (6 chars)',
|
|
289643
|
-
},
|
|
289644
|
-
description: {
|
|
289645
|
-
type: 'string',
|
|
289646
|
-
maxLength: 100,
|
|
289647
|
-
description: 'Optional label description (max 100 chars)',
|
|
289648
|
-
},
|
|
289649
|
-
},
|
|
289650
|
-
additionalProperties: false,
|
|
289651
|
-
},
|
|
289652
|
-
},
|
|
289653
|
-
});
|
|
289654
|
-
|
|
289655
289549
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/github/index.ts
|
|
289656
289550
|
|
|
289657
289551
|
|
|
@@ -289659,7 +289553,6 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
|
|
|
289659
289553
|
|
|
289660
289554
|
|
|
289661
289555
|
|
|
289662
|
-
|
|
289663
289556
|
const GithubSchemas = [
|
|
289664
289557
|
github_group_schema,
|
|
289665
289558
|
github_user_schema,
|
|
@@ -289667,7 +289560,6 @@ const GithubSchemas = [
|
|
|
289667
289560
|
github_component_schema,
|
|
289668
289561
|
github_orgwebhook_schema,
|
|
289669
289562
|
component_secrets_vars_schema,
|
|
289670
|
-
component_labels_schema,
|
|
289671
289563
|
];
|
|
289672
289564
|
|
|
289673
289565
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/tfworkspaces/terraform.schema.ts
|
|
@@ -293682,7 +293574,6 @@ function toJson_FirestartrGithubRepositorySpecRepo(obj) {
|
|
|
293682
293574
|
'hasWiki': obj.hasWiki,
|
|
293683
293575
|
'pages': obj.pages,
|
|
293684
293576
|
'topics': obj.topics?.map(y => y),
|
|
293685
|
-
'labels': obj.labels?.map(y => toJson_FirestartrGithubRepositorySpecRepoLabels(y)),
|
|
293686
293577
|
'visibility': obj.visibility,
|
|
293687
293578
|
'defaultBranch': obj.defaultBranch,
|
|
293688
293579
|
'additionalBranches': obj.additionalBranches?.map(y => toJson_FirestartrGithubRepositorySpecRepoAdditionalBranches(y)),
|
|
@@ -293829,22 +293720,6 @@ function toJson_FirestartrGithubRepositorySpecFirestartrTechnology(obj) {
|
|
|
293829
293720
|
// filter undefined values
|
|
293830
293721
|
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
293831
293722
|
}
|
|
293832
|
-
/**
|
|
293833
|
-
* Converts an object of type 'FirestartrGithubRepositorySpecRepoLabels' to JSON representation.
|
|
293834
|
-
*/
|
|
293835
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
293836
|
-
function toJson_FirestartrGithubRepositorySpecRepoLabels(obj) {
|
|
293837
|
-
if (obj === undefined) {
|
|
293838
|
-
return undefined;
|
|
293839
|
-
}
|
|
293840
|
-
const result = {
|
|
293841
|
-
'name': obj.name,
|
|
293842
|
-
'color': obj.color,
|
|
293843
|
-
'description': obj.description,
|
|
293844
|
-
};
|
|
293845
|
-
// filter undefined values
|
|
293846
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
293847
|
-
}
|
|
293848
293723
|
/* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
293849
293724
|
/**
|
|
293850
293725
|
* @schema FirestartrGithubRepositorySpecRepoVisibility
|
|
@@ -295840,7 +295715,6 @@ class GithubRepositoryChart extends BaseGithubChart {
|
|
|
295840
295715
|
defaultBranch: claim.providers.github?.branchStrategy?.defaultBranch,
|
|
295841
295716
|
codeowners: createCodeOwnersData(claim),
|
|
295842
295717
|
additionalBranches: claim.providers.github.additionalBranches || [],
|
|
295843
|
-
labels: claim.providers.github.labels || [],
|
|
295844
295718
|
topics: claim.providers.github.topics || [],
|
|
295845
295719
|
},
|
|
295846
295720
|
actions,
|
|
@@ -305768,7 +305642,7 @@ const MODULES = {
|
|
|
305768
305642
|
},
|
|
305769
305643
|
FirestartrGithubRepository: {
|
|
305770
305644
|
module: 'git::https://github.com/prefapp/tfm.git//modules/github-repo',
|
|
305771
|
-
ref: 'feat/
|
|
305645
|
+
ref: 'feat/1195-github-repo-problem-on-github-pages',
|
|
305772
305646
|
},
|
|
305773
305647
|
FirestartrGithubRepositoryFeature: {
|
|
305774
305648
|
module: 'git::https://github.com/prefapp/tfm.git//modules/github-files-set',
|
|
@@ -306362,84 +306236,6 @@ function provisionPermissions(fsGithubRepository) {
|
|
|
306362
306236
|
}
|
|
306363
306237
|
}
|
|
306364
306238
|
|
|
306365
|
-
;// CONCATENATED MODULE: ../gh_provisioner/src/entities/ghrepo/helpers/labels.ts
|
|
306366
|
-
// if we are to provision labels using tofu and the label already
|
|
306367
|
-
// exists, we should not attempt to re-create it. This function checks
|
|
306368
|
-
// if the label exists and if not, creates it. This is needed because
|
|
306369
|
-
// tofu does not have an "upsert" operation for labels, so we need to check
|
|
306370
|
-
// if the label exists before trying to create it, otherwise we will get an error.
|
|
306371
|
-
|
|
306372
|
-
|
|
306373
|
-
|
|
306374
|
-
async function provisionLabels(fsGithubRepository, repoAlreadyExists) {
|
|
306375
|
-
try {
|
|
306376
|
-
const cr = fsGithubRepository.cr;
|
|
306377
|
-
if (cr.spec.repo.labels.length === 0) {
|
|
306378
|
-
return;
|
|
306379
|
-
}
|
|
306380
|
-
if (repoAlreadyExists) {
|
|
306381
|
-
await importLabelsIfNeeded(fsGithubRepository);
|
|
306382
|
-
}
|
|
306383
|
-
const labels = cr.spec.repo.labels;
|
|
306384
|
-
for (const label of labels) {
|
|
306385
|
-
gh_provisioner_src_logger.debug(`[gh-provisioner] ${fsGithubRepository.k8sId} provisioning label ${label.name}`);
|
|
306386
|
-
fsGithubRepository.patchData({
|
|
306387
|
-
op: PatchOperations.add,
|
|
306388
|
-
path: '/config/labels/-',
|
|
306389
|
-
value: {
|
|
306390
|
-
name: label.name,
|
|
306391
|
-
color: label.color,
|
|
306392
|
-
description: label.description,
|
|
306393
|
-
},
|
|
306394
|
-
});
|
|
306395
|
-
}
|
|
306396
|
-
}
|
|
306397
|
-
catch (err) {
|
|
306398
|
-
gh_provisioner_src_logger.error(`[gh-provisioner] ${fsGithubRepository.k8sId} error on provisionLabels: ${err}`);
|
|
306399
|
-
throw new Error(`Error on provisionLabels: ${err}`);
|
|
306400
|
-
}
|
|
306401
|
-
}
|
|
306402
|
-
async function importLabelsIfNeeded(fsGithubRepository) {
|
|
306403
|
-
const cr = fsGithubRepository.cr;
|
|
306404
|
-
try {
|
|
306405
|
-
const labels = cr.spec.repo.labels;
|
|
306406
|
-
const labelsToImport = [];
|
|
306407
|
-
gh_provisioner_src_logger.info(`[gh-provisioner] ${fsGithubRepository.k8sId} checking if labels need to be imported`);
|
|
306408
|
-
const repoIssuesList = await fsGithubRepository.runWithGithubProvider(async () => {
|
|
306409
|
-
return await github.repo.getRepoIssuesLabels(cr.spec.org, cr.name);
|
|
306410
|
-
});
|
|
306411
|
-
// we need to check wether the label exists or not, if it does not exist we need to create it
|
|
306412
|
-
for (const label of labels) {
|
|
306413
|
-
if (checkIfLabelExists(label.name, repoIssuesList)) {
|
|
306414
|
-
continue;
|
|
306415
|
-
}
|
|
306416
|
-
labelsToImport.push({
|
|
306417
|
-
name: label.name,
|
|
306418
|
-
color: label.color,
|
|
306419
|
-
description: label.description,
|
|
306420
|
-
});
|
|
306421
|
-
}
|
|
306422
|
-
for (const label of labelsToImport) {
|
|
306423
|
-
this.patchImportData({
|
|
306424
|
-
op: PatchOperations.add,
|
|
306425
|
-
path: '/imports/-',
|
|
306426
|
-
value: {
|
|
306427
|
-
to: 'github_issue_label.this["' + label.name + '"]',
|
|
306428
|
-
id: `${this.cr.name}:${label.name}`,
|
|
306429
|
-
},
|
|
306430
|
-
});
|
|
306431
|
-
}
|
|
306432
|
-
return labelsToImport;
|
|
306433
|
-
}
|
|
306434
|
-
catch (err) {
|
|
306435
|
-
gh_provisioner_src_logger.error(`[gh-provisioner] ${fsGithubRepository.k8sId} error on importLabelsIfNeeded: ${err}`);
|
|
306436
|
-
throw new Error(`Error on importLabelsIfNeeded: ${err}`);
|
|
306437
|
-
}
|
|
306438
|
-
}
|
|
306439
|
-
function checkIfLabelExists(labelName, repoIssuesList) {
|
|
306440
|
-
return repoIssuesList.some((label) => label.name === labelName);
|
|
306441
|
-
}
|
|
306442
|
-
|
|
306443
306239
|
;// CONCATENATED MODULE: ../gh_provisioner/src/entities/ghrepo/helpers/index.ts
|
|
306444
306240
|
|
|
306445
306241
|
|
|
@@ -306447,7 +306243,6 @@ function checkIfLabelExists(labelName, repoIssuesList) {
|
|
|
306447
306243
|
|
|
306448
306244
|
|
|
306449
306245
|
|
|
306450
|
-
|
|
306451
306246
|
;// CONCATENATED MODULE: ../gh_provisioner/src/entities/ghrepo/post/additional_branches.ts
|
|
306452
306247
|
|
|
306453
306248
|
|
|
@@ -306512,7 +306307,6 @@ async function provisionRegularBranch(repo, branchName, sourceBranch, org) {
|
|
|
306512
306307
|
|
|
306513
306308
|
|
|
306514
306309
|
|
|
306515
|
-
|
|
306516
306310
|
class EntityGHRepo extends base_Entity {
|
|
306517
306311
|
constructor(artifact) {
|
|
306518
306312
|
super(artifact, {
|
|
@@ -306521,24 +306315,19 @@ class EntityGHRepo extends base_Entity {
|
|
|
306521
306315
|
variables: [],
|
|
306522
306316
|
teams: [],
|
|
306523
306317
|
collaborators: [],
|
|
306524
|
-
labels: [],
|
|
306525
306318
|
},
|
|
306526
306319
|
});
|
|
306527
306320
|
}
|
|
306528
306321
|
async loadResources(tfOp) {
|
|
306529
|
-
let repoAlreadyExists = false;
|
|
306530
306322
|
try {
|
|
306531
306323
|
this.synthMessage('Loading resources to Synth...');
|
|
306532
|
-
repoAlreadyExists = (await this.runWithGithubProvider(async () => {
|
|
306533
|
-
return await github.repo.repoExists(this.cr.spec.org, this.cr.name);
|
|
306534
|
-
}));
|
|
306535
306324
|
await this.provisionRepository();
|
|
306325
|
+
await this.provisionPages();
|
|
306536
306326
|
await provisionDefaultBranch(this);
|
|
306537
306327
|
await provisionCodeowners(this);
|
|
306538
306328
|
await provisionVariables(this);
|
|
306539
306329
|
await provisionOIDCSubjectClaim(this);
|
|
306540
306330
|
await provisionPermissions(this);
|
|
306541
|
-
await provisionLabels(this, repoAlreadyExists);
|
|
306542
306331
|
this.synthMessage('Synth finished');
|
|
306543
306332
|
this.synthEnd(JSON.stringify(this.document, null, 2));
|
|
306544
306333
|
}
|
|
@@ -306640,10 +306429,21 @@ class EntityGHRepo extends base_Entity {
|
|
|
306640
306429
|
ignoreVulnerabilityAlertsDuringRead: this.cr.spec.repo.ignoreVulnerabilityAlertsDuringRead,
|
|
306641
306430
|
mergeCommitTitle: this.cr.spec.repo.mergeCommitTitle,
|
|
306642
306431
|
squashMergeCommitMessage: this.cr.spec.repo.squashMergeCommitMessage,
|
|
306643
|
-
pages: this.cr.spec.pages,
|
|
306644
306432
|
},
|
|
306645
306433
|
});
|
|
306646
306434
|
}
|
|
306435
|
+
provisionPages() {
|
|
306436
|
+
if (this.cr.spec.pages) {
|
|
306437
|
+
this.patchData({
|
|
306438
|
+
path: '/config/pages',
|
|
306439
|
+
op: PatchOperations.add,
|
|
306440
|
+
value: {
|
|
306441
|
+
source: this.cr.spec.pages.source,
|
|
306442
|
+
cname: this.cr.spec.pages.cname,
|
|
306443
|
+
},
|
|
306444
|
+
});
|
|
306445
|
+
}
|
|
306446
|
+
}
|
|
306647
306447
|
}
|
|
306648
306448
|
|
|
306649
306449
|
;// CONCATENATED MODULE: ../gh_provisioner/src/entities/ghfeature/helpers/managed_files.ts
|
|
@@ -308737,7 +308537,7 @@ const crs_analyzerSubcommand = {
|
|
|
308737
308537
|
};
|
|
308738
308538
|
|
|
308739
308539
|
;// CONCATENATED MODULE: ./package.json
|
|
308740
|
-
const package_namespaceObject = JSON.parse('{"i8":"2.
|
|
308540
|
+
const package_namespaceObject = JSON.parse('{"i8":"2.4.0-snapshot"}');
|
|
308741
308541
|
;// CONCATENATED MODULE: ../../package.json
|
|
308742
308542
|
const package_namespaceObject_1 = {"i8":"2.2.0"};
|
|
308743
308543
|
;// CONCATENATED MODULE: ./src/subcommands/index.ts
|
|
@@ -1018,12 +1018,6 @@ export interface FirestartrGithubRepositorySpecRepo {
|
|
|
1018
1018
|
* @schema FirestartrGithubRepositorySpecRepo#topics
|
|
1019
1019
|
*/
|
|
1020
1020
|
readonly topics?: string[];
|
|
1021
|
-
/**
|
|
1022
|
-
* Array of labels to create in GitHub
|
|
1023
|
-
*
|
|
1024
|
-
* @schema FirestartrGithubRepositorySpecRepo#labels
|
|
1025
|
-
*/
|
|
1026
|
-
readonly labels?: FirestartrGithubRepositorySpecRepoLabels[];
|
|
1027
1021
|
/**
|
|
1028
1022
|
* @schema FirestartrGithubRepositorySpecRepo#visibility
|
|
1029
1023
|
*/
|
|
@@ -1210,33 +1204,6 @@ export interface FirestartrGithubRepositorySpecFirestartrTechnology {
|
|
|
1210
1204
|
* Converts an object of type 'FirestartrGithubRepositorySpecFirestartrTechnology' to JSON representation.
|
|
1211
1205
|
*/
|
|
1212
1206
|
export declare function toJson_FirestartrGithubRepositorySpecFirestartrTechnology(obj: FirestartrGithubRepositorySpecFirestartrTechnology | undefined): Record<string, any> | undefined;
|
|
1213
|
-
/**
|
|
1214
|
-
* @schema FirestartrGithubRepositorySpecRepoLabels
|
|
1215
|
-
*/
|
|
1216
|
-
export interface FirestartrGithubRepositorySpecRepoLabels {
|
|
1217
|
-
/**
|
|
1218
|
-
* Label name (1-50 characters, not only whitespace)
|
|
1219
|
-
*
|
|
1220
|
-
* @schema FirestartrGithubRepositorySpecRepoLabels#name
|
|
1221
|
-
*/
|
|
1222
|
-
readonly name: string;
|
|
1223
|
-
/**
|
|
1224
|
-
* Hexadecimal color without # (6 characters)
|
|
1225
|
-
*
|
|
1226
|
-
* @schema FirestartrGithubRepositorySpecRepoLabels#color
|
|
1227
|
-
*/
|
|
1228
|
-
readonly color: string;
|
|
1229
|
-
/**
|
|
1230
|
-
* Optional label description (max 100 characters)
|
|
1231
|
-
*
|
|
1232
|
-
* @schema FirestartrGithubRepositorySpecRepoLabels#description
|
|
1233
|
-
*/
|
|
1234
|
-
readonly description?: string;
|
|
1235
|
-
}
|
|
1236
|
-
/**
|
|
1237
|
-
* Converts an object of type 'FirestartrGithubRepositorySpecRepoLabels' to JSON representation.
|
|
1238
|
-
*/
|
|
1239
|
-
export declare function toJson_FirestartrGithubRepositorySpecRepoLabels(obj: FirestartrGithubRepositorySpecRepoLabels | undefined): Record<string, any> | undefined;
|
|
1240
1207
|
/**
|
|
1241
1208
|
* @schema FirestartrGithubRepositorySpecRepoVisibility
|
|
1242
1209
|
*/
|
|
@@ -784,12 +784,6 @@ declare const schemas: {
|
|
|
784
784
|
pattern: string;
|
|
785
785
|
};
|
|
786
786
|
};
|
|
787
|
-
labels: {
|
|
788
|
-
type: string;
|
|
789
|
-
items: {
|
|
790
|
-
$ref: string;
|
|
791
|
-
};
|
|
792
|
-
};
|
|
793
787
|
overrides: {
|
|
794
788
|
type: string;
|
|
795
789
|
properties: {};
|
|
@@ -947,36 +941,6 @@ declare const schemas: {
|
|
|
947
941
|
additionalProperties: boolean;
|
|
948
942
|
};
|
|
949
943
|
};
|
|
950
|
-
} | {
|
|
951
|
-
$schema: string;
|
|
952
|
-
$id: string;
|
|
953
|
-
definitions: {
|
|
954
|
-
GithubComponentClaimLabel: {
|
|
955
|
-
$id: string;
|
|
956
|
-
type: string;
|
|
957
|
-
required: string[];
|
|
958
|
-
properties: {
|
|
959
|
-
name: {
|
|
960
|
-
type: string;
|
|
961
|
-
minLength: number;
|
|
962
|
-
maxLength: number;
|
|
963
|
-
pattern: string;
|
|
964
|
-
description: string;
|
|
965
|
-
};
|
|
966
|
-
color: {
|
|
967
|
-
type: string;
|
|
968
|
-
pattern: string;
|
|
969
|
-
description: string;
|
|
970
|
-
};
|
|
971
|
-
description: {
|
|
972
|
-
type: string;
|
|
973
|
-
maxLength: number;
|
|
974
|
-
description: string;
|
|
975
|
-
};
|
|
976
|
-
};
|
|
977
|
-
additionalProperties: boolean;
|
|
978
|
-
};
|
|
979
|
-
};
|
|
980
944
|
})[] | {
|
|
981
945
|
$id: string;
|
|
982
946
|
definitions: {
|
|
@@ -315,12 +315,6 @@ export declare const GithubSchemas: ({
|
|
|
315
315
|
pattern: string;
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
|
-
labels: {
|
|
319
|
-
type: string;
|
|
320
|
-
items: {
|
|
321
|
-
$ref: string;
|
|
322
|
-
};
|
|
323
|
-
};
|
|
324
318
|
overrides: {
|
|
325
319
|
type: string;
|
|
326
320
|
properties: {};
|
|
@@ -478,34 +472,4 @@ export declare const GithubSchemas: ({
|
|
|
478
472
|
additionalProperties: boolean;
|
|
479
473
|
};
|
|
480
474
|
};
|
|
481
|
-
} | {
|
|
482
|
-
$schema: string;
|
|
483
|
-
$id: string;
|
|
484
|
-
definitions: {
|
|
485
|
-
GithubComponentClaimLabel: {
|
|
486
|
-
$id: string;
|
|
487
|
-
type: string;
|
|
488
|
-
required: string[];
|
|
489
|
-
properties: {
|
|
490
|
-
name: {
|
|
491
|
-
type: string;
|
|
492
|
-
minLength: number;
|
|
493
|
-
maxLength: number;
|
|
494
|
-
pattern: string;
|
|
495
|
-
description: string;
|
|
496
|
-
};
|
|
497
|
-
color: {
|
|
498
|
-
type: string;
|
|
499
|
-
pattern: string;
|
|
500
|
-
description: string;
|
|
501
|
-
};
|
|
502
|
-
description: {
|
|
503
|
-
type: string;
|
|
504
|
-
maxLength: number;
|
|
505
|
-
description: string;
|
|
506
|
-
};
|
|
507
|
-
};
|
|
508
|
-
additionalProperties: boolean;
|
|
509
|
-
};
|
|
510
|
-
};
|
|
511
475
|
})[];
|
|
@@ -29,7 +29,6 @@ export interface IGithubRepositoryClaim extends IComponentClaim {
|
|
|
29
29
|
orphan: boolean;
|
|
30
30
|
}[];
|
|
31
31
|
topics?: string[];
|
|
32
|
-
labels?: IComponentClaimLabel[];
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
34
|
}
|
|
@@ -54,10 +53,5 @@ interface IRepositoryPage {
|
|
|
54
53
|
path: string;
|
|
55
54
|
};
|
|
56
55
|
}
|
|
57
|
-
interface IComponentClaimLabel {
|
|
58
|
-
name: string;
|
|
59
|
-
color: string;
|
|
60
|
-
description?: string;
|
|
61
|
-
}
|
|
62
56
|
export type IComponentClaimOwnerType = 'user' | 'group';
|
|
63
57
|
export {};
|
|
@@ -24,7 +24,6 @@ declare const _default: {
|
|
|
24
24
|
uploadFile: typeof import("./src/repository").uploadFile;
|
|
25
25
|
deleteFile: typeof import("./src/repository").deleteFile;
|
|
26
26
|
getRepoInfo: typeof import("./src/repository").getRepoInfo;
|
|
27
|
-
repoExists: typeof import("./src/repository").repoExists;
|
|
28
27
|
getPages: typeof import("./src/repository").getPages;
|
|
29
28
|
getBranchProtection: typeof import("./src/repository").getBranchProtection;
|
|
30
29
|
getTeams: typeof import("./src/repository").getTeams;
|
|
@@ -32,7 +31,6 @@ declare const _default: {
|
|
|
32
31
|
getOIDCRepo: typeof import("./src/repository").getOIDCRepo;
|
|
33
32
|
addStatusCheck: typeof import("./src/repository").addStatusCheck;
|
|
34
33
|
addCommitStatus: typeof import("./src/repository").addCommitStatus;
|
|
35
|
-
getRepoIssuesLabels: typeof import("./src/repository").getRepoIssuesLabels;
|
|
36
34
|
};
|
|
37
35
|
team: {
|
|
38
36
|
getTeamMembers: typeof import("./src/team").getTeamMembers;
|
|
@@ -800,7 +800,6 @@ export declare function getRepoInfo(owner: string, name: string): Promise<{
|
|
|
800
800
|
[key: string]: unknown;
|
|
801
801
|
};
|
|
802
802
|
}>;
|
|
803
|
-
export declare function repoExists(owner: string, name: string): Promise<boolean>;
|
|
804
803
|
export declare function getPages(owner: string, name: string): Promise<{
|
|
805
804
|
url: string;
|
|
806
805
|
status: "built" | "building" | "errored";
|
|
@@ -1322,11 +1321,6 @@ export declare function uploadFile(destinationPath: string, filePath: string, re
|
|
|
1322
1321
|
export declare function deleteFile(path: string, repo: string, owner?: string, branch?: string, message?: string): Promise<void>;
|
|
1323
1322
|
export declare function addStatusCheck(output: any, is_failure: boolean, head_sha: string, name: string, status: string, repo: string, owner?: string): Promise<void>;
|
|
1324
1323
|
export declare function addCommitStatus(state: commitStatusState, sha: string, repo: string, owner?: string, target_url?: string, description?: string, context?: string): Promise<void>;
|
|
1325
|
-
export declare function getRepoIssuesLabels(owner: string, repo: string): Promise<{
|
|
1326
|
-
name: string;
|
|
1327
|
-
description: string;
|
|
1328
|
-
color: string;
|
|
1329
|
-
}[]>;
|
|
1330
1324
|
declare const _default: {
|
|
1331
1325
|
listReleases: typeof listReleases;
|
|
1332
1326
|
getReleaseByTag: typeof getReleaseByTag;
|
|
@@ -1335,7 +1329,6 @@ declare const _default: {
|
|
|
1335
1329
|
uploadFile: typeof uploadFile;
|
|
1336
1330
|
deleteFile: typeof deleteFile;
|
|
1337
1331
|
getRepoInfo: typeof getRepoInfo;
|
|
1338
|
-
repoExists: typeof repoExists;
|
|
1339
1332
|
getPages: typeof getPages;
|
|
1340
1333
|
getBranchProtection: typeof getBranchProtection;
|
|
1341
1334
|
getTeams: typeof getTeams;
|
|
@@ -1343,6 +1336,5 @@ declare const _default: {
|
|
|
1343
1336
|
getOIDCRepo: typeof getOIDCRepo;
|
|
1344
1337
|
addStatusCheck: typeof addStatusCheck;
|
|
1345
1338
|
addCommitStatus: typeof addCommitStatus;
|
|
1346
|
-
getRepoIssuesLabels: typeof getRepoIssuesLabels;
|
|
1347
1339
|
};
|
|
1348
1340
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
$schema: string;
|
|
3
|
-
$id: string;
|
|
4
|
-
definitions: {
|
|
5
|
-
GithubComponentClaimLabel: {
|
|
6
|
-
$id: string;
|
|
7
|
-
type: string;
|
|
8
|
-
required: string[];
|
|
9
|
-
properties: {
|
|
10
|
-
name: {
|
|
11
|
-
type: string;
|
|
12
|
-
minLength: number;
|
|
13
|
-
maxLength: number;
|
|
14
|
-
pattern: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
color: {
|
|
18
|
-
type: string;
|
|
19
|
-
pattern: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
description: {
|
|
23
|
-
type: string;
|
|
24
|
-
maxLength: number;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
additionalProperties: boolean;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { InitializerPatches } from './base';
|
|
2
|
-
export declare class ComponentLabelsInitializer extends InitializerPatches {
|
|
3
|
-
applicableProviders: string[];
|
|
4
|
-
static applicableKinds: string[];
|
|
5
|
-
__validate(): Promise<boolean>;
|
|
6
|
-
__patches(_claim: any, _previousCR: any): Promise<{
|
|
7
|
-
validate(cr: any): boolean;
|
|
8
|
-
apply(cr: any): any;
|
|
9
|
-
identify(): string;
|
|
10
|
-
}[]>;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function provisionLabels(fsGithubRepository: any, repoAlreadyExists: boolean): Promise<void>;
|