@firestartr/cli 2.11.0-snapshot-features-traceability-00 → 2.11.0-snapshot-import-filter-fix
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 +25 -157
- 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/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,57 +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'] = {
|
|
166747
|
-
...featureArgs['traceability'],
|
|
166748
|
-
sha: commitInfo.sha,
|
|
166749
|
-
tags: commitInfo.tags,
|
|
166750
|
-
};
|
|
166751
166720
|
return renderFeature(featureName, reference, owner, repo, featureOwner, '/tmp', featureArgs);
|
|
166752
166721
|
}
|
|
166753
|
-
async function resolveFeatureCommit(owner, repo, reference) {
|
|
166754
|
-
try {
|
|
166755
|
-
const octokit = await github["default"].getOctokitForOrg(owner);
|
|
166756
|
-
// Get the resolved commit SHA
|
|
166757
|
-
const { data: commit } = await octokit.rest.repos.getCommit({
|
|
166758
|
-
owner,
|
|
166759
|
-
repo,
|
|
166760
|
-
ref: reference,
|
|
166761
|
-
});
|
|
166762
|
-
const sha = commit.sha;
|
|
166763
|
-
// Get all tags pointing to this commit.
|
|
166764
|
-
// Tag enumeration is wrapped separately so a pagination failure
|
|
166765
|
-
// still returns the successfully resolved SHA.
|
|
166766
|
-
const tags = [];
|
|
166767
|
-
try {
|
|
166768
|
-
let page = 1;
|
|
166769
|
-
while (true) {
|
|
166770
|
-
const { data: tagList } = await octokit.rest.repos.listTags({
|
|
166771
|
-
owner,
|
|
166772
|
-
repo,
|
|
166773
|
-
per_page: 100,
|
|
166774
|
-
page,
|
|
166775
|
-
});
|
|
166776
|
-
const matchingTags = tagList.filter((t) => t.commit?.sha === sha);
|
|
166777
|
-
tags.push(...matchingTags.map((t) => t.name));
|
|
166778
|
-
if (tagList.length < 100)
|
|
166779
|
-
break;
|
|
166780
|
-
page++;
|
|
166781
|
-
}
|
|
166782
|
-
}
|
|
166783
|
-
catch (tagError) {
|
|
166784
|
-
// Clear partial results so consumers don't publish an incomplete
|
|
166785
|
-
// tag set as if it were the full list.
|
|
166786
|
-
tags.length = 0;
|
|
166787
|
-
features_preparer_src_logger.warn(`[features_preparer] Failed to list tags for ${owner}/${repo}@${reference}: ${tagError instanceof Error ? tagError.message : String(tagError)}`);
|
|
166788
|
-
}
|
|
166789
|
-
return { sha, tags };
|
|
166790
|
-
}
|
|
166791
|
-
catch (error) {
|
|
166792
|
-
features_preparer_src_logger.warn(`[features_preparer] Failed to resolve commit for ${owner}/${repo}@${reference}: ${error instanceof Error ? error.message : String(error)}`);
|
|
166793
|
-
return { sha: '', tags: [] };
|
|
166794
|
-
}
|
|
166795
|
-
}
|
|
166796
166722
|
async function prepareFeature(featureName, version, repo = 'features', owner = 'prefapp') {
|
|
166797
166723
|
await downloadFeatureZip(repo, featureName, version, owner);
|
|
166798
166724
|
}
|
|
@@ -166878,20 +166804,11 @@ async function utils_renderFeature(featureName, featureVersion, featureOutputObj
|
|
|
166878
166804
|
files.push({ path, userManaged, content, targetBranch });
|
|
166879
166805
|
}
|
|
166880
166806
|
const featName = catalog_common/* default.generic.normalizeName */.Z.generic.normalizeName(`${featureName}-${cr.spec.firestartr.tfStateKey}`);
|
|
166881
|
-
const traceability = featureOutputObject.traceability || {};
|
|
166882
166807
|
return {
|
|
166883
166808
|
kind: 'GithubRepositoryFeatureClaim',
|
|
166884
166809
|
version: '1.0.0',
|
|
166885
166810
|
name: featName,
|
|
166886
|
-
feature: {
|
|
166887
|
-
name: featureName,
|
|
166888
|
-
version: featureVersion,
|
|
166889
|
-
ref: traceability.ref,
|
|
166890
|
-
repo: traceability.repo,
|
|
166891
|
-
sha: traceability.sha,
|
|
166892
|
-
tags: traceability.tags,
|
|
166893
|
-
url: traceability.url,
|
|
166894
|
-
},
|
|
166811
|
+
feature: { name: featureName, version: featureVersion },
|
|
166895
166812
|
firestartr: { tfStateKey: cr.spec.firestartr.tfStateKey },
|
|
166896
166813
|
files,
|
|
166897
166814
|
claimRepoName,
|
|
@@ -170764,23 +170681,6 @@ class FeatureRepoChart extends BaseGithubChart {
|
|
|
170764
170681
|
annotations: {
|
|
170765
170682
|
'firestartr.dev/external-name': claim.name,
|
|
170766
170683
|
'firestartr.dev/feature-name': claim.feature.name,
|
|
170767
|
-
...(claim.feature.sha
|
|
170768
|
-
? { 'firestartr.dev/feature-git-sha': claim.feature.sha }
|
|
170769
|
-
: {}),
|
|
170770
|
-
...(claim.feature.tags && claim.feature.tags.length > 0
|
|
170771
|
-
? {
|
|
170772
|
-
'firestartr.dev/feature-git-tags': JSON.stringify(claim.feature.tags),
|
|
170773
|
-
}
|
|
170774
|
-
: {}),
|
|
170775
|
-
...(claim.feature.url
|
|
170776
|
-
? { 'firestartr.dev/feature-url': claim.feature.url }
|
|
170777
|
-
: {}),
|
|
170778
|
-
...(claim.feature.ref
|
|
170779
|
-
? { 'firestartr.dev/feature-ref': claim.feature.ref }
|
|
170780
|
-
: {}),
|
|
170781
|
-
...(claim.feature.repo
|
|
170782
|
-
? { 'firestartr.dev/feature-repo': claim.feature.repo }
|
|
170783
|
-
: {}),
|
|
170784
170684
|
},
|
|
170785
170685
|
},
|
|
170786
170686
|
spec: {
|
|
@@ -174227,6 +174127,12 @@ const CHILD_CR_KINDS = [
|
|
|
174227
174127
|
'FirestartrGithubRepositorySecretsSection',
|
|
174228
174128
|
'FirestartrGithubRepositoryFeature',
|
|
174229
174129
|
];
|
|
174130
|
+
const MAP_COLLECTION_KIND_CR_KIND = {
|
|
174131
|
+
'gh-repo': 'FirestartrGithubRepository',
|
|
174132
|
+
'gh-group': 'FirestartrGithubGroup',
|
|
174133
|
+
'gh-members': 'FirestartrGithubMembership',
|
|
174134
|
+
'gh-org-settings': 'FirestartrGithubOrganizationSettings',
|
|
174135
|
+
};
|
|
174230
174136
|
let previousCRs = {};
|
|
174231
174137
|
const collections = {
|
|
174232
174138
|
GroupCollectionGithubDecanter: github_group_collection,
|
|
@@ -174235,7 +174141,10 @@ const collections = {
|
|
|
174235
174141
|
RepoCollectionGithubDecanter: github_repo_collection,
|
|
174236
174142
|
};
|
|
174237
174143
|
function isInPreviousCRs(kind, name) {
|
|
174238
|
-
|
|
174144
|
+
const crKind = MAP_COLLECTION_KIND_CR_KIND[kind];
|
|
174145
|
+
if (!crKind)
|
|
174146
|
+
return false;
|
|
174147
|
+
return `${crKind}-${name}` in previousCRs;
|
|
174239
174148
|
}
|
|
174240
174149
|
const randomFolder = external_path_.join('/tmp', `claims_${catalog_common/* default.generic.randomString */.Z.generic.randomString(10)}`);
|
|
174241
174150
|
const tmpRenderedCrsPath = external_path_.join('/tmp', '.resources');
|
|
@@ -174621,11 +174530,6 @@ async function reimporter_isDirectory(path) {
|
|
|
174621
174530
|
|
|
174622
174531
|
|
|
174623
174532
|
|
|
174624
|
-
// const MAP_COLLECTION_KIND_CR_KIND: any = {
|
|
174625
|
-
// gh-members: 'FirestartrGithubMembership',
|
|
174626
|
-
// gh-group: 'FirestartrGithubGroup',
|
|
174627
|
-
// gh-repo: 'FirestartrGithubRepository',
|
|
174628
|
-
// }
|
|
174629
174533
|
async function runImporter(force, skipPlan, claimsPath, crsPath, configPath, claimsDefaultsPath, org, filters, provider = AllowedProviders.all, needsReimport = false) {
|
|
174630
174534
|
configureProvider(provider);
|
|
174631
174535
|
let generatedFilters = [];
|
|
@@ -363035,28 +362939,6 @@ function operatorProfile() {
|
|
|
363035
362939
|
return github["default"].withProfile('operator');
|
|
363036
362940
|
}
|
|
363037
362941
|
|
|
363038
|
-
function resolveProgressCommentResource(item) {
|
|
363039
|
-
return { kind: item.kind, name: item.metadata?.name ?? 'unknown' };
|
|
363040
|
-
}
|
|
363041
|
-
/**
|
|
363042
|
-
* Single builder of the sticky base kind shared by the apply progress
|
|
363043
|
-
* comment (upserted by the check run while the operation runs) and the
|
|
363044
|
-
* final result publisher (which updates that same comment in place).
|
|
363045
|
-
* Keyed per resource so claims of the same kind never overwrite each
|
|
363046
|
-
* other's feedback.
|
|
363047
|
-
*/
|
|
363048
|
-
function progressCommentBaseKind(cmd, item) {
|
|
363049
|
-
const { kind, name } = resolveProgressCommentResource(item);
|
|
363050
|
-
return `${cmd}:${kind}:${name}`;
|
|
363051
|
-
}
|
|
363052
|
-
/**
|
|
363053
|
-
* Body of the apply progress comment. The check-run module appends the
|
|
363054
|
-
* `[here](<check-run-url>)` link to it.
|
|
363055
|
-
*/
|
|
363056
|
-
function progressCommentText(cmd, item) {
|
|
363057
|
-
const { kind, name } = resolveProgressCommentResource(item);
|
|
363058
|
-
return `The ${kind} '${name}' is being processed (cmd=${cmd}). Details: `;
|
|
363059
|
-
}
|
|
363060
362942
|
async function tryPublishApply(item, planOutput, isSuccess = true, exitCode) {
|
|
363061
362943
|
const kind = item.kind;
|
|
363062
362944
|
const metadataName = item.metadata?.name ?? 'unknown';
|
|
@@ -363110,7 +362992,7 @@ ${commentContent}
|
|
|
363110
362992
|
owner: org,
|
|
363111
362993
|
repo,
|
|
363112
362994
|
pullNumber: prNumber,
|
|
363113
|
-
baseKind:
|
|
362995
|
+
baseKind: `${kind.toLowerCase()}:destroy`,
|
|
363114
362996
|
bodies: commentBodies,
|
|
363115
362997
|
});
|
|
363116
362998
|
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}'.`);
|
|
@@ -363147,7 +363029,7 @@ ${commentContent}
|
|
|
363147
363029
|
owner: org,
|
|
363148
363030
|
repo,
|
|
363149
363031
|
pullNumber: prNumber,
|
|
363150
|
-
baseKind:
|
|
363032
|
+
baseKind: `apply:${kind}`,
|
|
363151
363033
|
bodies: commentBodies,
|
|
363152
363034
|
});
|
|
363153
363035
|
}
|
|
@@ -363347,12 +363229,7 @@ async function TFCheckRun(cmd, item) {
|
|
|
363347
363229
|
const prInfo = extractPrInfo(item);
|
|
363348
363230
|
const checkRun = await tf_checkrun_operatorProfile().feedback.createCheckRun(prInfo.org, prInfo.repo, helperCreateCheckRunName(cmd, item), {
|
|
363349
363231
|
pullNumber: Number(prInfo.prNumber),
|
|
363350
|
-
//
|
|
363351
|
-
// comment in place when the operation ends (shared sticky base
|
|
363352
|
-
// kind keyed per resource).
|
|
363353
|
-
includeCheckRunComment: true,
|
|
363354
|
-
checkRunComment: progressCommentText(cmd, item),
|
|
363355
|
-
stickyCommentBaseKind: progressCommentBaseKind(cmd, item),
|
|
363232
|
+
// check-run comments removed: redundant with native checks widget (#1985)
|
|
363356
363233
|
});
|
|
363357
363234
|
checkRun.mdOptionsDetails({
|
|
363358
363235
|
quotes: 'terraform',
|
|
@@ -363858,9 +363735,6 @@ async function* process_operation_sync(item, op, handler, syncPolicy, generalPol
|
|
|
363858
363735
|
}
|
|
363859
363736
|
}
|
|
363860
363737
|
async function* process_operation_markedToDeletion(item, op, handler) {
|
|
363861
|
-
// Apply progress comment: announces the destroy on the wet-repo PR and
|
|
363862
|
-
// streams its output; the result publisher updates it in place at the end.
|
|
363863
|
-
const checkRunCtl = await TFCheckRun('destroy', item);
|
|
363864
363738
|
let error = false;
|
|
363865
363739
|
let deps;
|
|
363866
363740
|
let terraformExecutionStarted = false;
|
|
@@ -363925,7 +363799,7 @@ async function* process_operation_markedToDeletion(item, op, handler) {
|
|
|
363925
363799
|
deps = await handler.resolveReferences();
|
|
363926
363800
|
const context = buildProvisionerContext(item, deps, sessionId);
|
|
363927
363801
|
terraformExecutionStarted = true;
|
|
363928
|
-
const destroyOutput = await runTerraformProvisioner(context, 'destroy',
|
|
363802
|
+
const destroyOutput = await runTerraformProvisioner(context, 'destroy', null, undefined, {
|
|
363929
363803
|
tfCacheDir: external_path_.join(TF_CACHES_PATH, `slot_${handler.getSlotInfo().slotId}`),
|
|
363930
363804
|
hardTimeout: handler.recommendedTimeout(),
|
|
363931
363805
|
processKilled: (killed) => {
|
|
@@ -363962,7 +363836,6 @@ async function* process_operation_markedToDeletion(item, op, handler) {
|
|
|
363962
363836
|
catch (e) {
|
|
363963
363837
|
error = true;
|
|
363964
363838
|
const { output: errorMsg } = extractErrorDetails(e);
|
|
363965
|
-
checkRunCtl.fnOnError(errorMsg);
|
|
363966
363839
|
await tryPublishDestroy(item, errorMsg, false);
|
|
363967
363840
|
await handler.writeTerraformOutputInTfResult(item, errorMsg, 1);
|
|
363968
363841
|
if (item.metadata.annotations['firestartr.dev/last-state-pr'] || false) {
|
|
@@ -368569,11 +368442,6 @@ async function* gh_process_operation_markedToDeletion(item, op, handler) {
|
|
|
368569
368442
|
// we close it with an error
|
|
368570
368443
|
if (checkRunCtl)
|
|
368571
368444
|
checkRunCtl.fnOnError(errorMsg);
|
|
368572
|
-
// also close the Terraform check run: its periodic flush would
|
|
368573
|
-
// otherwise keep rewriting the apply progress comment after the
|
|
368574
|
-
// final destroy result is published
|
|
368575
|
-
if (checkRunTFCtl)
|
|
368576
|
-
checkRunTFCtl.fnOnError(errorMsg);
|
|
368577
368445
|
await tryPublishDestroy(item, errorMsg, false);
|
|
368578
368446
|
await handler.writeTerraformOutputInTfResult(item, errorMsg, errCode ?? 1);
|
|
368579
368447
|
void handler.error();
|
|
@@ -713557,7 +713425,7 @@ const crsStatusSubcommand = {
|
|
|
713557
713425
|
};
|
|
713558
713426
|
|
|
713559
713427
|
;// CONCATENATED MODULE: ./package.json
|
|
713560
|
-
const package_namespaceObject = JSON.parse('{"i8":"2.11.0-snapshot-
|
|
713428
|
+
const package_namespaceObject = JSON.parse('{"i8":"2.11.0-snapshot-import-filter-fix"}');
|
|
713561
713429
|
;// CONCATENATED MODULE: ../../package.json
|
|
713562
713430
|
const package_namespaceObject_1 = {"i8":"2.10.0"};
|
|
713563
713431
|
// 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;
|
|
@@ -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 {};
|