@backstage/plugin-scaffolder-backend-module-gitlab 0.5.1-next.1 → 0.6.0

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +1 -1
  3. package/dist/actions/gitlab.cjs.js +374 -0
  4. package/dist/actions/gitlab.cjs.js.map +1 -0
  5. package/dist/actions/gitlab.examples.cjs.js +155 -0
  6. package/dist/actions/gitlab.examples.cjs.js.map +1 -0
  7. package/dist/actions/gitlabGroupEnsureExists.cjs.js +68 -0
  8. package/dist/actions/gitlabGroupEnsureExists.cjs.js.map +1 -0
  9. package/dist/actions/gitlabGroupEnsureExists.examples.cjs.js +78 -0
  10. package/dist/actions/gitlabGroupEnsureExists.examples.cjs.js.map +1 -0
  11. package/dist/actions/gitlabIssueCreate.cjs.js +136 -0
  12. package/dist/actions/gitlabIssueCreate.cjs.js.map +1 -0
  13. package/dist/actions/gitlabIssueCreate.examples.cjs.js +235 -0
  14. package/dist/actions/gitlabIssueCreate.examples.cjs.js.map +1 -0
  15. package/dist/actions/gitlabIssueEdit.cjs.js +163 -0
  16. package/dist/actions/gitlabIssueEdit.cjs.js.map +1 -0
  17. package/dist/actions/gitlabIssueEdit.examples.cjs.js +250 -0
  18. package/dist/actions/gitlabIssueEdit.examples.cjs.js.map +1 -0
  19. package/dist/actions/gitlabMergeRequest.cjs.js +281 -0
  20. package/dist/actions/gitlabMergeRequest.cjs.js.map +1 -0
  21. package/dist/actions/gitlabMergeRequest.examples.cjs.js +134 -0
  22. package/dist/actions/gitlabMergeRequest.examples.cjs.js.map +1 -0
  23. package/dist/actions/gitlabPipelineTrigger.cjs.js +89 -0
  24. package/dist/actions/gitlabPipelineTrigger.cjs.js.map +1 -0
  25. package/dist/actions/gitlabPipelineTrigger.examples.cjs.js +94 -0
  26. package/dist/actions/gitlabPipelineTrigger.examples.cjs.js.map +1 -0
  27. package/dist/actions/gitlabProjectAccessTokenCreate.cjs.js +85 -0
  28. package/dist/actions/gitlabProjectAccessTokenCreate.cjs.js.map +1 -0
  29. package/dist/actions/gitlabProjectAccessTokenCreate.examples.cjs.js +250 -0
  30. package/dist/actions/gitlabProjectAccessTokenCreate.examples.cjs.js.map +1 -0
  31. package/dist/actions/gitlabProjectDeployTokenCreate.cjs.js +58 -0
  32. package/dist/actions/gitlabProjectDeployTokenCreate.cjs.js.map +1 -0
  33. package/dist/actions/gitlabProjectDeployTokenCreate.examples.cjs.js +100 -0
  34. package/dist/actions/gitlabProjectDeployTokenCreate.examples.cjs.js.map +1 -0
  35. package/dist/actions/gitlabProjectVariableCreate.cjs.js +61 -0
  36. package/dist/actions/gitlabProjectVariableCreate.cjs.js.map +1 -0
  37. package/dist/actions/gitlabProjectVariableCreate.examples.cjs.js +151 -0
  38. package/dist/actions/gitlabProjectVariableCreate.examples.cjs.js.map +1 -0
  39. package/dist/actions/gitlabRepoPush.cjs.js +154 -0
  40. package/dist/actions/gitlabRepoPush.cjs.js.map +1 -0
  41. package/dist/actions/gitlabRepoPush.examples.cjs.js +67 -0
  42. package/dist/actions/gitlabRepoPush.examples.cjs.js.map +1 -0
  43. package/dist/actions/helpers.cjs.js +28 -0
  44. package/dist/actions/helpers.cjs.js.map +1 -0
  45. package/dist/commonGitlabConfig.cjs.js +32 -0
  46. package/dist/commonGitlabConfig.cjs.js.map +1 -0
  47. package/dist/index.cjs.js +28 -2929
  48. package/dist/index.cjs.js.map +1 -1
  49. package/dist/index.d.ts +1 -1
  50. package/dist/module.cjs.js +47 -0
  51. package/dist/module.cjs.js.map +1 -0
  52. package/dist/util.cjs.js +129 -0
  53. package/dist/util.cjs.js.map +1 -0
  54. package/package.json +11 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitlabProjectDeployTokenCreate.examples.cjs.js","sources":["../../src/actions/gitlabProjectDeployTokenCreate.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 */\nimport { TemplateExample } from '@backstage/plugin-scaffolder-node';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Create a GitLab project deploy token with minimal options.',\n example: yaml.stringify({\n steps: [\n {\n id: 'createDeployToken',\n action: 'gitlab:projectDeployToken:create',\n name: 'Create GitLab Project Deploy Token',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: '456',\n name: 'tokenname',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitLab project deploy token with custom scopes.',\n example: yaml.stringify({\n steps: [\n {\n id: 'createDeployToken',\n action: 'gitlab:projectDeployToken:create',\n name: 'Create GitLab Project Deploy Token',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: '789',\n name: 'tokenname',\n scopes: ['read_registry', 'write_repository'],\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitLab project deploy token with a specified name.',\n example: yaml.stringify({\n steps: [\n {\n id: 'createDeployToken',\n action: 'gitlab:projectDeployToken:create',\n name: 'Create GitLab Project Deploy Token',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: '101112',\n name: 'my-custom-token',\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a GitLab project deploy token with a numeric project ID.',\n example: yaml.stringify({\n steps: [\n {\n id: 'createDeployToken',\n action: 'gitlab:projectDeployToken:create',\n name: 'Create GitLab Project Deploy Token',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: 42,\n name: 'tokenname',\n },\n },\n ],\n }),\n },\n\n {\n description: 'Create a GitLab project deploy token with a custom username',\n example: yaml.stringify({\n steps: [\n {\n id: 'createDeployToken',\n action: 'gitlab:projectDeployToken:create',\n name: 'Create GitLab Project Deploy Token',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: 42,\n name: 'tokenname',\n username: 'tokenuser',\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAkBO,MAAM,QAA8B,GAAA;AAAA,EACzC;AAAA,IACE,WAAa,EAAA,4DAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,mBAAA;AAAA,UACJ,MAAQ,EAAA,kCAAA;AAAA,UACR,IAAM,EAAA,oCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,SAAW,EAAA,KAAA;AAAA,YACX,IAAM,EAAA,WAAA;AAAA,WACR;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAa,EAAA,0DAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,mBAAA;AAAA,UACJ,MAAQ,EAAA,kCAAA;AAAA,UACR,IAAM,EAAA,oCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,SAAW,EAAA,KAAA;AAAA,YACX,IAAM,EAAA,WAAA;AAAA,YACN,MAAA,EAAQ,CAAC,eAAA,EAAiB,kBAAkB,CAAA;AAAA,WAC9C;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AAAA,EACA;AAAA,IACE,WAAa,EAAA,6DAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,mBAAA;AAAA,UACJ,MAAQ,EAAA,kCAAA;AAAA,UACR,IAAM,EAAA,oCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,SAAW,EAAA,QAAA;AAAA,YACX,IAAM,EAAA,iBAAA;AAAA,WACR;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AAAA,EACA;AAAA,IACE,WACE,EAAA,iEAAA;AAAA,IACF,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,mBAAA;AAAA,UACJ,MAAQ,EAAA,kCAAA;AAAA,UACR,IAAM,EAAA,oCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,SAAW,EAAA,EAAA;AAAA,YACX,IAAM,EAAA,WAAA;AAAA,WACR;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AAAA,EAEA;AAAA,IACE,WAAa,EAAA,6DAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,mBAAA;AAAA,UACJ,MAAQ,EAAA,kCAAA;AAAA,UACR,IAAM,EAAA,oCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,SAAW,EAAA,EAAA;AAAA,YACX,IAAM,EAAA,WAAA;AAAA,YACN,QAAU,EAAA,WAAA;AAAA,WACZ;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AACF;;;;"}
@@ -0,0 +1,61 @@
1
+ 'use strict';
2
+
3
+ var pluginScaffolderNode = require('@backstage/plugin-scaffolder-node');
4
+ var zod = require('zod');
5
+ var commonGitlabConfig = require('../commonGitlabConfig.cjs.js');
6
+ var util = require('../util.cjs.js');
7
+ var gitlabProjectVariableCreate_examples = require('./gitlabProjectVariableCreate.examples.cjs.js');
8
+
9
+ const createGitlabProjectVariableAction = (options) => {
10
+ const { integrations } = options;
11
+ return pluginScaffolderNode.createTemplateAction({
12
+ id: "gitlab:projectVariable:create",
13
+ examples: gitlabProjectVariableCreate_examples.examples,
14
+ schema: {
15
+ input: commonGitlabConfig.default.merge(
16
+ zod.z.object({
17
+ projectId: zod.z.union([zod.z.number(), zod.z.string()], {
18
+ description: "Project ID"
19
+ }),
20
+ key: zod.z.string({
21
+ description: "The key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed"
22
+ }).regex(/^[A-Za-z0-9_]{1,255}$/),
23
+ value: zod.z.string({ description: "The value of a variable" }),
24
+ variableType: zod.z.string({
25
+ description: "Variable Type (env_var or file)"
26
+ }),
27
+ variableProtected: zod.z.boolean({ description: "Whether the variable is protected" }).default(false).optional(),
28
+ masked: zod.z.boolean({ description: "Whether the variable is masked" }).default(false).optional(),
29
+ raw: zod.z.boolean({ description: "Whether the variable is expandable" }).default(false).optional(),
30
+ environmentScope: zod.z.string({ description: "The environment_scope of the variable" }).default("*").optional()
31
+ })
32
+ )
33
+ },
34
+ async handler(ctx) {
35
+ const {
36
+ repoUrl,
37
+ projectId,
38
+ key,
39
+ value,
40
+ variableType,
41
+ variableProtected = false,
42
+ masked = false,
43
+ raw = false,
44
+ environmentScope = "*",
45
+ token
46
+ } = ctx.input;
47
+ const { host } = util.parseRepoUrl(repoUrl, integrations);
48
+ const api = util.getClient({ host, integrations, token });
49
+ await api.ProjectVariables.create(projectId, key, value, {
50
+ variableType,
51
+ protected: variableProtected,
52
+ masked,
53
+ raw,
54
+ environmentScope
55
+ });
56
+ }
57
+ });
58
+ };
59
+
60
+ exports.createGitlabProjectVariableAction = createGitlabProjectVariableAction;
61
+ //# sourceMappingURL=gitlabProjectVariableCreate.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitlabProjectVariableCreate.cjs.js","sources":["../../src/actions/gitlabProjectVariableCreate.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { ScmIntegrationRegistry } from '@backstage/integration';\nimport { createTemplateAction } from '@backstage/plugin-scaffolder-node';\nimport { VariableType } from '@gitbeaker/rest';\nimport { z } from 'zod';\nimport commonGitlabConfig from '../commonGitlabConfig';\nimport { getClient, parseRepoUrl } from '../util';\nimport { examples } from './gitlabProjectVariableCreate.examples';\n\n/**\n * Creates a `gitlab:projectVariable:create` Scaffolder action.\n *\n * @param options - Templating configuration.\n * @public\n */\nexport const createGitlabProjectVariableAction = (options: {\n integrations: ScmIntegrationRegistry;\n}) => {\n const { integrations } = options;\n return createTemplateAction({\n id: 'gitlab:projectVariable:create',\n examples,\n schema: {\n input: commonGitlabConfig.merge(\n z.object({\n projectId: z.union([z.number(), z.string()], {\n description: 'Project ID',\n }),\n key: z\n .string({\n description:\n 'The key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed',\n })\n .regex(/^[A-Za-z0-9_]{1,255}$/),\n value: z.string({ description: 'The value of a variable' }),\n variableType: z.string({\n description: 'Variable Type (env_var or file)',\n }),\n variableProtected: z\n .boolean({ description: 'Whether the variable is protected' })\n .default(false)\n .optional(),\n masked: z\n .boolean({ description: 'Whether the variable is masked' })\n .default(false)\n .optional(),\n raw: z\n .boolean({ description: 'Whether the variable is expandable' })\n .default(false)\n .optional(),\n environmentScope: z\n .string({ description: 'The environment_scope of the variable' })\n .default('*')\n .optional(),\n }),\n ),\n },\n async handler(ctx) {\n const {\n repoUrl,\n projectId,\n key,\n value,\n variableType,\n variableProtected = false,\n masked = false,\n raw = false,\n environmentScope = '*',\n token,\n } = ctx.input;\n\n const { host } = parseRepoUrl(repoUrl, integrations);\n\n const api = getClient({ host, integrations, token });\n\n await api.ProjectVariables.create(projectId, key, value, {\n variableType: variableType as VariableType,\n protected: variableProtected,\n masked,\n raw,\n environmentScope,\n });\n },\n });\n};\n"],"names":["createTemplateAction","examples","commonGitlabConfig","z","parseRepoUrl","getClient"],"mappings":";;;;;;;;AA8Ba,MAAA,iCAAA,GAAoC,CAAC,OAE5C,KAAA;AACJ,EAAM,MAAA,EAAE,cAAiB,GAAA,OAAA,CAAA;AACzB,EAAA,OAAOA,yCAAqB,CAAA;AAAA,IAC1B,EAAI,EAAA,+BAAA;AAAA,cACJC,6CAAA;AAAA,IACA,MAAQ,EAAA;AAAA,MACN,OAAOC,0BAAmB,CAAA,KAAA;AAAA,QACxBC,MAAE,MAAO,CAAA;AAAA,UACP,SAAA,EAAWA,KAAE,CAAA,KAAA,CAAM,CAACA,KAAA,CAAE,QAAU,EAAAA,KAAA,CAAE,MAAO,EAAC,CAAG,EAAA;AAAA,YAC3C,WAAa,EAAA,YAAA;AAAA,WACd,CAAA;AAAA,UACD,GAAA,EAAKA,MACF,MAAO,CAAA;AAAA,YACN,WACE,EAAA,qGAAA;AAAA,WACH,CACA,CAAA,KAAA,CAAM,uBAAuB,CAAA;AAAA,UAChC,OAAOA,KAAE,CAAA,MAAA,CAAO,EAAE,WAAA,EAAa,2BAA2B,CAAA;AAAA,UAC1D,YAAA,EAAcA,MAAE,MAAO,CAAA;AAAA,YACrB,WAAa,EAAA,iCAAA;AAAA,WACd,CAAA;AAAA,UACD,iBAAA,EAAmBA,KAChB,CAAA,OAAA,CAAQ,EAAE,WAAA,EAAa,mCAAoC,EAAC,CAC5D,CAAA,OAAA,CAAQ,KAAK,CAAA,CACb,QAAS,EAAA;AAAA,UACZ,MAAA,EAAQA,KACL,CAAA,OAAA,CAAQ,EAAE,WAAA,EAAa,gCAAiC,EAAC,CACzD,CAAA,OAAA,CAAQ,KAAK,CAAA,CACb,QAAS,EAAA;AAAA,UACZ,GAAA,EAAKA,KACF,CAAA,OAAA,CAAQ,EAAE,WAAA,EAAa,oCAAqC,EAAC,CAC7D,CAAA,OAAA,CAAQ,KAAK,CAAA,CACb,QAAS,EAAA;AAAA,UACZ,gBAAA,EAAkBA,KACf,CAAA,MAAA,CAAO,EAAE,WAAA,EAAa,uCAAwC,EAAC,CAC/D,CAAA,OAAA,CAAQ,GAAG,CAAA,CACX,QAAS,EAAA;AAAA,SACb,CAAA;AAAA,OACH;AAAA,KACF;AAAA,IACA,MAAM,QAAQ,GAAK,EAAA;AACjB,MAAM,MAAA;AAAA,QACJ,OAAA;AAAA,QACA,SAAA;AAAA,QACA,GAAA;AAAA,QACA,KAAA;AAAA,QACA,YAAA;AAAA,QACA,iBAAoB,GAAA,KAAA;AAAA,QACpB,MAAS,GAAA,KAAA;AAAA,QACT,GAAM,GAAA,KAAA;AAAA,QACN,gBAAmB,GAAA,GAAA;AAAA,QACnB,KAAA;AAAA,UACE,GAAI,CAAA,KAAA,CAAA;AAER,MAAA,MAAM,EAAE,IAAA,EAAS,GAAAC,iBAAA,CAAa,SAAS,YAAY,CAAA,CAAA;AAEnD,MAAA,MAAM,MAAMC,cAAU,CAAA,EAAE,IAAM,EAAA,YAAA,EAAc,OAAO,CAAA,CAAA;AAEnD,MAAA,MAAM,GAAI,CAAA,gBAAA,CAAiB,MAAO,CAAA,SAAA,EAAW,KAAK,KAAO,EAAA;AAAA,QACvD,YAAA;AAAA,QACA,SAAW,EAAA,iBAAA;AAAA,QACX,MAAA;AAAA,QACA,GAAA;AAAA,QACA,gBAAA;AAAA,OACD,CAAA,CAAA;AAAA,KACH;AAAA,GACD,CAAA,CAAA;AACH;;;;"}
@@ -0,0 +1,151 @@
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: "Creating a GitLab project variable of type env_var",
12
+ example: yaml__default.default.stringify({
13
+ steps: [
14
+ {
15
+ id: "createVariable",
16
+ action: "gitlab:createGitlabProjectVariableAction",
17
+ name: "Create GitLab Project Variable",
18
+ input: {
19
+ repoUrl: "gitlab.com?repo=repo&owner=owner",
20
+ projectId: "123",
21
+ key: "MY_VARIABLE",
22
+ value: "my_value",
23
+ variableType: "env_var"
24
+ }
25
+ }
26
+ ]
27
+ })
28
+ },
29
+ {
30
+ description: "Creating a GitLab project variable of type file",
31
+ example: yaml__default.default.stringify({
32
+ steps: [
33
+ {
34
+ id: "createVariable",
35
+ action: "gitlab:createGitlabProjectVariableAction",
36
+ name: "Create GitLab Project Variable",
37
+ input: {
38
+ repoUrl: "gitlab.com?repo=repo&owner=owner",
39
+ projectId: "123",
40
+ key: "MY_VARIABLE",
41
+ value: "my-file-content",
42
+ variableType: "file"
43
+ }
44
+ }
45
+ ]
46
+ })
47
+ },
48
+ {
49
+ description: "Create a GitLab project variable that is protected.",
50
+ example: yaml__default.default.stringify({
51
+ steps: [
52
+ {
53
+ id: "createVariable",
54
+ action: "gitlab:createGitlabProjectVariableAction",
55
+ name: "Create GitLab Project Variable",
56
+ input: {
57
+ repoUrl: "gitlab.com?repo=repo&owner=owner",
58
+ projectId: "456",
59
+ key: "MY_VARIABLE",
60
+ value: "my_value",
61
+ variableType: "env_var",
62
+ variableProtected: true
63
+ }
64
+ }
65
+ ]
66
+ })
67
+ },
68
+ {
69
+ description: "Create a GitLab project variable with masked flag as true",
70
+ example: yaml__default.default.stringify({
71
+ steps: [
72
+ {
73
+ id: "createVariable",
74
+ action: "gitlab:createGitlabProjectVariableAction",
75
+ name: "Create GitLab Project Variable",
76
+ input: {
77
+ repoUrl: "gitlab.com?repo=repo&owner=owner",
78
+ projectId: "789",
79
+ key: "DB_PASSWORD",
80
+ value: "password123",
81
+ variableType: "env_var",
82
+ masked: true
83
+ }
84
+ }
85
+ ]
86
+ })
87
+ },
88
+ {
89
+ description: "Create a GitLab project variable that is expandable.",
90
+ example: yaml__default.default.stringify({
91
+ steps: [
92
+ {
93
+ id: "createVariable",
94
+ action: "gitlab:projectVariable:create",
95
+ name: "Create GitLab Project Variable",
96
+ input: {
97
+ repoUrl: "gitlab.com?repo=repo&owner=owner",
98
+ projectId: "123",
99
+ key: "MY_VARIABLE",
100
+ value: "my_value",
101
+ variableType: "env_var",
102
+ raw: true
103
+ }
104
+ }
105
+ ]
106
+ })
107
+ },
108
+ {
109
+ description: "Create a GitLab project variable with a specific environment scope.",
110
+ example: yaml__default.default.stringify({
111
+ steps: [
112
+ {
113
+ id: "createVariable",
114
+ action: "gitlab:projectVariable:create",
115
+ name: "Create GitLab Project Variable",
116
+ input: {
117
+ repoUrl: "gitlab.com?repo=repo&owner=owner",
118
+ projectId: "123",
119
+ key: "MY_VARIABLE",
120
+ value: "my_value",
121
+ variableType: "env_var",
122
+ environmentScope: "production"
123
+ }
124
+ }
125
+ ]
126
+ })
127
+ },
128
+ {
129
+ description: "Create a GitLab project variable with a wildcard environment scope.",
130
+ example: yaml__default.default.stringify({
131
+ steps: [
132
+ {
133
+ id: "createVariable",
134
+ action: "gitlab:projectVariable:create",
135
+ name: "Create GitLab Project Variable",
136
+ input: {
137
+ repoUrl: "gitlab.com?repo=repo&owner=owner",
138
+ projectId: "123",
139
+ key: "MY_VARIABLE",
140
+ value: "my_value",
141
+ variableType: "env_var",
142
+ environmentScope: "*"
143
+ }
144
+ }
145
+ ]
146
+ })
147
+ }
148
+ ];
149
+
150
+ exports.examples = examples;
151
+ //# sourceMappingURL=gitlabProjectVariableCreate.examples.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitlabProjectVariableCreate.examples.cjs.js","sources":["../../src/actions/gitlabProjectVariableCreate.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 */\nimport { TemplateExample } from '@backstage/plugin-scaffolder-node';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Creating a GitLab project variable of type env_var',\n example: yaml.stringify({\n steps: [\n {\n id: 'createVariable',\n action: 'gitlab:createGitlabProjectVariableAction',\n name: 'Create GitLab Project Variable',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: '123',\n key: 'MY_VARIABLE',\n value: 'my_value',\n variableType: 'env_var',\n },\n },\n ],\n }),\n },\n {\n description: 'Creating a GitLab project variable of type file',\n example: yaml.stringify({\n steps: [\n {\n id: 'createVariable',\n action: 'gitlab:createGitlabProjectVariableAction',\n name: 'Create GitLab Project Variable',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: '123',\n key: 'MY_VARIABLE',\n value: 'my-file-content',\n variableType: 'file',\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitLab project variable that is protected.',\n example: yaml.stringify({\n steps: [\n {\n id: 'createVariable',\n action: 'gitlab:createGitlabProjectVariableAction',\n name: 'Create GitLab Project Variable',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: '456',\n key: 'MY_VARIABLE',\n value: 'my_value',\n variableType: 'env_var',\n variableProtected: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitLab project variable with masked flag as true',\n example: yaml.stringify({\n steps: [\n {\n id: 'createVariable',\n action: 'gitlab:createGitlabProjectVariableAction',\n name: 'Create GitLab Project Variable',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: '789',\n key: 'DB_PASSWORD',\n value: 'password123',\n variableType: 'env_var',\n masked: true,\n },\n },\n ],\n }),\n },\n {\n description: 'Create a GitLab project variable that is expandable.',\n example: yaml.stringify({\n steps: [\n {\n id: 'createVariable',\n action: 'gitlab:projectVariable:create',\n name: 'Create GitLab Project Variable',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: '123',\n key: 'MY_VARIABLE',\n value: 'my_value',\n variableType: 'env_var',\n raw: true,\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a GitLab project variable with a specific environment scope.',\n example: yaml.stringify({\n steps: [\n {\n id: 'createVariable',\n action: 'gitlab:projectVariable:create',\n name: 'Create GitLab Project Variable',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: '123',\n key: 'MY_VARIABLE',\n value: 'my_value',\n variableType: 'env_var',\n environmentScope: 'production',\n },\n },\n ],\n }),\n },\n {\n description:\n 'Create a GitLab project variable with a wildcard environment scope.',\n example: yaml.stringify({\n steps: [\n {\n id: 'createVariable',\n action: 'gitlab:projectVariable:create',\n name: 'Create GitLab Project Variable',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n projectId: '123',\n key: 'MY_VARIABLE',\n value: 'my_value',\n variableType: 'env_var',\n environmentScope: '*',\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAkBO,MAAM,QAA8B,GAAA;AAAA,EACzC;AAAA,IACE,WAAa,EAAA,oDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,gBAAA;AAAA,UACJ,MAAQ,EAAA,0CAAA;AAAA,UACR,IAAM,EAAA,gCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,SAAW,EAAA,KAAA;AAAA,YACX,GAAK,EAAA,aAAA;AAAA,YACL,KAAO,EAAA,UAAA;AAAA,YACP,YAAc,EAAA,SAAA;AA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AA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,gBAAA;AAAA,UACJ,MAAQ,EAAA,+BAAA;AAAA,UACR,IAAM,EAAA,gCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,SAAW,EAAA,KAAA;AAAA,YACX,GAAK,EAAA,aAAA;AAAA,YACL,KAAO,EAAA,UAAA;AAAA,YACP,YAAc,EAAA,SAAA;AAAA,YACd,gBAAkB,EAAA,GAAA;AAAA,WACpB;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AACF;;;;"}
@@ -0,0 +1,154 @@
1
+ 'use strict';
2
+
3
+ var pluginScaffolderNode = require('@backstage/plugin-scaffolder-node');
4
+ var path = require('path');
5
+ var errors = require('@backstage/errors');
6
+ var backendPluginApi = require('@backstage/backend-plugin-api');
7
+ var helpers = require('./helpers.cjs.js');
8
+ var gitlabRepoPush_examples = require('./gitlabRepoPush.examples.cjs.js');
9
+
10
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
11
+
12
+ var path__default = /*#__PURE__*/_interopDefaultCompat(path);
13
+
14
+ const createGitlabRepoPushAction = (options) => {
15
+ const { integrations } = options;
16
+ return pluginScaffolderNode.createTemplateAction({
17
+ id: "gitlab:repo:push",
18
+ examples: gitlabRepoPush_examples.examples,
19
+ schema: {
20
+ input: {
21
+ required: ["repoUrl", "branchName", "commitMessage"],
22
+ type: "object",
23
+ properties: {
24
+ repoUrl: {
25
+ type: "string",
26
+ title: "Repository Location",
27
+ description: `Accepts the format 'gitlab.com?repo=project_name&owner=group_name' where 'project_name' is the repository name and 'group_name' is a group or username`
28
+ },
29
+ branchName: {
30
+ type: "string",
31
+ title: "Source Branch Name",
32
+ description: "The branch name for the commit"
33
+ },
34
+ commitMessage: {
35
+ type: "string",
36
+ title: "Commit Message",
37
+ description: `The commit message`
38
+ },
39
+ sourcePath: {
40
+ type: "string",
41
+ title: "Working Subdirectory",
42
+ description: "Subdirectory of working directory to copy changes from"
43
+ },
44
+ targetPath: {
45
+ type: "string",
46
+ title: "Repository Subdirectory",
47
+ description: "Subdirectory of repository to apply changes to"
48
+ },
49
+ token: {
50
+ title: "Authentication Token",
51
+ type: "string",
52
+ description: "The token to use for authorization to GitLab"
53
+ },
54
+ commitAction: {
55
+ title: "Commit action",
56
+ type: "string",
57
+ enum: ["create", "update", "delete"],
58
+ description: "The action to be used for git commit. Defaults to create."
59
+ }
60
+ }
61
+ },
62
+ output: {
63
+ type: "object",
64
+ properties: {
65
+ projectid: {
66
+ title: "Gitlab Project id/Name(slug)",
67
+ type: "string"
68
+ },
69
+ projectPath: {
70
+ title: "Gitlab Project path",
71
+ type: "string"
72
+ },
73
+ commitHash: {
74
+ title: "The git commit hash of the commit",
75
+ type: "string"
76
+ }
77
+ }
78
+ }
79
+ },
80
+ async handler(ctx) {
81
+ const {
82
+ branchName,
83
+ repoUrl,
84
+ targetPath,
85
+ sourcePath,
86
+ token,
87
+ commitAction
88
+ } = ctx.input;
89
+ const { owner, repo, project } = pluginScaffolderNode.parseRepoUrl(repoUrl, integrations);
90
+ const repoID = project ? project : `${owner}/${repo}`;
91
+ const api = helpers.createGitlabApi({
92
+ integrations,
93
+ token,
94
+ repoUrl
95
+ });
96
+ let fileRoot;
97
+ if (sourcePath) {
98
+ fileRoot = backendPluginApi.resolveSafeChildPath(ctx.workspacePath, sourcePath);
99
+ } else {
100
+ fileRoot = ctx.workspacePath;
101
+ }
102
+ const fileContents = await pluginScaffolderNode.serializeDirectoryContents(fileRoot, {
103
+ gitignore: true
104
+ });
105
+ const actions = fileContents.map((file) => ({
106
+ action: commitAction ?? "create",
107
+ filePath: targetPath ? path__default.default.posix.join(targetPath, file.path) : file.path,
108
+ encoding: "base64",
109
+ content: file.content.toString("base64"),
110
+ execute_filemode: file.executable
111
+ }));
112
+ let branchExists = false;
113
+ try {
114
+ await api.Branches.show(repoID, branchName);
115
+ branchExists = true;
116
+ } catch (e) {
117
+ if (e.response?.statusCode !== 404) {
118
+ throw new errors.InputError(
119
+ `Failed to check status of branch '${branchName}'. Please make sure that branch already exists or Backstage has permissions to create one. ${e}`
120
+ );
121
+ }
122
+ }
123
+ if (!branchExists) {
124
+ try {
125
+ const projects = await api.Projects.show(repoID);
126
+ const { default_branch: defaultBranch } = projects;
127
+ await api.Branches.create(repoID, branchName, String(defaultBranch));
128
+ } catch (e) {
129
+ throw new errors.InputError(
130
+ `The branch '${branchName}' was not found and creation failed with error. Please make sure that branch already exists or Backstage has permissions to create one. ${e}`
131
+ );
132
+ }
133
+ }
134
+ try {
135
+ const commit = await api.Commits.create(
136
+ repoID,
137
+ branchName,
138
+ ctx.input.commitMessage,
139
+ actions
140
+ );
141
+ ctx.output("projectid", repoID);
142
+ ctx.output("projectPath", repoID);
143
+ ctx.output("commitHash", commit.id);
144
+ } catch (e) {
145
+ throw new errors.InputError(
146
+ `Committing the changes to ${branchName} failed. Please check that none of the files created by the template already exists. ${e}`
147
+ );
148
+ }
149
+ }
150
+ });
151
+ };
152
+
153
+ exports.createGitlabRepoPushAction = createGitlabRepoPushAction;
154
+ //# sourceMappingURL=gitlabRepoPush.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitlabRepoPush.cjs.js","sources":["../../src/actions/gitlabRepoPush.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 {\n createTemplateAction,\n parseRepoUrl,\n serializeDirectoryContents,\n} from '@backstage/plugin-scaffolder-node';\nimport { Types } from '@gitbeaker/core';\nimport path from 'path';\nimport { ScmIntegrationRegistry } from '@backstage/integration';\nimport { InputError } from '@backstage/errors';\nimport { resolveSafeChildPath } from '@backstage/backend-plugin-api';\nimport { createGitlabApi } from './helpers';\nimport { examples } from './gitlabRepoPush.examples';\n\n/**\n * Create a new action that commits into a gitlab repository.\n *\n * @public\n */\nexport const createGitlabRepoPushAction = (options: {\n integrations: ScmIntegrationRegistry;\n}) => {\n const { integrations } = options;\n\n return createTemplateAction<{\n repoUrl: string;\n branchName: string;\n commitMessage: string;\n sourcePath?: string;\n targetPath?: string;\n token?: string;\n commitAction?: 'create' | 'delete' | 'update';\n }>({\n id: 'gitlab:repo:push',\n examples,\n schema: {\n input: {\n required: ['repoUrl', 'branchName', 'commitMessage'],\n type: 'object',\n properties: {\n repoUrl: {\n type: 'string',\n title: 'Repository Location',\n description: `Accepts the format 'gitlab.com?repo=project_name&owner=group_name' where 'project_name' is the repository name and 'group_name' is a group or username`,\n },\n branchName: {\n type: 'string',\n title: 'Source Branch Name',\n description: 'The branch name for the commit',\n },\n commitMessage: {\n type: 'string',\n title: 'Commit Message',\n description: `The commit message`,\n },\n sourcePath: {\n type: 'string',\n title: 'Working Subdirectory',\n description:\n 'Subdirectory of working directory to copy changes from',\n },\n targetPath: {\n type: 'string',\n title: 'Repository Subdirectory',\n description: 'Subdirectory of repository to apply changes to',\n },\n token: {\n title: 'Authentication Token',\n type: 'string',\n description: 'The token to use for authorization to GitLab',\n },\n commitAction: {\n title: 'Commit action',\n type: 'string',\n enum: ['create', 'update', 'delete'],\n description:\n 'The action to be used for git commit. Defaults to create.',\n },\n },\n },\n output: {\n type: 'object',\n properties: {\n projectid: {\n title: 'Gitlab Project id/Name(slug)',\n type: 'string',\n },\n projectPath: {\n title: 'Gitlab Project path',\n type: 'string',\n },\n commitHash: {\n title: 'The git commit hash of the commit',\n type: 'string',\n },\n },\n },\n },\n async handler(ctx) {\n const {\n branchName,\n repoUrl,\n targetPath,\n sourcePath,\n token,\n commitAction,\n } = ctx.input;\n\n const { owner, repo, project } = parseRepoUrl(repoUrl, integrations);\n const repoID = project ? project : `${owner}/${repo}`;\n\n const api = createGitlabApi({\n integrations,\n token,\n repoUrl,\n });\n\n let fileRoot: string;\n if (sourcePath) {\n fileRoot = resolveSafeChildPath(ctx.workspacePath, sourcePath);\n } else {\n fileRoot = ctx.workspacePath;\n }\n\n const fileContents = await serializeDirectoryContents(fileRoot, {\n gitignore: true,\n });\n\n const actions: Types.CommitAction[] = fileContents.map(file => ({\n action: commitAction ?? 'create',\n filePath: targetPath\n ? path.posix.join(targetPath, file.path)\n : file.path,\n encoding: 'base64',\n content: file.content.toString('base64'),\n execute_filemode: file.executable,\n }));\n\n let branchExists = false;\n try {\n await api.Branches.show(repoID, branchName);\n branchExists = true;\n } catch (e: any) {\n if (e.response?.statusCode !== 404) {\n throw new InputError(\n `Failed to check status of branch '${branchName}'. Please make sure that branch already exists or Backstage has permissions to create one. ${e}`,\n );\n }\n }\n\n if (!branchExists) {\n // create a branch using the default branch as ref\n try {\n const projects = await api.Projects.show(repoID);\n const { default_branch: defaultBranch } = projects;\n await api.Branches.create(repoID, branchName, String(defaultBranch));\n } catch (e) {\n throw new InputError(\n `The branch '${branchName}' was not found and creation failed with error. Please make sure that branch already exists or Backstage has permissions to create one. ${e}`,\n );\n }\n }\n\n try {\n const commit = await api.Commits.create(\n repoID,\n branchName,\n ctx.input.commitMessage,\n actions,\n );\n ctx.output('projectid', repoID);\n ctx.output('projectPath', repoID);\n ctx.output('commitHash', commit.id);\n } catch (e) {\n throw new InputError(\n `Committing the changes to ${branchName} failed. Please check that none of the files created by the template already exists. ${e}`,\n );\n }\n },\n });\n};\n"],"names":["createTemplateAction","examples","parseRepoUrl","createGitlabApi","resolveSafeChildPath","serializeDirectoryContents","path","InputError"],"mappings":";;;;;;;;;;;;;AAkCa,MAAA,0BAAA,GAA6B,CAAC,OAErC,KAAA;AACJ,EAAM,MAAA,EAAE,cAAiB,GAAA,OAAA,CAAA;AAEzB,EAA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CAAA;AAAA,WACvK,CAAA;AAAA,SACF;AAAA,OACF;AAEA,MAAI,IAAA;AACF,QAAM,MAAA,MAAA,GAAS,MAAM,GAAA,CAAI,OAAQ,CAAA,MAAA;AAAA,UAC/B,MAAA;AAAA,UACA,UAAA;AAAA,UACA,IAAI,KAAM,CAAA,aAAA;AAAA,UACV,OAAA;AAAA,SACF,CAAA;AACA,QAAI,GAAA,CAAA,MAAA,CAAO,aAAa,MAAM,CAAA,CAAA;AAC9B,QAAI,GAAA,CAAA,MAAA,CAAO,eAAe,MAAM,CAAA,CAAA;AAChC,QAAI,GAAA,CAAA,MAAA,CAAO,YAAc,EAAA,MAAA,CAAO,EAAE,CAAA,CAAA;AAAA,eAC3B,CAAG,EAAA;AACV,QAAA,MAAM,IAAIA,iBAAA;AAAA,UACR,CAAA,0BAAA,EAA6B,UAAU,CAAA,qFAAA,EAAwF,CAAC,CAAA,CAAA;AAAA,SAClI,CAAA;AAAA,OACF;AAAA,KACF;AAAA,GACD,CAAA,CAAA;AACH;;;;"}
@@ -0,0 +1,67 @@
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: "Push changes to gitlab repository with minimal changes",
12
+ example: yaml__default.default.stringify({
13
+ steps: [
14
+ {
15
+ id: "pushChanges",
16
+ action: "gitlab:repo:push",
17
+ name: "Push changes to gitlab repository",
18
+ input: {
19
+ repoUrl: "gitlab.com?repo=repo&owner=owner",
20
+ commitMessage: "Initial Commit",
21
+ branchName: "feature-branch"
22
+ }
23
+ }
24
+ ]
25
+ })
26
+ },
27
+ {
28
+ description: "Push changes to gitlab repository with a specific source and target path",
29
+ example: yaml__default.default.stringify({
30
+ steps: [
31
+ {
32
+ id: "pushChanges",
33
+ action: "gitlab:repo:push",
34
+ name: "Push changes to gitlab repository",
35
+ input: {
36
+ repoUrl: "gitlab.com?repo=repo&owner=owner",
37
+ commitMessage: "Initial Commit",
38
+ branchName: "feature-branch",
39
+ sourcePath: "src",
40
+ targetPath: "dest"
41
+ }
42
+ }
43
+ ]
44
+ })
45
+ },
46
+ {
47
+ description: "Push changes to gitlab repository with a specific commit action",
48
+ example: yaml__default.default.stringify({
49
+ steps: [
50
+ {
51
+ id: "pushChanges",
52
+ action: "gitlab:repo:push",
53
+ name: "Push changes to gitlab repository",
54
+ input: {
55
+ repoUrl: "gitlab.com?repo=repo&owner=owner",
56
+ commitMessage: "Initial Commit",
57
+ branchName: "feature-branch",
58
+ commitAction: "update"
59
+ }
60
+ }
61
+ ]
62
+ })
63
+ }
64
+ ];
65
+
66
+ exports.examples = examples;
67
+ //# sourceMappingURL=gitlabRepoPush.examples.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitlabRepoPush.examples.cjs.js","sources":["../../src/actions/gitlabRepoPush.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 */\nimport { TemplateExample } from '@backstage/plugin-scaffolder-node';\nimport yaml from 'yaml';\n\nexport const examples: TemplateExample[] = [\n {\n description: 'Push changes to gitlab repository with minimal changes',\n example: yaml.stringify({\n steps: [\n {\n id: 'pushChanges',\n action: 'gitlab:repo:push',\n name: 'Push changes to gitlab repository',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n commitMessage: 'Initial Commit',\n branchName: 'feature-branch',\n },\n },\n ],\n }),\n },\n {\n description:\n 'Push changes to gitlab repository with a specific source and target path',\n example: yaml.stringify({\n steps: [\n {\n id: 'pushChanges',\n action: 'gitlab:repo:push',\n name: 'Push changes to gitlab repository',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n commitMessage: 'Initial Commit',\n branchName: 'feature-branch',\n sourcePath: 'src',\n targetPath: 'dest',\n },\n },\n ],\n }),\n },\n {\n description:\n 'Push changes to gitlab repository with a specific commit action',\n example: yaml.stringify({\n steps: [\n {\n id: 'pushChanges',\n action: 'gitlab:repo:push',\n name: 'Push changes to gitlab repository',\n input: {\n repoUrl: 'gitlab.com?repo=repo&owner=owner',\n commitMessage: 'Initial Commit',\n branchName: 'feature-branch',\n commitAction: 'update',\n },\n },\n ],\n }),\n },\n];\n"],"names":["yaml"],"mappings":";;;;;;;;AAkBO,MAAM,QAA8B,GAAA;AAAA,EACzC;AAAA,IACE,WAAa,EAAA,wDAAA;AAAA,IACb,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,aAAA;AAAA,UACJ,MAAQ,EAAA,kBAAA;AAAA,UACR,IAAM,EAAA,mCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,aAAe,EAAA,gBAAA;AAAA,YACf,UAAY,EAAA,gBAAA;AAAA,WACd;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AAAA,EACA;AAAA,IACE,WACE,EAAA,0EAAA;AAAA,IACF,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,aAAA;AAAA,UACJ,MAAQ,EAAA,kBAAA;AAAA,UACR,IAAM,EAAA,mCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,aAAe,EAAA,gBAAA;AAAA,YACf,UAAY,EAAA,gBAAA;AAAA,YACZ,UAAY,EAAA,KAAA;AAAA,YACZ,UAAY,EAAA,MAAA;AAAA,WACd;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AAAA,EACA;AAAA,IACE,WACE,EAAA,iEAAA;AAAA,IACF,OAAA,EAASA,sBAAK,SAAU,CAAA;AAAA,MACtB,KAAO,EAAA;AAAA,QACL;AAAA,UACE,EAAI,EAAA,aAAA;AAAA,UACJ,MAAQ,EAAA,kBAAA;AAAA,UACR,IAAM,EAAA,mCAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL,OAAS,EAAA,kCAAA;AAAA,YACT,aAAe,EAAA,gBAAA;AAAA,YACf,UAAY,EAAA,gBAAA;AAAA,YACZ,YAAc,EAAA,QAAA;AAAA,WAChB;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AACF;;;;"}
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var pluginScaffolderNode = require('@backstage/plugin-scaffolder-node');
4
+ var errors = require('@backstage/errors');
5
+ var node = require('@gitbeaker/node');
6
+
7
+ function createGitlabApi(options) {
8
+ const { integrations, token: providedToken, repoUrl } = options;
9
+ const { host } = pluginScaffolderNode.parseRepoUrl(repoUrl, integrations);
10
+ const integrationConfig = integrations.gitlab.byHost(host);
11
+ if (!integrationConfig) {
12
+ throw new errors.InputError(
13
+ `No matching integration configuration for host ${host}, please check your integrations config`
14
+ );
15
+ }
16
+ if (!integrationConfig.config.token && !providedToken) {
17
+ throw new errors.InputError(`No token available for host ${host}`);
18
+ }
19
+ const token = providedToken ?? integrationConfig.config.token;
20
+ const tokenType = providedToken ? "oauthToken" : "token";
21
+ return new node.Gitlab({
22
+ host: integrationConfig.config.baseUrl,
23
+ [tokenType]: token
24
+ });
25
+ }
26
+
27
+ exports.createGitlabApi = createGitlabApi;
28
+ //# sourceMappingURL=helpers.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.cjs.js","sources":["../../src/actions/helpers.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 */\nimport { parseRepoUrl } from '@backstage/plugin-scaffolder-node';\nimport { InputError } from '@backstage/errors';\nimport { Gitlab } from '@gitbeaker/node';\nimport { ScmIntegrationRegistry } from '@backstage/integration';\nimport { Resources } from '@gitbeaker/core';\n\nexport function createGitlabApi(options: {\n integrations: ScmIntegrationRegistry;\n token?: string;\n repoUrl: string;\n}): Resources.Gitlab {\n const { integrations, token: providedToken, repoUrl } = options;\n\n const { host } = parseRepoUrl(repoUrl, integrations);\n\n const integrationConfig = integrations.gitlab.byHost(host);\n\n if (!integrationConfig) {\n throw new InputError(\n `No matching integration configuration for host ${host}, please check your integrations config`,\n );\n }\n\n if (!integrationConfig.config.token && !providedToken) {\n throw new InputError(`No token available for host ${host}`);\n }\n\n const token = providedToken ?? integrationConfig.config.token!;\n const tokenType = providedToken ? 'oauthToken' : 'token';\n\n return new Gitlab({\n host: integrationConfig.config.baseUrl,\n [tokenType]: token,\n });\n}\n"],"names":["parseRepoUrl","InputError","Gitlab"],"mappings":";;;;;;AAqBO,SAAS,gBAAgB,OAIX,EAAA;AACnB,EAAA,MAAM,EAAE,YAAA,EAAc,KAAO,EAAA,aAAA,EAAe,SAAY,GAAA,OAAA,CAAA;AAExD,EAAA,MAAM,EAAE,IAAA,EAAS,GAAAA,iCAAA,CAAa,SAAS,YAAY,CAAA,CAAA;AAEnD,EAAA,MAAM,iBAAoB,GAAA,YAAA,CAAa,MAAO,CAAA,MAAA,CAAO,IAAI,CAAA,CAAA;AAEzD,EAAA,IAAI,CAAC,iBAAmB,EAAA;AACtB,IAAA,MAAM,IAAIC,iBAAA;AAAA,MACR,kDAAkD,IAAI,CAAA,uCAAA,CAAA;AAAA,KACxD,CAAA;AAAA,GACF;AAEA,EAAA,IAAI,CAAC,iBAAA,CAAkB,MAAO,CAAA,KAAA,IAAS,CAAC,aAAe,EAAA;AACrD,IAAA,MAAM,IAAIA,iBAAA,CAAW,CAA+B,4BAAA,EAAA,IAAI,CAAE,CAAA,CAAA,CAAA;AAAA,GAC5D;AAEA,EAAM,MAAA,KAAA,GAAQ,aAAiB,IAAA,iBAAA,CAAkB,MAAO,CAAA,KAAA,CAAA;AACxD,EAAM,MAAA,SAAA,GAAY,gBAAgB,YAAe,GAAA,OAAA,CAAA;AAEjD,EAAA,OAAO,IAAIC,WAAO,CAAA;AAAA,IAChB,IAAA,EAAM,kBAAkB,MAAO,CAAA,OAAA;AAAA,IAC/B,CAAC,SAAS,GAAG,KAAA;AAAA,GACd,CAAA,CAAA;AACH;;;;"}
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var zod = require('zod');
6
+
7
+ const commonGitlabConfig = zod.z.object({
8
+ repoUrl: zod.z.string({ description: "Repository Location" }),
9
+ token: zod.z.string({ description: "The token to use for authorization to GitLab" }).optional()
10
+ });
11
+ const commonGitlabConfigExample = {
12
+ repoUrl: "gitlab.com?owner=namespace-or-owner&repo=project-name",
13
+ token: "${{ secrets.USER_OAUTH_TOKEN }}"
14
+ };
15
+ var IssueType = /* @__PURE__ */ ((IssueType2) => {
16
+ IssueType2["ISSUE"] = "issue";
17
+ IssueType2["INCIDENT"] = "incident";
18
+ IssueType2["TEST"] = "test_case";
19
+ IssueType2["TASK"] = "task";
20
+ return IssueType2;
21
+ })(IssueType || {});
22
+ var IssueStateEvent = /* @__PURE__ */ ((IssueStateEvent2) => {
23
+ IssueStateEvent2["CLOSE"] = "close";
24
+ IssueStateEvent2["REOPEN"] = "reopen";
25
+ return IssueStateEvent2;
26
+ })(IssueStateEvent || {});
27
+
28
+ exports.IssueStateEvent = IssueStateEvent;
29
+ exports.IssueType = IssueType;
30
+ exports.commonGitlabConfigExample = commonGitlabConfigExample;
31
+ exports.default = commonGitlabConfig;
32
+ //# sourceMappingURL=commonGitlabConfig.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commonGitlabConfig.cjs.js","sources":["../src/commonGitlabConfig.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { z } from 'zod';\n\nconst commonGitlabConfig = z.object({\n repoUrl: z.string({ description: 'Repository Location' }),\n token: z\n .string({ description: 'The token to use for authorization to GitLab' })\n .optional(),\n});\n\nexport default commonGitlabConfig;\n\nexport const commonGitlabConfigExample = {\n repoUrl: 'gitlab.com?owner=namespace-or-owner&repo=project-name',\n token: '${{ secrets.USER_OAUTH_TOKEN }}',\n};\n\n/**\n * Gitlab issue types as specified by gitlab api\n *\n * @public\n */\nexport enum IssueType {\n ISSUE = 'issue',\n INCIDENT = 'incident',\n TEST = 'test_case',\n TASK = 'task',\n}\n\n/**\n * Gitlab issue state events for modifications\n *\n * @public\n */\nexport enum IssueStateEvent {\n CLOSE = 'close',\n REOPEN = 'reopen',\n}\n"],"names":["z","IssueType","IssueStateEvent"],"mappings":";;;;;;AAkBM,MAAA,kBAAA,GAAqBA,MAAE,MAAO,CAAA;AAAA,EAClC,SAASA,KAAE,CAAA,MAAA,CAAO,EAAE,WAAA,EAAa,uBAAuB,CAAA;AAAA,EACxD,KAAA,EAAOA,MACJ,MAAO,CAAA,EAAE,aAAa,8CAA+C,EAAC,EACtE,QAAS,EAAA;AACd,CAAC,EAAA;AAIM,MAAM,yBAA4B,GAAA;AAAA,EACvC,OAAS,EAAA,uDAAA;AAAA,EACT,KAAO,EAAA,iCAAA;AACT,EAAA;AAOY,IAAA,SAAA,qBAAAC,UAAL,KAAA;AACL,EAAAA,WAAA,OAAQ,CAAA,GAAA,OAAA,CAAA;AACR,EAAAA,WAAA,UAAW,CAAA,GAAA,UAAA,CAAA;AACX,EAAAA,WAAA,MAAO,CAAA,GAAA,WAAA,CAAA;AACP,EAAAA,WAAA,MAAO,CAAA,GAAA,MAAA,CAAA;AAJG,EAAAA,OAAAA,UAAAA,CAAAA;AAAA,CAAA,EAAA,SAAA,IAAA,EAAA,EAAA;AAYA,IAAA,eAAA,qBAAAC,gBAAL,KAAA;AACL,EAAAA,iBAAA,OAAQ,CAAA,GAAA,OAAA,CAAA;AACR,EAAAA,iBAAA,QAAS,CAAA,GAAA,QAAA,CAAA;AAFC,EAAAA,OAAAA,gBAAAA,CAAAA;AAAA,CAAA,EAAA,eAAA,IAAA,EAAA;;;;;;;"}