@backstage/plugin-scaffolder-backend 0.0.0-nightly-20220712025512 → 0.0.0-nightly-20220715025616
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/CHANGELOG.md +46 -10
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +11 -6
- package/dist/index.beta.d.ts +11 -6
- package/dist/index.cjs.js +50 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +11 -6
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20220715025616
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -10,14 +10,21 @@
|
|
|
10
10
|
|
|
11
11
|
### Patch Changes
|
|
12
12
|
|
|
13
|
+
- ff316b86d8: Add `copyWithoutTemplating` to the fetch template action input. `copyWithoutTemplating` also accepts an array of glob patterns. Contents of matched files or directories are copied without being processed, but paths are subject to rendering.
|
|
14
|
+
|
|
15
|
+
Deprecate `copyWithoutRender` in favor of `copyWithoutTemplating`.
|
|
16
|
+
|
|
13
17
|
- 801d606909: Improve error messaging when passing in malformed auth
|
|
18
|
+
- 089d846962: Fix issues with optional directories and files
|
|
14
19
|
- ea6dcb84a4: Don't resolve symlinks, treat them as binary files and copy them as-is
|
|
15
20
|
- af02f54483: new setUserAsOwner flag for publish:gitlab action
|
|
16
21
|
|
|
17
22
|
The field default is `false`. When true it will use the token configured in the gitlab integration for the matching host, to try and set the user logged in via `repoUrlPicker` `requestUserCredentials` OAuth flow as owner of the repository created in GitLab.
|
|
18
23
|
|
|
19
24
|
- a70869e775: Updated dependency `msw` to `^0.43.0`.
|
|
25
|
+
- 4e9a90e307: Updated dependency `luxon` to `^3.0.0`.
|
|
20
26
|
- 72622d9143: Updated dependency `yaml` to `^2.0.0`.
|
|
27
|
+
- 8006d0f9bf: Updated dependency `msw` to `^0.44.0`.
|
|
21
28
|
- 679b32172e: Updated dependency `knex` to `^2.0.0`.
|
|
22
29
|
- 511f49ee43: Updated dependency `octokit` to `^2.0.0`.
|
|
23
30
|
- 735853353b: Updated dependency `@octokit/webhooks` to `^10.0.0`.
|
|
@@ -30,16 +37,45 @@
|
|
|
30
37
|
- SNYK-JS-PARSEURL-2935947
|
|
31
38
|
- SNYK-JS-PARSEURL-2936249
|
|
32
39
|
|
|
40
|
+
- 945a27fa6a: Add sourcePath option to publish:gerrit action
|
|
41
|
+
- 1764296a68: Allow to create Gerrit project using default owner
|
|
42
|
+
- Updated dependencies
|
|
43
|
+
- @backstage/backend-plugin-api@0.0.0-nightly-20220715025616
|
|
44
|
+
- @backstage/plugin-catalog-backend@0.0.0-nightly-20220715025616
|
|
45
|
+
- @backstage/backend-common@0.0.0-nightly-20220715025616
|
|
46
|
+
- @backstage/catalog-model@0.0.0-nightly-20220715025616
|
|
47
|
+
- @backstage/plugin-catalog-node@0.0.0-nightly-20220715025616
|
|
48
|
+
- @backstage/integration@0.0.0-nightly-20220715025616
|
|
49
|
+
- @backstage/catalog-client@0.0.0-nightly-20220715025616
|
|
50
|
+
- @backstage/errors@0.0.0-nightly-20220715025616
|
|
51
|
+
- @backstage/plugin-scaffolder-common@0.0.0-nightly-20220715025616
|
|
52
|
+
|
|
53
|
+
## 1.4.0-next.3
|
|
54
|
+
|
|
55
|
+
### Minor Changes
|
|
56
|
+
|
|
57
|
+
- 91c1d12123: Export experimental `scaffolderCatalogExtension` for the new backend system. This export is not considered stable and should not be used in production.
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- ea6dcb84a4: Don't resolve symlinks, treat them as binary files and copy them as-is
|
|
62
|
+
- af02f54483: new setUserAsOwner flag for publish:gitlab action
|
|
63
|
+
|
|
64
|
+
The field default is `false`. When true it will use the token configured in the gitlab integration for the matching host, to try and set the user logged in via `repoUrlPicker` `requestUserCredentials` OAuth flow as owner of the repository created in GitLab.
|
|
65
|
+
|
|
66
|
+
- a70869e775: Updated dependency `msw` to `^0.43.0`.
|
|
67
|
+
- 4e9a90e307: Updated dependency `luxon` to `^3.0.0`.
|
|
68
|
+
- 72622d9143: Updated dependency `yaml` to `^2.0.0`.
|
|
69
|
+
- 511f49ee43: Updated dependency `octokit` to `^2.0.0`.
|
|
70
|
+
- 735853353b: Updated dependency `@octokit/webhooks` to `^10.0.0`.
|
|
33
71
|
- Updated dependencies
|
|
34
|
-
- @backstage/backend-plugin-api@0.0.0
|
|
35
|
-
- @backstage/plugin-catalog-backend@
|
|
36
|
-
- @backstage/
|
|
37
|
-
- @backstage/
|
|
38
|
-
- @backstage/
|
|
39
|
-
- @backstage/
|
|
40
|
-
- @backstage/
|
|
41
|
-
- @backstage/errors@0.0.0-nightly-20220712025512
|
|
42
|
-
- @backstage/plugin-scaffolder-common@0.0.0-nightly-20220712025512
|
|
72
|
+
- @backstage/backend-plugin-api@0.1.0-next.0
|
|
73
|
+
- @backstage/plugin-catalog-backend@1.3.0-next.3
|
|
74
|
+
- @backstage/plugin-catalog-node@1.0.0-next.0
|
|
75
|
+
- @backstage/backend-common@0.14.1-next.3
|
|
76
|
+
- @backstage/catalog-client@1.0.4-next.2
|
|
77
|
+
- @backstage/integration@1.2.2-next.3
|
|
78
|
+
- @backstage/catalog-model@1.1.0-next.3
|
|
43
79
|
|
|
44
80
|
## 1.4.0-next.2
|
|
45
81
|
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -161,7 +161,11 @@ url: string;
|
|
|
161
161
|
targetPath?: string | undefined;
|
|
162
162
|
values: any;
|
|
163
163
|
templateFileExtension?: string | boolean | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* @deprecated This field is deprecated in favor of copyWithoutTemplating.
|
|
166
|
+
*/
|
|
164
167
|
copyWithoutRender?: string[] | undefined;
|
|
168
|
+
copyWithoutTemplating?: string[] | undefined;
|
|
165
169
|
cookiecutterCompat?: boolean | undefined;
|
|
166
170
|
}>;
|
|
167
171
|
|
|
@@ -268,7 +272,7 @@ allowSquashMerge?: boolean | undefined;
|
|
|
268
272
|
allowMergeCommit?: boolean | undefined;
|
|
269
273
|
requireCodeOwnerReviews?: boolean | undefined;
|
|
270
274
|
requiredStatusCheckContexts?: string[] | undefined;
|
|
271
|
-
repoVisibility?: "
|
|
275
|
+
repoVisibility?: "public" | "private" | "internal" | undefined;
|
|
272
276
|
collaborators?: ({
|
|
273
277
|
user: string;
|
|
274
278
|
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
|
|
@@ -359,7 +363,7 @@ export declare function createPublishBitbucketAction(options: {
|
|
|
359
363
|
repoUrl: string;
|
|
360
364
|
description?: string | undefined;
|
|
361
365
|
defaultBranch?: string | undefined;
|
|
362
|
-
repoVisibility?: "
|
|
366
|
+
repoVisibility?: "public" | "private" | undefined;
|
|
363
367
|
sourcePath?: string | undefined;
|
|
364
368
|
enableLFS?: boolean | undefined;
|
|
365
369
|
token?: string | undefined;
|
|
@@ -380,7 +384,7 @@ export declare function createPublishBitbucketCloudAction(options: {
|
|
|
380
384
|
repoUrl: string;
|
|
381
385
|
description?: string | undefined;
|
|
382
386
|
defaultBranch?: string | undefined;
|
|
383
|
-
repoVisibility?: "
|
|
387
|
+
repoVisibility?: "public" | "private" | undefined;
|
|
384
388
|
sourcePath?: string | undefined;
|
|
385
389
|
token?: string | undefined;
|
|
386
390
|
}>;
|
|
@@ -397,7 +401,7 @@ export declare function createPublishBitbucketServerAction(options: {
|
|
|
397
401
|
repoUrl: string;
|
|
398
402
|
description?: string | undefined;
|
|
399
403
|
defaultBranch?: string | undefined;
|
|
400
|
-
repoVisibility?: "
|
|
404
|
+
repoVisibility?: "public" | "private" | undefined;
|
|
401
405
|
sourcePath?: string | undefined;
|
|
402
406
|
enableLFS?: boolean | undefined;
|
|
403
407
|
token?: string | undefined;
|
|
@@ -433,6 +437,7 @@ defaultBranch?: string | undefined;
|
|
|
433
437
|
gitCommitMessage?: string | undefined;
|
|
434
438
|
gitAuthorName?: string | undefined;
|
|
435
439
|
gitAuthorEmail?: string | undefined;
|
|
440
|
+
sourcePath?: string | undefined;
|
|
436
441
|
}>;
|
|
437
442
|
|
|
438
443
|
/**
|
|
@@ -461,7 +466,7 @@ allowMergeCommit?: boolean | undefined;
|
|
|
461
466
|
sourcePath?: string | undefined;
|
|
462
467
|
requireCodeOwnerReviews?: boolean | undefined;
|
|
463
468
|
requiredStatusCheckContexts?: string[] | undefined;
|
|
464
|
-
repoVisibility?: "
|
|
469
|
+
repoVisibility?: "public" | "private" | "internal" | undefined;
|
|
465
470
|
collaborators?: ({
|
|
466
471
|
user: string;
|
|
467
472
|
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
|
|
@@ -504,7 +509,7 @@ export declare function createPublishGitlabAction(options: {
|
|
|
504
509
|
}): TemplateAction< {
|
|
505
510
|
repoUrl: string;
|
|
506
511
|
defaultBranch?: string | undefined;
|
|
507
|
-
repoVisibility?: "
|
|
512
|
+
repoVisibility?: "public" | "private" | "internal" | undefined;
|
|
508
513
|
sourcePath?: string | undefined;
|
|
509
514
|
token?: string | undefined;
|
|
510
515
|
gitCommitMessage?: string | undefined;
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -161,7 +161,11 @@ url: string;
|
|
|
161
161
|
targetPath?: string | undefined;
|
|
162
162
|
values: any;
|
|
163
163
|
templateFileExtension?: string | boolean | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* @deprecated This field is deprecated in favor of copyWithoutTemplating.
|
|
166
|
+
*/
|
|
164
167
|
copyWithoutRender?: string[] | undefined;
|
|
168
|
+
copyWithoutTemplating?: string[] | undefined;
|
|
165
169
|
cookiecutterCompat?: boolean | undefined;
|
|
166
170
|
}>;
|
|
167
171
|
|
|
@@ -268,7 +272,7 @@ allowSquashMerge?: boolean | undefined;
|
|
|
268
272
|
allowMergeCommit?: boolean | undefined;
|
|
269
273
|
requireCodeOwnerReviews?: boolean | undefined;
|
|
270
274
|
requiredStatusCheckContexts?: string[] | undefined;
|
|
271
|
-
repoVisibility?: "
|
|
275
|
+
repoVisibility?: "public" | "private" | "internal" | undefined;
|
|
272
276
|
collaborators?: ({
|
|
273
277
|
user: string;
|
|
274
278
|
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
|
|
@@ -359,7 +363,7 @@ export declare function createPublishBitbucketAction(options: {
|
|
|
359
363
|
repoUrl: string;
|
|
360
364
|
description?: string | undefined;
|
|
361
365
|
defaultBranch?: string | undefined;
|
|
362
|
-
repoVisibility?: "
|
|
366
|
+
repoVisibility?: "public" | "private" | undefined;
|
|
363
367
|
sourcePath?: string | undefined;
|
|
364
368
|
enableLFS?: boolean | undefined;
|
|
365
369
|
token?: string | undefined;
|
|
@@ -380,7 +384,7 @@ export declare function createPublishBitbucketCloudAction(options: {
|
|
|
380
384
|
repoUrl: string;
|
|
381
385
|
description?: string | undefined;
|
|
382
386
|
defaultBranch?: string | undefined;
|
|
383
|
-
repoVisibility?: "
|
|
387
|
+
repoVisibility?: "public" | "private" | undefined;
|
|
384
388
|
sourcePath?: string | undefined;
|
|
385
389
|
token?: string | undefined;
|
|
386
390
|
}>;
|
|
@@ -397,7 +401,7 @@ export declare function createPublishBitbucketServerAction(options: {
|
|
|
397
401
|
repoUrl: string;
|
|
398
402
|
description?: string | undefined;
|
|
399
403
|
defaultBranch?: string | undefined;
|
|
400
|
-
repoVisibility?: "
|
|
404
|
+
repoVisibility?: "public" | "private" | undefined;
|
|
401
405
|
sourcePath?: string | undefined;
|
|
402
406
|
enableLFS?: boolean | undefined;
|
|
403
407
|
token?: string | undefined;
|
|
@@ -433,6 +437,7 @@ defaultBranch?: string | undefined;
|
|
|
433
437
|
gitCommitMessage?: string | undefined;
|
|
434
438
|
gitAuthorName?: string | undefined;
|
|
435
439
|
gitAuthorEmail?: string | undefined;
|
|
440
|
+
sourcePath?: string | undefined;
|
|
436
441
|
}>;
|
|
437
442
|
|
|
438
443
|
/**
|
|
@@ -461,7 +466,7 @@ allowMergeCommit?: boolean | undefined;
|
|
|
461
466
|
sourcePath?: string | undefined;
|
|
462
467
|
requireCodeOwnerReviews?: boolean | undefined;
|
|
463
468
|
requiredStatusCheckContexts?: string[] | undefined;
|
|
464
|
-
repoVisibility?: "
|
|
469
|
+
repoVisibility?: "public" | "private" | "internal" | undefined;
|
|
465
470
|
collaborators?: ({
|
|
466
471
|
user: string;
|
|
467
472
|
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
|
|
@@ -504,7 +509,7 @@ export declare function createPublishGitlabAction(options: {
|
|
|
504
509
|
}): TemplateAction< {
|
|
505
510
|
repoUrl: string;
|
|
506
511
|
defaultBranch?: string | undefined;
|
|
507
|
-
repoVisibility?: "
|
|
512
|
+
repoVisibility?: "public" | "private" | "internal" | undefined;
|
|
508
513
|
sourcePath?: string | undefined;
|
|
509
514
|
token?: string | undefined;
|
|
510
515
|
gitCommitMessage?: string | undefined;
|
package/dist/index.cjs.js
CHANGED
|
@@ -473,13 +473,21 @@ function createFetchTemplateAction(options) {
|
|
|
473
473
|
type: "object"
|
|
474
474
|
},
|
|
475
475
|
copyWithoutRender: {
|
|
476
|
-
title: "Copy Without Render",
|
|
476
|
+
title: "[Deprecated] Copy Without Render",
|
|
477
477
|
description: "An array of glob patterns. Any files or directories which match are copied without being processed as templates.",
|
|
478
478
|
type: "array",
|
|
479
479
|
items: {
|
|
480
480
|
type: "string"
|
|
481
481
|
}
|
|
482
482
|
},
|
|
483
|
+
copyWithoutTemplating: {
|
|
484
|
+
title: "Copy Without Templating",
|
|
485
|
+
description: "An array of glob patterns. Contents of matched files or directories are copied without being processed, but paths are subject to rendering.",
|
|
486
|
+
type: "array",
|
|
487
|
+
items: {
|
|
488
|
+
type: "string"
|
|
489
|
+
}
|
|
490
|
+
},
|
|
483
491
|
cookiecutterCompat: {
|
|
484
492
|
title: "Cookiecutter compatibility mode",
|
|
485
493
|
description: "Enable features to maximise compatibility with templates built for fetch:cookiecutter",
|
|
@@ -501,11 +509,24 @@ function createFetchTemplateAction(options) {
|
|
|
501
509
|
const templateDir = backendCommon.resolveSafeChildPath(workDir, "template");
|
|
502
510
|
const targetPath = (_a = ctx.input.targetPath) != null ? _a : "./";
|
|
503
511
|
const outputDir = backendCommon.resolveSafeChildPath(ctx.workspacePath, targetPath);
|
|
504
|
-
if (ctx.input.copyWithoutRender &&
|
|
505
|
-
throw new errors.InputError("Fetch action input copyWithoutRender
|
|
512
|
+
if (ctx.input.copyWithoutRender && ctx.input.copyWithoutTemplating) {
|
|
513
|
+
throw new errors.InputError("Fetch action input copyWithoutRender and copyWithoutTemplating can not be used at the same time");
|
|
506
514
|
}
|
|
507
|
-
|
|
508
|
-
|
|
515
|
+
let copyOnlyPatterns;
|
|
516
|
+
let renderFilename;
|
|
517
|
+
if (ctx.input.copyWithoutRender) {
|
|
518
|
+
ctx.logger.warn("[Deprecated] Please use copyWithoutTemplating instead.");
|
|
519
|
+
copyOnlyPatterns = ctx.input.copyWithoutRender;
|
|
520
|
+
renderFilename = false;
|
|
521
|
+
} else {
|
|
522
|
+
copyOnlyPatterns = ctx.input.copyWithoutTemplating;
|
|
523
|
+
renderFilename = true;
|
|
524
|
+
}
|
|
525
|
+
if (copyOnlyPatterns && !Array.isArray(copyOnlyPatterns)) {
|
|
526
|
+
throw new errors.InputError("Fetch action input copyWithoutRender/copyWithoutTemplating must be an Array");
|
|
527
|
+
}
|
|
528
|
+
if (ctx.input.templateFileExtension && (copyOnlyPatterns || ctx.input.cookiecutterCompat)) {
|
|
529
|
+
throw new errors.InputError("Fetch action input extension incompatible with copyWithoutRender/copyWithoutTemplating and cookiecutterCompat");
|
|
509
530
|
}
|
|
510
531
|
let extension = false;
|
|
511
532
|
if (ctx.input.templateFileExtension) {
|
|
@@ -529,7 +550,7 @@ function createFetchTemplateAction(options) {
|
|
|
529
550
|
markDirectories: true,
|
|
530
551
|
followSymbolicLinks: false
|
|
531
552
|
});
|
|
532
|
-
const nonTemplatedEntries = new Set((await Promise.all((
|
|
553
|
+
const nonTemplatedEntries = new Set((await Promise.all((copyOnlyPatterns || []).map((pattern) => globby__default["default"](pattern, {
|
|
533
554
|
cwd: templateDir,
|
|
534
555
|
dot: true,
|
|
535
556
|
onlyFiles: false,
|
|
@@ -546,23 +567,27 @@ function createFetchTemplateAction(options) {
|
|
|
546
567
|
additionalTemplateFilters
|
|
547
568
|
});
|
|
548
569
|
for (const location of allEntriesInTemplate) {
|
|
549
|
-
let renderFilename;
|
|
550
570
|
let renderContents;
|
|
551
571
|
let localOutputPath = location;
|
|
552
572
|
if (extension) {
|
|
553
|
-
renderFilename = true;
|
|
554
573
|
renderContents = path.extname(localOutputPath) === extension;
|
|
555
574
|
if (renderContents) {
|
|
556
575
|
localOutputPath = localOutputPath.slice(0, -extension.length);
|
|
557
576
|
}
|
|
577
|
+
localOutputPath = renderTemplate(localOutputPath, context);
|
|
558
578
|
} else {
|
|
559
|
-
|
|
579
|
+
renderContents = !nonTemplatedEntries.has(location);
|
|
580
|
+
if (renderFilename) {
|
|
581
|
+
localOutputPath = renderTemplate(localOutputPath, context);
|
|
582
|
+
} else {
|
|
583
|
+
localOutputPath = renderContents ? renderTemplate(localOutputPath, context) : localOutputPath;
|
|
584
|
+
}
|
|
560
585
|
}
|
|
561
|
-
if (
|
|
562
|
-
|
|
586
|
+
if (containsSkippedContent(localOutputPath)) {
|
|
587
|
+
continue;
|
|
563
588
|
}
|
|
564
589
|
const outputPath = backendCommon.resolveSafeChildPath(outputDir, localOutputPath);
|
|
565
|
-
if (
|
|
590
|
+
if (fs__default["default"].existsSync(outputPath)) {
|
|
566
591
|
continue;
|
|
567
592
|
}
|
|
568
593
|
if (!renderContents && !extension) {
|
|
@@ -589,6 +614,9 @@ function createFetchTemplateAction(options) {
|
|
|
589
614
|
}
|
|
590
615
|
});
|
|
591
616
|
}
|
|
617
|
+
function containsSkippedContent(localOutputPath) {
|
|
618
|
+
return localOutputPath === "" || path__default["default"].isAbsolute(localOutputPath) || localOutputPath.includes(`${path__default["default"].sep}${path__default["default"].sep}`);
|
|
619
|
+
}
|
|
592
620
|
|
|
593
621
|
const createFilesystemDeleteAction = () => {
|
|
594
622
|
return createTemplateAction({
|
|
@@ -729,7 +757,7 @@ const parseRepoUrl = (repoUrl, integrations) => {
|
|
|
729
757
|
throw new errors.InputError(`Invalid repo URL passed to publisher: ${repoUrl}, missing project`);
|
|
730
758
|
}
|
|
731
759
|
} else {
|
|
732
|
-
if (!owner) {
|
|
760
|
+
if (!owner && type !== "gerrit") {
|
|
733
761
|
throw new errors.InputError(`Invalid repo URL passed to publisher: ${repoUrl}, missing owner`);
|
|
734
762
|
}
|
|
735
763
|
}
|
|
@@ -2282,7 +2310,7 @@ const createGerritProject = async (config, options) => {
|
|
|
2282
2310
|
body: JSON.stringify({
|
|
2283
2311
|
parent,
|
|
2284
2312
|
description,
|
|
2285
|
-
owners: [owner],
|
|
2313
|
+
owners: owner ? [owner] : [],
|
|
2286
2314
|
create_empty_commit: false
|
|
2287
2315
|
}),
|
|
2288
2316
|
headers: {
|
|
@@ -2339,6 +2367,11 @@ function createPublishGerritAction(options) {
|
|
|
2339
2367
|
title: "Default Author Email",
|
|
2340
2368
|
type: "string",
|
|
2341
2369
|
description: `Sets the default author email for the commit.`
|
|
2370
|
+
},
|
|
2371
|
+
sourcePath: {
|
|
2372
|
+
title: "Source Path",
|
|
2373
|
+
type: "string",
|
|
2374
|
+
description: `Path within the workspace that will be used as the repository root. If omitted, the entire workspace will be published as the repository.`
|
|
2342
2375
|
}
|
|
2343
2376
|
}
|
|
2344
2377
|
},
|
|
@@ -2363,16 +2396,14 @@ function createPublishGerritAction(options) {
|
|
|
2363
2396
|
defaultBranch = "master",
|
|
2364
2397
|
gitAuthorName,
|
|
2365
2398
|
gitAuthorEmail,
|
|
2366
|
-
gitCommitMessage = "initial commit"
|
|
2399
|
+
gitCommitMessage = "initial commit",
|
|
2400
|
+
sourcePath
|
|
2367
2401
|
} = ctx.input;
|
|
2368
2402
|
const { repo, host, owner, workspace } = parseRepoUrl(repoUrl, integrations);
|
|
2369
2403
|
const integrationConfig = integrations.gerrit.byHost(host);
|
|
2370
2404
|
if (!integrationConfig) {
|
|
2371
2405
|
throw new errors.InputError(`No matching integration configuration for host ${host}, please check your integrations config`);
|
|
2372
2406
|
}
|
|
2373
|
-
if (!owner) {
|
|
2374
|
-
throw new errors.InputError(`Invalid URL provider was included in the repo URL to create ${ctx.input.repoUrl}, missing owner`);
|
|
2375
|
-
}
|
|
2376
2407
|
if (!workspace) {
|
|
2377
2408
|
throw new errors.InputError(`Invalid URL provider was included in the repo URL to create ${ctx.input.repoUrl}, missing workspace`);
|
|
2378
2409
|
}
|
|
@@ -2392,7 +2423,7 @@ function createPublishGerritAction(options) {
|
|
|
2392
2423
|
};
|
|
2393
2424
|
const remoteUrl = `${integrationConfig.config.cloneUrl}/a/${repo}`;
|
|
2394
2425
|
await initRepoAndPush({
|
|
2395
|
-
dir: getRepoSourceDirectory(ctx.workspacePath,
|
|
2426
|
+
dir: getRepoSourceDirectory(ctx.workspacePath, sourcePath),
|
|
2396
2427
|
remoteUrl,
|
|
2397
2428
|
auth,
|
|
2398
2429
|
defaultBranch,
|