@firestartr/cli 2.11.0-snapshot-features-traceability-01 → 2.11.0-snapshot-import-filter-fix-2
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 +33 -164
- package/build/packages/cdk8s_renderer/src/claims/github/repositoryFeature.d.ts +0 -3
- package/build/packages/features_preparer/src/installer.d.ts +0 -4
- package/build/packages/features_renderer/src/auxiliar.d.ts +0 -11
- package/build/packages/github/src/check_run.d.ts +0 -12
- package/build/packages/github/src/with_profile.d.ts +0 -1
- package/build/packages/importer/src/decanter/collections.d.ts +1 -1
- package/build/packages/importer/src/decanter/gh/github_org_settings_collection.d.ts +2 -1
- package/build/packages/operator/src/user-feedback-ops/user-feedback-ops.d.ts +0 -24
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -134117,7 +134117,6 @@ class GithubCheckRun {
|
|
|
134117
134117
|
this.pullNumber = params.pullNumber;
|
|
134118
134118
|
this.includeCheckRunComment = Boolean(params.includeCheckRunComment);
|
|
134119
134119
|
this.checkRunComment = params.checkRunComment;
|
|
134120
|
-
this.stickyCommentBaseKind = params.stickyCommentBaseKind;
|
|
134121
134120
|
this.buffer = new CheckRunBuffer('', (data) => this.__updateCheckRun(data).catch(() => { }), { intervalSec: FLUSH_TIMEOUT });
|
|
134122
134121
|
}
|
|
134123
134122
|
/**
|
|
@@ -134189,13 +134188,7 @@ class GithubCheckRun {
|
|
|
134189
134188
|
text,
|
|
134190
134189
|
},
|
|
134191
134190
|
});
|
|
134192
|
-
|
|
134193
|
-
// same base kind is always the last word: close() performs no sticky
|
|
134194
|
-
// rewrite (it could otherwise land after the result publish on error
|
|
134195
|
-
// paths and clobber it with a stale progress comment).
|
|
134196
|
-
if (this.includeCheckRunComment &&
|
|
134197
|
-
this.pullNumber !== undefined &&
|
|
134198
|
-
!this.stickyCommentBaseKind) {
|
|
134191
|
+
if (this.includeCheckRunComment && this.pullNumber !== undefined) {
|
|
134199
134192
|
try {
|
|
134200
134193
|
await this.__ensureAndUpdateStickyComment(this.__buildCheckRunUrl());
|
|
134201
134194
|
this.hasCommented = true;
|
|
@@ -134260,14 +134253,7 @@ class GithubCheckRun {
|
|
|
134260
134253
|
text,
|
|
134261
134254
|
},
|
|
134262
134255
|
});
|
|
134263
|
-
|
|
134264
|
-
// base kind the result publisher must be the last word, so an in-flight
|
|
134265
|
-
// progress upsert must not land after it. Legacy flows (no shared base
|
|
134266
|
-
// kind) keep their current behavior.
|
|
134267
|
-
const closedMidFlight = this.stickyCommentBaseKind && (this.closed || this.closing);
|
|
134268
|
-
if (this.includeCheckRunComment &&
|
|
134269
|
-
this.pullNumber !== undefined &&
|
|
134270
|
-
!closedMidFlight) {
|
|
134256
|
+
if (this.includeCheckRunComment && this.pullNumber !== undefined) {
|
|
134271
134257
|
try {
|
|
134272
134258
|
await this.__ensureAndUpdateStickyComment(this.__buildCheckRunUrl());
|
|
134273
134259
|
}
|
|
@@ -134314,7 +134300,7 @@ class GithubCheckRun {
|
|
|
134314
134300
|
owner: this.owner,
|
|
134315
134301
|
repo: this.repo,
|
|
134316
134302
|
pullNumber: this.pullNumber,
|
|
134317
|
-
baseKind:
|
|
134303
|
+
baseKind: `check-run:${this.name}`,
|
|
134318
134304
|
bodies: [linkLine],
|
|
134319
134305
|
});
|
|
134320
134306
|
}
|
|
@@ -134352,7 +134338,6 @@ async function createCheckRunForOrg(org, owner, repo, name, opts) {
|
|
|
134352
134338
|
pullNumber: opts?.pullNumber,
|
|
134353
134339
|
includeCheckRunComment: Boolean(opts?.includeCheckRunComment),
|
|
134354
134340
|
checkRunComment: opts?.checkRunComment,
|
|
134355
|
-
stickyCommentBaseKind: opts?.stickyCommentBaseKind,
|
|
134356
134341
|
});
|
|
134357
134342
|
}
|
|
134358
134343
|
async function createCheckRun(owner, repo, name, opts) {
|
|
@@ -134805,7 +134790,6 @@ function createFacade(profileName) {
|
|
|
134805
134790
|
pullNumber: opts?.pullNumber,
|
|
134806
134791
|
includeCheckRunComment: Boolean(opts?.includeCheckRunComment),
|
|
134807
134792
|
checkRunComment: opts?.checkRunComment,
|
|
134808
|
-
stickyCommentBaseKind: opts?.stickyCommentBaseKind,
|
|
134809
134793
|
});
|
|
134810
134794
|
},
|
|
134811
134795
|
CheckRun: CheckRun,
|
|
@@ -166150,19 +166134,12 @@ function addTraceability(context, src, content) {
|
|
|
166150
166134
|
}
|
|
166151
166135
|
function addTraceabilityStamp(context, content) {
|
|
166152
166136
|
const traceability = context.traceability || {};
|
|
166153
|
-
const
|
|
166154
|
-
|
|
166155
|
-
|
|
166156
|
-
|
|
166157
|
-
|
|
166158
|
-
|
|
166159
|
-
if (traceability.sha) {
|
|
166160
|
-
stampLines.push(`# FEATURE_GIT_SHA: "${traceability.sha}"`);
|
|
166161
|
-
}
|
|
166162
|
-
if (Array.isArray(traceability.tags) && traceability.tags.length > 0) {
|
|
166163
|
-
stampLines.push(`# FEATURE_GIT_TAGS: [${traceability.tags.join(', ')}]`);
|
|
166164
|
-
}
|
|
166165
|
-
const stamp = `${stampLines.join('\n')}\n\n`;
|
|
166137
|
+
const stamp = `---
|
|
166138
|
+
# FEATURE_NAME: ${traceability.name}
|
|
166139
|
+
# FEATURE_VERSION: ${traceability.version}
|
|
166140
|
+
# FEATURE_URL: ${traceability.url}
|
|
166141
|
+
|
|
166142
|
+
`;
|
|
166166
166143
|
const output = [];
|
|
166167
166144
|
let replaced = false;
|
|
166168
166145
|
for (const line of content.split(/\n/)) {
|
|
@@ -166331,7 +166308,6 @@ function buildExpectedOutput(config, renderDir) {
|
|
|
166331
166308
|
return {
|
|
166332
166309
|
files,
|
|
166333
166310
|
patches: config.patches || [],
|
|
166334
|
-
traceability: {},
|
|
166335
166311
|
};
|
|
166336
166312
|
}
|
|
166337
166313
|
/* ---------- Context-style API for a render temp dir ---------- */
|
|
@@ -166502,7 +166478,6 @@ function render(featurePath, featureRenderPath, entity, firestartrConfig = {}, f
|
|
|
166502
166478
|
// Not used anymore
|
|
166503
166479
|
// output.unpatches = context.config.unpatches
|
|
166504
166480
|
});
|
|
166505
|
-
output.traceability = context.traceability;
|
|
166506
166481
|
external_fs_default().writeFileSync(external_path_default().join(featureRenderPath, 'config.json'), JSON.stringify(context.config));
|
|
166507
166482
|
// write the output file
|
|
166508
166483
|
const configFile = external_path_default().join(featureRenderPath, 'output.json');
|
|
@@ -166742,54 +166717,8 @@ featureArgs = {}, repo = 'features', owner = 'prefapp') {
|
|
|
166742
166717
|
ref: reference,
|
|
166743
166718
|
url: `https://github.com/${owner}/${repo}/tree/${reference}/packages/${featureName}`,
|
|
166744
166719
|
};
|
|
166745
|
-
const commitInfo = await resolveFeatureCommit(owner, repo, reference);
|
|
166746
|
-
featureArgs['traceability'].sha = commitInfo.sha;
|
|
166747
|
-
featureArgs['traceability'].tags = commitInfo.tags;
|
|
166748
166720
|
return renderFeature(featureName, reference, owner, repo, featureOwner, '/tmp', featureArgs);
|
|
166749
166721
|
}
|
|
166750
|
-
async function resolveFeatureCommit(owner, repo, reference) {
|
|
166751
|
-
try {
|
|
166752
|
-
const octokit = await github["default"].getOctokitForOrg(owner);
|
|
166753
|
-
// Get the resolved commit SHA
|
|
166754
|
-
const { data: commit } = await octokit.rest.repos.getCommit({
|
|
166755
|
-
owner,
|
|
166756
|
-
repo,
|
|
166757
|
-
ref: reference,
|
|
166758
|
-
});
|
|
166759
|
-
const sha = commit.sha;
|
|
166760
|
-
// Get all tags pointing to this commit.
|
|
166761
|
-
// Tag enumeration is wrapped separately so a pagination failure
|
|
166762
|
-
// still returns the successfully resolved SHA.
|
|
166763
|
-
const tags = [];
|
|
166764
|
-
try {
|
|
166765
|
-
let page = 1;
|
|
166766
|
-
while (true) {
|
|
166767
|
-
const { data: tagList } = await octokit.rest.repos.listTags({
|
|
166768
|
-
owner,
|
|
166769
|
-
repo,
|
|
166770
|
-
per_page: 100,
|
|
166771
|
-
page,
|
|
166772
|
-
});
|
|
166773
|
-
const matchingTags = tagList.filter((t) => t.commit?.sha === sha);
|
|
166774
|
-
tags.push(...matchingTags.map((t) => t.name));
|
|
166775
|
-
if (tagList.length < 100)
|
|
166776
|
-
break;
|
|
166777
|
-
page++;
|
|
166778
|
-
}
|
|
166779
|
-
}
|
|
166780
|
-
catch (tagError) {
|
|
166781
|
-
// Clear partial results so consumers don't publish an incomplete
|
|
166782
|
-
// tag set as if it were the full list.
|
|
166783
|
-
tags.length = 0;
|
|
166784
|
-
features_preparer_src_logger.warn(`[features_preparer] Failed to list tags for ${owner}/${repo}@${reference}: ${tagError instanceof Error ? tagError.message : String(tagError)}`);
|
|
166785
|
-
}
|
|
166786
|
-
return { sha, tags };
|
|
166787
|
-
}
|
|
166788
|
-
catch (error) {
|
|
166789
|
-
features_preparer_src_logger.warn(`[features_preparer] Failed to resolve commit for ${owner}/${repo}@${reference}: ${error instanceof Error ? error.message : String(error)}`);
|
|
166790
|
-
return { sha: '', tags: [] };
|
|
166791
|
-
}
|
|
166792
|
-
}
|
|
166793
166722
|
async function prepareFeature(featureName, version, repo = 'features', owner = 'prefapp') {
|
|
166794
166723
|
await downloadFeatureZip(repo, featureName, version, owner);
|
|
166795
166724
|
}
|
|
@@ -166875,20 +166804,11 @@ async function utils_renderFeature(featureName, featureVersion, featureOutputObj
|
|
|
166875
166804
|
files.push({ path, userManaged, content, targetBranch });
|
|
166876
166805
|
}
|
|
166877
166806
|
const featName = catalog_common/* default.generic.normalizeName */.Z.generic.normalizeName(`${featureName}-${cr.spec.firestartr.tfStateKey}`);
|
|
166878
|
-
const traceability = featureOutputObject.traceability || {};
|
|
166879
166807
|
return {
|
|
166880
166808
|
kind: 'GithubRepositoryFeatureClaim',
|
|
166881
166809
|
version: '1.0.0',
|
|
166882
166810
|
name: featName,
|
|
166883
|
-
feature: {
|
|
166884
|
-
name: featureName,
|
|
166885
|
-
version: featureVersion,
|
|
166886
|
-
ref: traceability.ref,
|
|
166887
|
-
repo: traceability.repo,
|
|
166888
|
-
sha: traceability.sha,
|
|
166889
|
-
tags: traceability.tags,
|
|
166890
|
-
url: traceability.url,
|
|
166891
|
-
},
|
|
166811
|
+
feature: { name: featureName, version: featureVersion },
|
|
166892
166812
|
firestartr: { tfStateKey: cr.spec.firestartr.tfStateKey },
|
|
166893
166813
|
files,
|
|
166894
166814
|
claimRepoName,
|
|
@@ -170761,23 +170681,6 @@ class FeatureRepoChart extends BaseGithubChart {
|
|
|
170761
170681
|
annotations: {
|
|
170762
170682
|
'firestartr.dev/external-name': claim.name,
|
|
170763
170683
|
'firestartr.dev/feature-name': claim.feature.name,
|
|
170764
|
-
...(claim.feature.sha
|
|
170765
|
-
? { 'firestartr.dev/feature-git-sha': claim.feature.sha }
|
|
170766
|
-
: {}),
|
|
170767
|
-
...(claim.feature.tags && claim.feature.tags.length > 0
|
|
170768
|
-
? {
|
|
170769
|
-
'firestartr.dev/feature-git-tags': JSON.stringify(claim.feature.tags),
|
|
170770
|
-
}
|
|
170771
|
-
: {}),
|
|
170772
|
-
...(claim.feature.url
|
|
170773
|
-
? { 'firestartr.dev/feature-url': claim.feature.url }
|
|
170774
|
-
: {}),
|
|
170775
|
-
...(claim.feature.ref
|
|
170776
|
-
? { 'firestartr.dev/feature-ref': claim.feature.ref }
|
|
170777
|
-
: {}),
|
|
170778
|
-
...(claim.feature.repo
|
|
170779
|
-
? { 'firestartr.dev/feature-repo': claim.feature.repo }
|
|
170780
|
-
: {}),
|
|
170781
170684
|
},
|
|
170782
170685
|
},
|
|
170783
170686
|
spec: {
|
|
@@ -173506,25 +173409,23 @@ class CollectionMixins {
|
|
|
173506
173409
|
async filter(kind, filters, elementList) {
|
|
173507
173410
|
if (filters.length === 0)
|
|
173508
173411
|
return elementList;
|
|
173412
|
+
let filteredList = elementList;
|
|
173509
173413
|
if (this.IS_FILTER_BY_NAME_SET(filters, kind)) {
|
|
173510
|
-
|
|
173511
|
-
const result = elementList.filter((el) => names.indexOf(el) !== -1);
|
|
173512
|
-
return result;
|
|
173513
|
-
});
|
|
173414
|
+
filteredList = this.FILTER_BY_NAME_APPLY(filters, kind, (names) => filteredList.filter((el) => names.indexOf(el) !== -1));
|
|
173514
173415
|
}
|
|
173515
|
-
if (this.IS_FILTER_BY_REGEXP_SET(filters, kind)) {
|
|
173516
|
-
|
|
173517
|
-
return
|
|
173416
|
+
else if (this.IS_FILTER_BY_REGEXP_SET(filters, kind)) {
|
|
173417
|
+
filteredList = this.FILTER_BY_REGEXP_APPLY(filters, kind, (nameRegExp) => {
|
|
173418
|
+
return filteredList.filter((el) => nameRegExp.test(el));
|
|
173518
173419
|
});
|
|
173519
173420
|
}
|
|
173520
173421
|
if (this.IS_FILTER_BY_FUNCTION_SET(filters, kind)) {
|
|
173521
|
-
await this.FILTER_BY_FUNCTION_APPLY(filters, kind, async (fn) => {
|
|
173522
|
-
|
|
173422
|
+
filteredList = await this.FILTER_BY_FUNCTION_APPLY(filters, kind, async (fn) => {
|
|
173423
|
+
return (await Promise.all(filteredList.map(async (el) => {
|
|
173523
173424
|
return (await fn(kind, el)) ? el : undefined;
|
|
173524
173425
|
}))).filter((el) => el !== undefined);
|
|
173525
173426
|
});
|
|
173526
173427
|
}
|
|
173527
|
-
return
|
|
173428
|
+
return filteredList;
|
|
173528
173429
|
}
|
|
173529
173430
|
}
|
|
173530
173431
|
|
|
@@ -174224,6 +174125,12 @@ const CHILD_CR_KINDS = [
|
|
|
174224
174125
|
'FirestartrGithubRepositorySecretsSection',
|
|
174225
174126
|
'FirestartrGithubRepositoryFeature',
|
|
174226
174127
|
];
|
|
174128
|
+
const MAP_COLLECTION_KIND_CR_KIND = {
|
|
174129
|
+
'gh-repo': 'FirestartrGithubRepository',
|
|
174130
|
+
'gh-group': 'FirestartrGithubGroup',
|
|
174131
|
+
'gh-members': 'FirestartrGithubMembership',
|
|
174132
|
+
'gh-org-settings': 'FirestartrGithubOrganizationSettings',
|
|
174133
|
+
};
|
|
174227
174134
|
let previousCRs = {};
|
|
174228
174135
|
const collections = {
|
|
174229
174136
|
GroupCollectionGithubDecanter: github_group_collection,
|
|
@@ -174232,7 +174139,10 @@ const collections = {
|
|
|
174232
174139
|
RepoCollectionGithubDecanter: github_repo_collection,
|
|
174233
174140
|
};
|
|
174234
174141
|
function isInPreviousCRs(kind, name) {
|
|
174235
|
-
|
|
174142
|
+
const crKind = MAP_COLLECTION_KIND_CR_KIND[kind];
|
|
174143
|
+
if (!crKind)
|
|
174144
|
+
return false;
|
|
174145
|
+
return `${crKind}-${name}` in previousCRs;
|
|
174236
174146
|
}
|
|
174237
174147
|
const randomFolder = external_path_.join('/tmp', `claims_${catalog_common/* default.generic.randomString */.Z.generic.randomString(10)}`);
|
|
174238
174148
|
const tmpRenderedCrsPath = external_path_.join('/tmp', '.resources');
|
|
@@ -174618,11 +174528,6 @@ async function reimporter_isDirectory(path) {
|
|
|
174618
174528
|
|
|
174619
174529
|
|
|
174620
174530
|
|
|
174621
|
-
// const MAP_COLLECTION_KIND_CR_KIND: any = {
|
|
174622
|
-
// gh-members: 'FirestartrGithubMembership',
|
|
174623
|
-
// gh-group: 'FirestartrGithubGroup',
|
|
174624
|
-
// gh-repo: 'FirestartrGithubRepository',
|
|
174625
|
-
// }
|
|
174626
174531
|
async function runImporter(force, skipPlan, claimsPath, crsPath, configPath, claimsDefaultsPath, org, filters, provider = AllowedProviders.all, needsReimport = false) {
|
|
174627
174532
|
configureProvider(provider);
|
|
174628
174533
|
let generatedFilters = [];
|
|
@@ -363032,28 +362937,6 @@ function operatorProfile() {
|
|
|
363032
362937
|
return github["default"].withProfile('operator');
|
|
363033
362938
|
}
|
|
363034
362939
|
|
|
363035
|
-
function resolveProgressCommentResource(item) {
|
|
363036
|
-
return { kind: item.kind, name: item.metadata?.name ?? 'unknown' };
|
|
363037
|
-
}
|
|
363038
|
-
/**
|
|
363039
|
-
* Single builder of the sticky base kind shared by the apply progress
|
|
363040
|
-
* comment (upserted by the check run while the operation runs) and the
|
|
363041
|
-
* final result publisher (which updates that same comment in place).
|
|
363042
|
-
* Keyed per resource so claims of the same kind never overwrite each
|
|
363043
|
-
* other's feedback.
|
|
363044
|
-
*/
|
|
363045
|
-
function progressCommentBaseKind(cmd, item) {
|
|
363046
|
-
const { kind, name } = resolveProgressCommentResource(item);
|
|
363047
|
-
return `${cmd}:${kind}:${name}`;
|
|
363048
|
-
}
|
|
363049
|
-
/**
|
|
363050
|
-
* Body of the apply progress comment. The check-run module appends the
|
|
363051
|
-
* `[here](<check-run-url>)` link to it.
|
|
363052
|
-
*/
|
|
363053
|
-
function progressCommentText(cmd, item) {
|
|
363054
|
-
const { kind, name } = resolveProgressCommentResource(item);
|
|
363055
|
-
return `The ${kind} '${name}' is being processed (cmd=${cmd}). Details: `;
|
|
363056
|
-
}
|
|
363057
362940
|
async function tryPublishApply(item, planOutput, isSuccess = true, exitCode) {
|
|
363058
362941
|
const kind = item.kind;
|
|
363059
362942
|
const metadataName = item.metadata?.name ?? 'unknown';
|
|
@@ -363107,7 +362990,7 @@ ${commentContent}
|
|
|
363107
362990
|
owner: org,
|
|
363108
362991
|
repo,
|
|
363109
362992
|
pullNumber: prNumber,
|
|
363110
|
-
baseKind:
|
|
362993
|
+
baseKind: `${kind.toLowerCase()}:destroy`,
|
|
363111
362994
|
bodies: commentBodies,
|
|
363112
362995
|
});
|
|
363113
362996
|
operator_src_logger.debug(`The user feedback for the '${item.kind}/${item.metadata.name}' destroy operation has been published as a comment on pull request '${prNumber}'.`);
|
|
@@ -363144,7 +363027,7 @@ ${commentContent}
|
|
|
363144
363027
|
owner: org,
|
|
363145
363028
|
repo,
|
|
363146
363029
|
pullNumber: prNumber,
|
|
363147
|
-
baseKind:
|
|
363030
|
+
baseKind: `apply:${kind}`,
|
|
363148
363031
|
bodies: commentBodies,
|
|
363149
363032
|
});
|
|
363150
363033
|
}
|
|
@@ -363344,12 +363227,7 @@ async function TFCheckRun(cmd, item) {
|
|
|
363344
363227
|
const prInfo = extractPrInfo(item);
|
|
363345
363228
|
const checkRun = await tf_checkrun_operatorProfile().feedback.createCheckRun(prInfo.org, prInfo.repo, helperCreateCheckRunName(cmd, item), {
|
|
363346
363229
|
pullNumber: Number(prInfo.prNumber),
|
|
363347
|
-
//
|
|
363348
|
-
// comment in place when the operation ends (shared sticky base
|
|
363349
|
-
// kind keyed per resource).
|
|
363350
|
-
includeCheckRunComment: true,
|
|
363351
|
-
checkRunComment: progressCommentText(cmd, item),
|
|
363352
|
-
stickyCommentBaseKind: progressCommentBaseKind(cmd, item),
|
|
363230
|
+
// check-run comments removed: redundant with native checks widget (#1985)
|
|
363353
363231
|
});
|
|
363354
363232
|
checkRun.mdOptionsDetails({
|
|
363355
363233
|
quotes: 'terraform',
|
|
@@ -363855,9 +363733,6 @@ async function* process_operation_sync(item, op, handler, syncPolicy, generalPol
|
|
|
363855
363733
|
}
|
|
363856
363734
|
}
|
|
363857
363735
|
async function* process_operation_markedToDeletion(item, op, handler) {
|
|
363858
|
-
// Apply progress comment: announces the destroy on the wet-repo PR and
|
|
363859
|
-
// streams its output; the result publisher updates it in place at the end.
|
|
363860
|
-
const checkRunCtl = await TFCheckRun('destroy', item);
|
|
363861
363736
|
let error = false;
|
|
363862
363737
|
let deps;
|
|
363863
363738
|
let terraformExecutionStarted = false;
|
|
@@ -363922,7 +363797,7 @@ async function* process_operation_markedToDeletion(item, op, handler) {
|
|
|
363922
363797
|
deps = await handler.resolveReferences();
|
|
363923
363798
|
const context = buildProvisionerContext(item, deps, sessionId);
|
|
363924
363799
|
terraformExecutionStarted = true;
|
|
363925
|
-
const destroyOutput = await runTerraformProvisioner(context, 'destroy',
|
|
363800
|
+
const destroyOutput = await runTerraformProvisioner(context, 'destroy', null, undefined, {
|
|
363926
363801
|
tfCacheDir: external_path_.join(TF_CACHES_PATH, `slot_${handler.getSlotInfo().slotId}`),
|
|
363927
363802
|
hardTimeout: handler.recommendedTimeout(),
|
|
363928
363803
|
processKilled: (killed) => {
|
|
@@ -363959,7 +363834,6 @@ async function* process_operation_markedToDeletion(item, op, handler) {
|
|
|
363959
363834
|
catch (e) {
|
|
363960
363835
|
error = true;
|
|
363961
363836
|
const { output: errorMsg } = extractErrorDetails(e);
|
|
363962
|
-
checkRunCtl.fnOnError(errorMsg);
|
|
363963
363837
|
await tryPublishDestroy(item, errorMsg, false);
|
|
363964
363838
|
await handler.writeTerraformOutputInTfResult(item, errorMsg, 1);
|
|
363965
363839
|
if (item.metadata.annotations['firestartr.dev/last-state-pr'] || false) {
|
|
@@ -368566,11 +368440,6 @@ async function* gh_process_operation_markedToDeletion(item, op, handler) {
|
|
|
368566
368440
|
// we close it with an error
|
|
368567
368441
|
if (checkRunCtl)
|
|
368568
368442
|
checkRunCtl.fnOnError(errorMsg);
|
|
368569
|
-
// also close the Terraform check run: its periodic flush would
|
|
368570
|
-
// otherwise keep rewriting the apply progress comment after the
|
|
368571
|
-
// final destroy result is published
|
|
368572
|
-
if (checkRunTFCtl)
|
|
368573
|
-
checkRunTFCtl.fnOnError(errorMsg);
|
|
368574
368443
|
await tryPublishDestroy(item, errorMsg, false);
|
|
368575
368444
|
await handler.writeTerraformOutputInTfResult(item, errorMsg, errCode ?? 1);
|
|
368576
368445
|
void handler.error();
|
|
@@ -713554,7 +713423,7 @@ const crsStatusSubcommand = {
|
|
|
713554
713423
|
};
|
|
713555
713424
|
|
|
713556
713425
|
;// CONCATENATED MODULE: ./package.json
|
|
713557
|
-
const package_namespaceObject = JSON.parse('{"i8":"2.11.0-snapshot-
|
|
713426
|
+
const package_namespaceObject = JSON.parse('{"i8":"2.11.0-snapshot-import-filter-fix-2"}');
|
|
713558
713427
|
;// CONCATENATED MODULE: ../../package.json
|
|
713559
713428
|
const package_namespaceObject_1 = {"i8":"2.10.0"};
|
|
713560
713429
|
// EXTERNAL MODULE: ../../node_modules/semver/index.js
|
|
@@ -16,9 +16,6 @@ export interface IGithubRepositoryFeatureClaim extends IClaim {
|
|
|
16
16
|
version?: string;
|
|
17
17
|
ref?: string;
|
|
18
18
|
repo?: string;
|
|
19
|
-
sha?: string;
|
|
20
|
-
tags?: string[];
|
|
21
|
-
url?: string;
|
|
22
19
|
};
|
|
23
20
|
repositoryTarget: FirestartrGithubRepositoryFeatureSpecRepositoryTarget;
|
|
24
21
|
files: Array<IGithubRepositoryFeatureFileClaim>;
|
|
@@ -2,9 +2,5 @@ export declare function getFeatureConfigFromRef(featureName: string, featureRef:
|
|
|
2
2
|
featureArgs?: any, repo?: string, owner?: string): Promise<any>;
|
|
3
3
|
export declare function getFeatureConfig(featureName: string, version: string, featureOwner: any, // -> cr
|
|
4
4
|
featureArgs?: any, repo?: string, owner?: string): Promise<any>;
|
|
5
|
-
export declare function resolveFeatureCommit(owner: string, repo: string, reference: string): Promise<{
|
|
6
|
-
sha: string;
|
|
7
|
-
tags: string[];
|
|
8
|
-
}>;
|
|
9
5
|
export declare function prepareFeature(featureName: string, version: string, repo?: string, owner?: string): Promise<void>;
|
|
10
6
|
export declare function downloadFeatureZip(repo: string, featureName: string, reference: string, owner?: string): Promise<string>;
|
|
@@ -19,20 +19,9 @@ export interface ExpectedFile {
|
|
|
19
19
|
targetBranch: string;
|
|
20
20
|
userManaged: boolean;
|
|
21
21
|
}
|
|
22
|
-
export interface Traceability {
|
|
23
|
-
owner?: string;
|
|
24
|
-
repo?: string;
|
|
25
|
-
name?: string;
|
|
26
|
-
version?: string;
|
|
27
|
-
ref?: string;
|
|
28
|
-
url?: string;
|
|
29
|
-
sha?: string;
|
|
30
|
-
tags?: string[];
|
|
31
|
-
}
|
|
32
22
|
export interface ExpectedOutput {
|
|
33
23
|
files: ExpectedFile[];
|
|
34
24
|
patches: unknown[];
|
|
35
|
-
traceability?: Traceability;
|
|
36
25
|
}
|
|
37
26
|
export interface RenderTest {
|
|
38
27
|
name: string;
|
|
@@ -12,15 +12,6 @@ export interface GithubCheckRunParams {
|
|
|
12
12
|
pullNumber?: number;
|
|
13
13
|
includeCheckRunComment?: boolean;
|
|
14
14
|
checkRunComment?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Optional shared sticky base kind for this check run's sticky PR
|
|
17
|
-
* comment. When set, progress upserts use this base kind (instead of
|
|
18
|
-
* the default `check-run:<name>`) and `close()` performs no sticky
|
|
19
|
-
* rewrite, so an external result publisher targeting the same base
|
|
20
|
-
* kind is always the last word. When unset, legacy behavior is
|
|
21
|
-
* unchanged.
|
|
22
|
-
*/
|
|
23
|
-
stickyCommentBaseKind?: string;
|
|
24
15
|
}
|
|
25
16
|
export declare class GithubCheckRun {
|
|
26
17
|
private readonly octokit;
|
|
@@ -33,7 +24,6 @@ export declare class GithubCheckRun {
|
|
|
33
24
|
private readonly pullNumber?;
|
|
34
25
|
private readonly includeCheckRunComment;
|
|
35
26
|
private readonly checkRunComment?;
|
|
36
|
-
private readonly stickyCommentBaseKind?;
|
|
37
27
|
private hasCommented;
|
|
38
28
|
private creatingPromise?;
|
|
39
29
|
private closing;
|
|
@@ -82,7 +72,6 @@ export declare function createCheckRunForOrg(org: string, owner: string, repo: s
|
|
|
82
72
|
summary?: string;
|
|
83
73
|
includeCheckRunComment?: boolean;
|
|
84
74
|
checkRunComment?: string;
|
|
85
|
-
stickyCommentBaseKind?: string;
|
|
86
75
|
}): Promise<GithubCheckRun>;
|
|
87
76
|
export declare function createCheckRun(owner: string, repo: string, name: string, opts?: {
|
|
88
77
|
headSHA?: string;
|
|
@@ -92,6 +81,5 @@ export declare function createCheckRun(owner: string, repo: string, name: string
|
|
|
92
81
|
summary?: string;
|
|
93
82
|
includeCheckRunComment?: boolean;
|
|
94
83
|
checkRunComment?: string;
|
|
95
|
-
stickyCommentBaseKind?: string;
|
|
96
84
|
}): Promise<GithubCheckRun>;
|
|
97
85
|
export declare const CheckRun: typeof GithubCheckRun;
|
|
@@ -884,7 +884,6 @@ export declare function withProfile(profileName: string): {
|
|
|
884
884
|
summary?: string;
|
|
885
885
|
includeCheckRunComment?: boolean;
|
|
886
886
|
checkRunComment?: string;
|
|
887
|
-
stickyCommentBaseKind?: string;
|
|
888
887
|
}) => Promise<import("./check_run").GithubCheckRun>;
|
|
889
888
|
CheckRun: typeof import("./check_run").GithubCheckRun;
|
|
890
889
|
upsertMultiPartStickyComments: typeof upsertMultiPartStickyComments;
|
|
@@ -8,7 +8,7 @@ export declare class CollectionMixins {
|
|
|
8
8
|
FILTER_BY_NAME_APPLY(filters: any[], kind: string, fn: Function): any;
|
|
9
9
|
FILTER_BY_REGEXP_APPLY(filters: any[], kind: string, fn: Function): any;
|
|
10
10
|
FILTER_BY_FUNCTION_APPLY(filters: any[], kind: string, fn: Function): any;
|
|
11
|
-
filter(kind: string, filters: any[], elementList: any[]): Promise<any>;
|
|
11
|
+
filter(kind: string, filters: any[], elementList: any[]): Promise<any[]>;
|
|
12
12
|
}
|
|
13
13
|
export interface ICollection extends CollectionMixins {
|
|
14
14
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import OrgSettingsGithubDecanter from './github_org_settings';
|
|
1
2
|
import { ICollection } from '../collections';
|
|
2
3
|
import { CollectionFilter } from '../filters';
|
|
3
4
|
import { GithubDecanter } from './base';
|
|
4
5
|
declare class OrgSettingsCollectionGithubDecanter extends GithubDecanter {
|
|
5
6
|
static collectionKind: string;
|
|
6
|
-
collection(filters?: CollectionFilter[]): Promise<
|
|
7
|
+
collection(filters?: CollectionFilter[]): Promise<OrgSettingsGithubDecanter[]>;
|
|
7
8
|
}
|
|
8
9
|
interface OrgSettingsCollectionGithubDecanter extends ICollection {
|
|
9
10
|
}
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal shape of a CR the apply progress comment needs: its kind and
|
|
3
|
-
* its resource name.
|
|
4
|
-
*/
|
|
5
|
-
interface ProgressCommentResource {
|
|
6
|
-
kind: string;
|
|
7
|
-
metadata?: {
|
|
8
|
-
name?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Single builder of the sticky base kind shared by the apply progress
|
|
13
|
-
* comment (upserted by the check run while the operation runs) and the
|
|
14
|
-
* final result publisher (which updates that same comment in place).
|
|
15
|
-
* Keyed per resource so claims of the same kind never overwrite each
|
|
16
|
-
* other's feedback.
|
|
17
|
-
*/
|
|
18
|
-
export declare function progressCommentBaseKind(cmd: string, item: ProgressCommentResource): string;
|
|
19
|
-
/**
|
|
20
|
-
* Body of the apply progress comment. The check-run module appends the
|
|
21
|
-
* `[here](<check-run-url>)` link to it.
|
|
22
|
-
*/
|
|
23
|
-
export declare function progressCommentText(cmd: string, item: ProgressCommentResource): string;
|
|
24
1
|
export declare function tryPublishApply(item: any, planOutput: string, isSuccess?: boolean, exitCode?: number): Promise<void>;
|
|
25
2
|
export declare function tryPublishDestroy(item: any, destroyOutput: string, isSuccess?: boolean): Promise<void>;
|
|
26
3
|
export declare function publishApply(item: any, applyOutput: string, isSuccess?: boolean): Promise<void>;
|
|
@@ -33,4 +10,3 @@ export declare function extractPrInfo(item: any, annotation?: 'firestartr.dev/la
|
|
|
33
10
|
export declare function tryPublishError(item: any, reason: string, message: string): Promise<void>;
|
|
34
11
|
export declare function publishError(item: any, reason: string, message: string): Promise<void>;
|
|
35
12
|
export declare function publishPlan(item: any, planOutput: string, prNumber: number, repo: string, org: string, isSuccess?: boolean, operation?: string, source?: string): Promise<void>;
|
|
36
|
-
export {};
|