@backstage/plugin-scaffolder-backend-module-gerrit 0.2.1-next.1 → 0.2.1

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.
@@ -0,0 +1,118 @@
1
+ 'use strict';
2
+
3
+ var yaml = require('yaml');
4
+
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
6
+
7
+ var yaml__default = /*#__PURE__*/_interopDefaultCompat(yaml);
8
+
9
+ const examples = [
10
+ {
11
+ description: "Creates a new Gerrit review with minimal options",
12
+ example: yaml__default.default.stringify({
13
+ steps: [
14
+ {
15
+ id: "publish",
16
+ action: "publish:gerrit:review",
17
+ name: "Publish new gerrit review",
18
+ input: {
19
+ repoUrl: "gerrithost.org?repo=repo&owner=owner",
20
+ gitCommitMessage: "Initial Commit Message"
21
+ }
22
+ }
23
+ ]
24
+ })
25
+ },
26
+ {
27
+ description: "Creates a new Gerrit review with gitAuthorName",
28
+ example: yaml__default.default.stringify({
29
+ steps: [
30
+ {
31
+ id: "publish",
32
+ action: "publish:gerrit:review",
33
+ name: "Publish new gerrit review",
34
+ input: {
35
+ repoUrl: "gerrithost.org?repo=repo&owner=owner",
36
+ gitCommitMessage: "Initial Commit Message",
37
+ gitAuthorName: "Test User"
38
+ }
39
+ }
40
+ ]
41
+ })
42
+ },
43
+ {
44
+ description: "Creates a new Gerrit review with gitAuthorEmail",
45
+ example: yaml__default.default.stringify({
46
+ steps: [
47
+ {
48
+ id: "publish",
49
+ action: "publish:gerrit:review",
50
+ name: "Publish new gerrit review",
51
+ input: {
52
+ repoUrl: "gerrithost.org?repo=repo&owner=owner",
53
+ gitCommitMessage: "Initial Commit Message",
54
+ gitAuthorName: "Test User",
55
+ gitAuthorEmail: "test.user@example.com"
56
+ }
57
+ }
58
+ ]
59
+ })
60
+ },
61
+ {
62
+ description: "Creates a new Gerrit review with custom branch",
63
+ example: yaml__default.default.stringify({
64
+ steps: [
65
+ {
66
+ id: "publish",
67
+ action: "publish:gerrit:review",
68
+ name: "Publish new gerrit review",
69
+ input: {
70
+ repoUrl: "gerrithost.org?repo=repo&owner=owner",
71
+ gitCommitMessage: "Initial Commit Message",
72
+ branch: "develop"
73
+ }
74
+ }
75
+ ]
76
+ })
77
+ },
78
+ {
79
+ description: "Creates a new Gerrit review with custom sourcePath",
80
+ example: yaml__default.default.stringify({
81
+ steps: [
82
+ {
83
+ id: "publish",
84
+ action: "publish:gerrit:review",
85
+ name: "Publish new gerrit review",
86
+ input: {
87
+ repoUrl: "gerrithost.org?repo=repo&owner=owner",
88
+ gitCommitMessage: "Initial Commit Message",
89
+ sourcePath: "./src"
90
+ }
91
+ }
92
+ ]
93
+ })
94
+ },
95
+ {
96
+ description: "Creates a new Gerrit review with all properties",
97
+ example: yaml__default.default.stringify({
98
+ steps: [
99
+ {
100
+ id: "publish",
101
+ action: "publish:gerrit:review",
102
+ name: "Publish new gerrit review",
103
+ input: {
104
+ repoUrl: "gerrithost.org?repo=repo&owner=owner",
105
+ gitCommitMessage: "Initial Commit Message",
106
+ gitAuthorName: "Test User",
107
+ gitAuthorEmail: "test.user@example.com",
108
+ branch: "develop",
109
+ sourcePath: "./src"
110
+ }
111
+ }
112
+ ]
113
+ })
114
+ }
115
+ ];
116
+
117
+ exports.examples = examples;
118
+ //# sourceMappingURL=gerritReview.examples.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gerritReview.examples.cjs.js","sources":["../../src/actions/gerritReview.examples.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TemplateExample } from '@backstage/plugin-scaffolder-node';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Creates a new Gerrit review with minimal options',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:gerrit:review',\n name: 'Publish new gerrit review',\n input: {\n repoUrl: 'gerrithost.org?repo=repo&owner=owner',\n gitCommitMessage: 'Initial Commit Message',\n },\n },\n ],\n }),\n },\n {\n description: 'Creates a new Gerrit review with gitAuthorName',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:gerrit:review',\n name: 'Publish new gerrit review',\n input: {\n repoUrl: 'gerrithost.org?repo=repo&owner=owner',\n gitCommitMessage: 'Initial Commit Message',\n gitAuthorName: 'Test User',\n },\n },\n ],\n }),\n },\n {\n description: 'Creates a new Gerrit review with gitAuthorEmail',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:gerrit:review',\n name: 'Publish new gerrit review',\n input: {\n repoUrl: 'gerrithost.org?repo=repo&owner=owner',\n gitCommitMessage: 'Initial Commit Message',\n gitAuthorName: 'Test User',\n gitAuthorEmail: 'test.user@example.com',\n },\n },\n ],\n }),\n },\n {\n description: 'Creates a new Gerrit review with custom branch',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:gerrit:review',\n name: 'Publish new gerrit review',\n input: {\n repoUrl: 'gerrithost.org?repo=repo&owner=owner',\n gitCommitMessage: 'Initial Commit Message',\n branch: 'develop',\n },\n },\n ],\n }),\n },\n {\n description: 'Creates a new Gerrit review with custom sourcePath',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:gerrit:review',\n name: 'Publish new gerrit review',\n input: {\n repoUrl: 'gerrithost.org?repo=repo&owner=owner',\n gitCommitMessage: 'Initial Commit Message',\n sourcePath: './src',\n },\n },\n ],\n }),\n },\n {\n description: 'Creates a new Gerrit review with all properties',\n example: yaml.stringify({\n steps: [\n {\n id: 'publish',\n action: 'publish:gerrit:review',\n name: 'Publish new gerrit review',\n input: {\n repoUrl: 'gerrithost.org?repo=repo&owner=owner',\n gitCommitMessage: 'Initial Commit Message',\n gitAuthorName: 'Test User',\n gitAuthorEmail: 'test.user@example.com',\n branch: 'develop',\n sourcePath: './src',\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAmBO,MAAM,QAA8B,GAAA;AAAA,EACzC;AAAA,IACE,WAAa,EAAA,kDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,SAAA;AAAA,UACJ,MAAQ,EAAA,uBAAA;AAAA,UACR,IAAM,EAAA,2BAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,sCAAA;AAAA,YACT,gBAAkB,EAAA,wBAAA;AAAA,WACpB;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAa,EAAA,gDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,SAAA;AAAA,UACJ,MAAQ,EAAA,uBAAA;AAAA,UACR,IAAM,EAAA,2BAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,sCAAA;AAAA,YACT,gBAAkB,EAAA,wBAAA;AAAA,YAClB,aAAe,EAAA,WAAA;AAAA,WACjB;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAa,EAAA,iDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,SAAA;AAAA,UACJ,MAAQ,EAAA,uBAAA;AAAA,UACR,IAAM,EAAA,2BAAA;AAAA,UACN,KAAO,EAAA;AAAA,Y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