@pulumi/gitlab 4.6.0-alpha.1645657239 → 4.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.
package/branch.d.ts ADDED
@@ -0,0 +1,165 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import { input as inputs, output as outputs } from "./types";
3
+ /**
4
+ * This resource allows you to create and manage GitLab branches.
5
+ *
6
+ * ## Example Usage
7
+ *
8
+ * ```typescript
9
+ * import * as pulumi from "@pulumi/pulumi";
10
+ * import * as gitlab from "@pulumi/gitlab";
11
+ *
12
+ * // Create a project for the branch to use
13
+ * const exampleProject = new gitlab.Project("exampleProject", {
14
+ * description: "An example project",
15
+ * namespaceId: gitlab_group.example.id,
16
+ * });
17
+ * const exampleBranch = new gitlab.Branch("exampleBranch", {
18
+ * ref: "main",
19
+ * project: exampleProject.id,
20
+ * });
21
+ * ```
22
+ *
23
+ * ## Import
24
+ *
25
+ * # Gitlab protected branches can be imported with a key composed of `<project_id>:<branch_name>`, e.g.
26
+ *
27
+ * ```sh
28
+ * $ pulumi import gitlab:index/branch:Branch example "12345:develop"
29
+ * ```
30
+ */
31
+ export declare class Branch extends pulumi.CustomResource {
32
+ /**
33
+ * Get an existing Branch resource's state with the given name, ID, and optional extra
34
+ * properties used to qualify the lookup.
35
+ *
36
+ * @param name The _unique_ name of the resulting resource.
37
+ * @param id The _unique_ provider ID of the resource to lookup.
38
+ * @param state Any extra arguments used during the lookup.
39
+ * @param opts Optional settings to control the behavior of the CustomResource.
40
+ */
41
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BranchState, opts?: pulumi.CustomResourceOptions): Branch;
42
+ /**
43
+ * Returns true if the given object is an instance of Branch. This is designed to work even
44
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
45
+ */
46
+ static isInstance(obj: any): obj is Branch;
47
+ /**
48
+ * Bool, true if you can push to the branch.
49
+ */
50
+ readonly canPush: pulumi.Output<boolean>;
51
+ /**
52
+ * The commit associated with the branch ref.
53
+ */
54
+ readonly commits: pulumi.Output<outputs.BranchCommit[]>;
55
+ /**
56
+ * Bool, true if branch is the default branch for the project.
57
+ */
58
+ readonly default: pulumi.Output<boolean>;
59
+ /**
60
+ * Bool, true if developer level access allows to merge branch.
61
+ */
62
+ readonly developerCanMerge: pulumi.Output<boolean>;
63
+ /**
64
+ * Bool, true if developer level access allows git push.
65
+ */
66
+ readonly developerCanPush: pulumi.Output<boolean>;
67
+ /**
68
+ * Bool, true if the branch has been merged into it's parent.
69
+ */
70
+ readonly merged: pulumi.Output<boolean>;
71
+ /**
72
+ * The name for this branch.
73
+ */
74
+ readonly name: pulumi.Output<string>;
75
+ /**
76
+ * The ID or full path of the project which the branch is created against.
77
+ */
78
+ readonly project: pulumi.Output<string>;
79
+ /**
80
+ * Bool, true if branch has branch protection.
81
+ */
82
+ readonly protected: pulumi.Output<boolean>;
83
+ /**
84
+ * The ref which the branch is created from.
85
+ */
86
+ readonly ref: pulumi.Output<string>;
87
+ /**
88
+ * The url of the created branch (https).
89
+ */
90
+ readonly webUrl: pulumi.Output<string>;
91
+ /**
92
+ * Create a Branch resource with the given unique name, arguments, and options.
93
+ *
94
+ * @param name The _unique_ name of the resource.
95
+ * @param args The arguments to use to populate this resource's properties.
96
+ * @param opts A bag of options that control this resource's behavior.
97
+ */
98
+ constructor(name: string, args: BranchArgs, opts?: pulumi.CustomResourceOptions);
99
+ }
100
+ /**
101
+ * Input properties used for looking up and filtering Branch resources.
102
+ */
103
+ export interface BranchState {
104
+ /**
105
+ * Bool, true if you can push to the branch.
106
+ */
107
+ canPush?: pulumi.Input<boolean>;
108
+ /**
109
+ * The commit associated with the branch ref.
110
+ */
111
+ commits?: pulumi.Input<pulumi.Input<inputs.BranchCommit>[]>;
112
+ /**
113
+ * Bool, true if branch is the default branch for the project.
114
+ */
115
+ default?: pulumi.Input<boolean>;
116
+ /**
117
+ * Bool, true if developer level access allows to merge branch.
118
+ */
119
+ developerCanMerge?: pulumi.Input<boolean>;
120
+ /**
121
+ * Bool, true if developer level access allows git push.
122
+ */
123
+ developerCanPush?: pulumi.Input<boolean>;
124
+ /**
125
+ * Bool, true if the branch has been merged into it's parent.
126
+ */
127
+ merged?: pulumi.Input<boolean>;
128
+ /**
129
+ * The name for this branch.
130
+ */
131
+ name?: pulumi.Input<string>;
132
+ /**
133
+ * The ID or full path of the project which the branch is created against.
134
+ */
135
+ project?: pulumi.Input<string>;
136
+ /**
137
+ * Bool, true if branch has branch protection.
138
+ */
139
+ protected?: pulumi.Input<boolean>;
140
+ /**
141
+ * The ref which the branch is created from.
142
+ */
143
+ ref?: pulumi.Input<string>;
144
+ /**
145
+ * The url of the created branch (https).
146
+ */
147
+ webUrl?: pulumi.Input<string>;
148
+ }
149
+ /**
150
+ * The set of arguments for constructing a Branch resource.
151
+ */
152
+ export interface BranchArgs {
153
+ /**
154
+ * The name for this branch.
155
+ */
156
+ name?: pulumi.Input<string>;
157
+ /**
158
+ * The ID or full path of the project which the branch is created against.
159
+ */
160
+ project: pulumi.Input<string>;
161
+ /**
162
+ * The ref which the branch is created from.
163
+ */
164
+ ref: pulumi.Input<string>;
165
+ }
package/branch.js ADDED
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Branch = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * This resource allows you to create and manage GitLab branches.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as gitlab from "@pulumi/gitlab";
16
+ *
17
+ * // Create a project for the branch to use
18
+ * const exampleProject = new gitlab.Project("exampleProject", {
19
+ * description: "An example project",
20
+ * namespaceId: gitlab_group.example.id,
21
+ * });
22
+ * const exampleBranch = new gitlab.Branch("exampleBranch", {
23
+ * ref: "main",
24
+ * project: exampleProject.id,
25
+ * });
26
+ * ```
27
+ *
28
+ * ## Import
29
+ *
30
+ * # Gitlab protected branches can be imported with a key composed of `<project_id>:<branch_name>`, e.g.
31
+ *
32
+ * ```sh
33
+ * $ pulumi import gitlab:index/branch:Branch example "12345:develop"
34
+ * ```
35
+ */
36
+ class Branch extends pulumi.CustomResource {
37
+ constructor(name, argsOrState, opts) {
38
+ let resourceInputs = {};
39
+ opts = opts || {};
40
+ if (opts.id) {
41
+ const state = argsOrState;
42
+ resourceInputs["canPush"] = state ? state.canPush : undefined;
43
+ resourceInputs["commits"] = state ? state.commits : undefined;
44
+ resourceInputs["default"] = state ? state.default : undefined;
45
+ resourceInputs["developerCanMerge"] = state ? state.developerCanMerge : undefined;
46
+ resourceInputs["developerCanPush"] = state ? state.developerCanPush : undefined;
47
+ resourceInputs["merged"] = state ? state.merged : undefined;
48
+ resourceInputs["name"] = state ? state.name : undefined;
49
+ resourceInputs["project"] = state ? state.project : undefined;
50
+ resourceInputs["protected"] = state ? state.protected : undefined;
51
+ resourceInputs["ref"] = state ? state.ref : undefined;
52
+ resourceInputs["webUrl"] = state ? state.webUrl : undefined;
53
+ }
54
+ else {
55
+ const args = argsOrState;
56
+ if ((!args || args.project === undefined) && !opts.urn) {
57
+ throw new Error("Missing required property 'project'");
58
+ }
59
+ if ((!args || args.ref === undefined) && !opts.urn) {
60
+ throw new Error("Missing required property 'ref'");
61
+ }
62
+ resourceInputs["name"] = args ? args.name : undefined;
63
+ resourceInputs["project"] = args ? args.project : undefined;
64
+ resourceInputs["ref"] = args ? args.ref : undefined;
65
+ resourceInputs["canPush"] = undefined /*out*/;
66
+ resourceInputs["commits"] = undefined /*out*/;
67
+ resourceInputs["default"] = undefined /*out*/;
68
+ resourceInputs["developerCanMerge"] = undefined /*out*/;
69
+ resourceInputs["developerCanPush"] = undefined /*out*/;
70
+ resourceInputs["merged"] = undefined /*out*/;
71
+ resourceInputs["protected"] = undefined /*out*/;
72
+ resourceInputs["webUrl"] = undefined /*out*/;
73
+ }
74
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
75
+ super(Branch.__pulumiType, name, resourceInputs, opts);
76
+ }
77
+ /**
78
+ * Get an existing Branch resource's state with the given name, ID, and optional extra
79
+ * properties used to qualify the lookup.
80
+ *
81
+ * @param name The _unique_ name of the resulting resource.
82
+ * @param id The _unique_ provider ID of the resource to lookup.
83
+ * @param state Any extra arguments used during the lookup.
84
+ * @param opts Optional settings to control the behavior of the CustomResource.
85
+ */
86
+ static get(name, id, state, opts) {
87
+ return new Branch(name, state, Object.assign(Object.assign({}, opts), { id: id }));
88
+ }
89
+ /**
90
+ * Returns true if the given object is an instance of Branch. This is designed to work even
91
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
92
+ */
93
+ static isInstance(obj) {
94
+ if (obj === undefined || obj === null) {
95
+ return false;
96
+ }
97
+ return obj['__pulumiType'] === Branch.__pulumiType;
98
+ }
99
+ }
100
+ exports.Branch = Branch;
101
+ /** @internal */
102
+ Branch.__pulumiType = 'gitlab:index/branch:Branch';
103
+ //# sourceMappingURL=branch.js.map
package/branch.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch.js","sourceRoot":"","sources":["../branch.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAiF7C,YAAY,IAAY,EAAE,WAAsC,EAAE,IAAmC;QACjG,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAsC,CAAC;YACrD,cAAc,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC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,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IAtHD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAmB,EAAE,IAAmC;QACjH,OAAO,IAAI,MAAM,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC7D,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,MAAM,CAAC,YAAY,CAAC;IACvD,CAAC;;AA1BL,wBAwHC;AA1GG,gBAAgB;AACO,mBAAY,GAAG,4BAA4B,CAAC"}
@@ -16,6 +16,7 @@ import { input as inputs, output as outputs } from "./types";
16
16
  * branch: "BranchProtected",
17
17
  * pushAccessLevel: "developer",
18
18
  * mergeAccessLevel: "developer",
19
+ * allowForcePush: true,
19
20
  * codeOwnerApprovalRequired: true,
20
21
  * allowedToPushes: [
21
22
  * {
@@ -77,6 +78,10 @@ export declare class BranchProtection extends pulumi.CustomResource {
77
78
  * when multiple copies of the Pulumi SDK have been loaded into the same process.
78
79
  */
79
80
  static isInstance(obj: any): obj is BranchProtection;
81
+ /**
82
+ * Can be set to true to allow users with push access to force push.
83
+ */
84
+ readonly allowForcePush: pulumi.Output<boolean | undefined>;
80
85
  /**
81
86
  * Defines permissions for action.
82
87
  */
@@ -122,6 +127,10 @@ export declare class BranchProtection extends pulumi.CustomResource {
122
127
  * Input properties used for looking up and filtering BranchProtection resources.
123
128
  */
124
129
  export interface BranchProtectionState {
130
+ /**
131
+ * Can be set to true to allow users with push access to force push.
132
+ */
133
+ allowForcePush?: pulumi.Input<boolean>;
125
134
  /**
126
135
  * Defines permissions for action.
127
136
  */
@@ -159,6 +168,10 @@ export interface BranchProtectionState {
159
168
  * The set of arguments for constructing a BranchProtection resource.
160
169
  */
161
170
  export interface BranchProtectionArgs {
171
+ /**
172
+ * Can be set to true to allow users with push access to force push.
173
+ */
174
+ allowForcePush?: pulumi.Input<boolean>;
162
175
  /**
163
176
  * Defines permissions for action.
164
177
  */
@@ -21,6 +21,7 @@ const utilities = require("./utilities");
21
21
  * branch: "BranchProtected",
22
22
  * pushAccessLevel: "developer",
23
23
  * mergeAccessLevel: "developer",
24
+ * allowForcePush: true,
24
25
  * codeOwnerApprovalRequired: true,
25
26
  * allowedToPushes: [
26
27
  * {
@@ -72,6 +73,7 @@ class BranchProtection extends pulumi.CustomResource {
72
73
  opts = opts || {};
73
74
  if (opts.id) {
74
75
  const state = argsOrState;
76
+ resourceInputs["allowForcePush"] = state ? state.allowForcePush : undefined;
75
77
  resourceInputs["allowedToMerges"] = state ? state.allowedToMerges : undefined;
76
78
  resourceInputs["allowedToPushes"] = state ? state.allowedToPushes : undefined;
77
79
  resourceInputs["branch"] = state ? state.branch : undefined;
@@ -95,6 +97,7 @@ class BranchProtection extends pulumi.CustomResource {
95
97
  if ((!args || args.pushAccessLevel === undefined) && !opts.urn) {
96
98
  throw new Error("Missing required property 'pushAccessLevel'");
97
99
  }
100
+ resourceInputs["allowForcePush"] = args ? args.allowForcePush : undefined;
98
101
  resourceInputs["allowedToMerges"] = args ? args.allowedToMerges : undefined;
99
102
  resourceInputs["allowedToPushes"] = args ? args.allowedToPushes : undefined;
100
103
  resourceInputs["branch"] = args ? args.branch : undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"branchProtection.js","sourceRoot":"","sources":["../branchProtection.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,MAAa,gBAAiB,SAAQ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,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9E,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5D,cAAc,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5E,cAAc,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAC5D;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACrE,CAAC;IAhHD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA6B,EAAE,IAAmC;QAC3H,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACvE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,gBAAgB,CAAC,YAAY,CAAC;IACjE,CAAC;;AA1BL,4CAkHC;AApGG,gBAAgB;AACO,6BAAY,GAAG,gDAAgD,CAAC"}
package/config/index.js CHANGED
@@ -3,7 +3,11 @@
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
5
  if (k2 === undefined) k2 = k;
6
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
7
11
  }) : (function(o, m, k, k2) {
8
12
  if (k2 === undefined) k2 = k;
9
13
  o[k2] = m[k];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;;;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
package/getBranch.d.ts ADDED
@@ -0,0 +1,95 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import { output as outputs } from "./types";
3
+ /**
4
+ * Provide details about a gitlab project branch
5
+ *
6
+ * ## Example Usage
7
+ *
8
+ * ```typescript
9
+ * import * as pulumi from "@pulumi/pulumi";
10
+ * import * as gitlab from "@pulumi/gitlab";
11
+ *
12
+ * // By project full path
13
+ * const foo = pulumi.output(gitlab.getBranch({
14
+ * name: "example",
15
+ * project: "foo/bar",
16
+ * }));
17
+ * ```
18
+ */
19
+ export declare function getBranch(args: GetBranchArgs, opts?: pulumi.InvokeOptions): Promise<GetBranchResult>;
20
+ /**
21
+ * A collection of arguments for invoking getBranch.
22
+ */
23
+ export interface GetBranchArgs {
24
+ /**
25
+ * The name of the branch.
26
+ */
27
+ name: string;
28
+ /**
29
+ * The full path or id of the project.
30
+ */
31
+ project: string;
32
+ }
33
+ /**
34
+ * A collection of values returned by getBranch.
35
+ */
36
+ export interface GetBranchResult {
37
+ /**
38
+ * Bool, true if you can push to the branch.
39
+ */
40
+ readonly canPush: boolean;
41
+ /**
42
+ * The commit associated with the branch ref.
43
+ */
44
+ readonly commits: outputs.GetBranchCommit[];
45
+ /**
46
+ * Bool, true if branch is the default branch for the project.
47
+ */
48
+ readonly default: boolean;
49
+ /**
50
+ * Bool, true if developer level access allows to merge branch.
51
+ */
52
+ readonly developerCanMerge: boolean;
53
+ /**
54
+ * Bool, true if developer level access allows git push.
55
+ */
56
+ readonly developerCanPush: boolean;
57
+ /**
58
+ * The provider-assigned unique ID for this managed resource.
59
+ */
60
+ readonly id: string;
61
+ /**
62
+ * Bool, true if the branch has been merged into it's parent.
63
+ */
64
+ readonly merged: boolean;
65
+ /**
66
+ * The name of the branch.
67
+ */
68
+ readonly name: string;
69
+ /**
70
+ * The full path or id of the project.
71
+ */
72
+ readonly project: string;
73
+ /**
74
+ * Bool, true if branch has branch protection.
75
+ */
76
+ readonly protected: boolean;
77
+ /**
78
+ * The url of the created branch (https.)
79
+ */
80
+ readonly webUrl: string;
81
+ }
82
+ export declare function getBranchOutput(args: GetBranchOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetBranchResult>;
83
+ /**
84
+ * A collection of arguments for invoking getBranch.
85
+ */
86
+ export interface GetBranchOutputArgs {
87
+ /**
88
+ * The name of the branch.
89
+ */
90
+ name: pulumi.Input<string>;
91
+ /**
92
+ * The full path or id of the project.
93
+ */
94
+ project: pulumi.Input<string>;
95
+ }
package/getBranch.js ADDED
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.getBranchOutput = exports.getBranch = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Provide details about a gitlab project branch
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as gitlab from "@pulumi/gitlab";
16
+ *
17
+ * // By project full path
18
+ * const foo = pulumi.output(gitlab.getBranch({
19
+ * name: "example",
20
+ * project: "foo/bar",
21
+ * }));
22
+ * ```
23
+ */
24
+ function getBranch(args, opts) {
25
+ if (!opts) {
26
+ opts = {};
27
+ }
28
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
29
+ return pulumi.runtime.invoke("gitlab:index/getBranch:getBranch", {
30
+ "name": args.name,
31
+ "project": args.project,
32
+ }, opts);
33
+ }
34
+ exports.getBranch = getBranch;
35
+ function getBranchOutput(args, opts) {
36
+ return pulumi.output(args).apply(a => getBranch(a, opts));
37
+ }
38
+ exports.getBranchOutput = getBranchOutput;
39
+ //# sourceMappingURL=getBranch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBranch.js","sourceRoot":"","sources":["../getBranch.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,SAAS,CAAC,IAAmB,EAAE,IAA2B;IACtE,IAAI,CAAC,IAAI,EAAE;QACP,IAAI,GAAG,EAAE,CAAA;KACZ;IAED,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,kCAAkC,EAAE;QAC7D,MAAM,EAAE,IAAI,CAAC,IAAI;QACjB,SAAS,EAAE,IAAI,CAAC,OAAO;KAC1B,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAVD,8BAUC;AAkED,SAAgB,eAAe,CAAC,IAAyB,EAAE,IAA2B;IAClF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAC7D,CAAC;AAFD,0CAEC"}
package/getProject.d.ts CHANGED
@@ -60,10 +60,18 @@ export interface GetProjectResult {
60
60
  * Enable LFS for the project.
61
61
  */
62
62
  readonly lfsEnabled: boolean;
63
+ /**
64
+ * Enable or disable merge pipelines.
65
+ */
66
+ readonly mergePipelinesEnabled: boolean;
63
67
  /**
64
68
  * Enable merge requests for the project.
65
69
  */
66
70
  readonly mergeRequestsEnabled: boolean;
71
+ /**
72
+ * Enable or disable merge trains.
73
+ */
74
+ readonly mergeTrainsEnabled: boolean;
67
75
  /**
68
76
  * The name of the project.
69
77
  */
@@ -84,6 +92,10 @@ export interface GetProjectResult {
84
92
  * Enable pipelines for the project.
85
93
  */
86
94
  readonly pipelinesEnabled: boolean;
95
+ /**
96
+ * Show link to create/view merge request when pushing from the command line
97
+ */
98
+ readonly printingMergeRequestLinkEnabled: boolean;
87
99
  /**
88
100
  * Push rules for the project.
89
101
  */
package/getProject.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"getProject.js","sourceRoot":"","sources":["../getProject.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC;;;;;;;;;;;;;GAaG;AACH,SAAgB,UAAU,CAAC,IAAqB,EAAE,IAA2B;IACzE,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAClB,IAAI,CAAC,IAAI,EAAE;QACP,IAAI,GAAG,EAAE,CAAA;KACZ;IAED,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,oCAAoC,EAAE;QAC/D,IAAI,EAAE,IAAI,CAAC,EAAE;QACb,mBAAmB,EAAE,IAAI,CAAC,iBAAiB;KAC9C,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAXD,gCAWC;AA8GD,SAAgB,gBAAgB,CAAC,IAA2B,EAAE,IAA2B;IACrF,OAAO,MA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