pulumi-github 6.11.0a1768966924__py3-none-any.whl → 6.12.0__py3-none-any.whl

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 (31) hide show
  1. pulumi_github/__init__.py +28 -0
  2. pulumi_github/_inputs.py +324 -19
  3. pulumi_github/actions_environment_secret.py +141 -12
  4. pulumi_github/actions_environment_variable.py +71 -37
  5. pulumi_github/actions_organization_permissions.py +50 -3
  6. pulumi_github/actions_organization_secret.py +164 -55
  7. pulumi_github/actions_organization_secret_repositories.py +44 -28
  8. pulumi_github/actions_organization_secret_repository.py +44 -28
  9. pulumi_github/actions_organization_variable.py +44 -47
  10. pulumi_github/actions_organization_variable_repositories.py +262 -0
  11. pulumi_github/actions_organization_variable_repository.py +262 -0
  12. pulumi_github/actions_repository_permissions.py +50 -3
  13. pulumi_github/actions_secret.py +176 -41
  14. pulumi_github/actions_variable.py +65 -33
  15. pulumi_github/app_installation_repositories.py +6 -6
  16. pulumi_github/app_installation_repository.py +6 -6
  17. pulumi_github/dependabot_organization_secret.py +128 -59
  18. pulumi_github/dependabot_organization_secret_repositories.py +44 -36
  19. pulumi_github/dependabot_organization_secret_repository.py +262 -0
  20. pulumi_github/dependabot_secret.py +154 -41
  21. pulumi_github/emu_group_mapping.py +64 -4
  22. pulumi_github/get_release_asset.py +370 -0
  23. pulumi_github/organization_ruleset.py +11 -17
  24. pulumi_github/outputs.py +234 -13
  25. pulumi_github/pulumi-plugin.json +1 -1
  26. pulumi_github/repository.py +32 -27
  27. pulumi_github/repository_ruleset.py +7 -7
  28. {pulumi_github-6.11.0a1768966924.dist-info → pulumi_github-6.12.0.dist-info}/METADATA +1 -1
  29. {pulumi_github-6.11.0a1768966924.dist-info → pulumi_github-6.12.0.dist-info}/RECORD +31 -27
  30. {pulumi_github-6.11.0a1768966924.dist-info → pulumi_github-6.12.0.dist-info}/WHEEL +1 -1
  31. {pulumi_github-6.11.0a1768966924.dist-info → pulumi_github-6.12.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,370 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins as _builtins
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from . import _utilities
16
+
17
+ __all__ = [
18
+ 'GetReleaseAssetResult',
19
+ 'AwaitableGetReleaseAssetResult',
20
+ 'get_release_asset',
21
+ 'get_release_asset_output',
22
+ ]
23
+
24
+ @pulumi.output_type
25
+ class GetReleaseAssetResult:
26
+ """
27
+ A collection of values returned by getReleaseAsset.
28
+ """
29
+ def __init__(__self__, asset_id=None, browser_download_url=None, content_type=None, created_at=None, download_file_contents=None, file_contents=None, id=None, label=None, name=None, node_id=None, owner=None, repository=None, size=None, updated_at=None, url=None):
30
+ if asset_id and not isinstance(asset_id, int):
31
+ raise TypeError("Expected argument 'asset_id' to be a int")
32
+ pulumi.set(__self__, "asset_id", asset_id)
33
+ if browser_download_url and not isinstance(browser_download_url, str):
34
+ raise TypeError("Expected argument 'browser_download_url' to be a str")
35
+ pulumi.set(__self__, "browser_download_url", browser_download_url)
36
+ if content_type and not isinstance(content_type, str):
37
+ raise TypeError("Expected argument 'content_type' to be a str")
38
+ pulumi.set(__self__, "content_type", content_type)
39
+ if created_at and not isinstance(created_at, str):
40
+ raise TypeError("Expected argument 'created_at' to be a str")
41
+ pulumi.set(__self__, "created_at", created_at)
42
+ if download_file_contents and not isinstance(download_file_contents, bool):
43
+ raise TypeError("Expected argument 'download_file_contents' to be a bool")
44
+ pulumi.set(__self__, "download_file_contents", download_file_contents)
45
+ if file_contents and not isinstance(file_contents, str):
46
+ raise TypeError("Expected argument 'file_contents' to be a str")
47
+ pulumi.set(__self__, "file_contents", file_contents)
48
+ if id and not isinstance(id, str):
49
+ raise TypeError("Expected argument 'id' to be a str")
50
+ pulumi.set(__self__, "id", id)
51
+ if label and not isinstance(label, str):
52
+ raise TypeError("Expected argument 'label' to be a str")
53
+ pulumi.set(__self__, "label", label)
54
+ if name and not isinstance(name, str):
55
+ raise TypeError("Expected argument 'name' to be a str")
56
+ pulumi.set(__self__, "name", name)
57
+ if node_id and not isinstance(node_id, str):
58
+ raise TypeError("Expected argument 'node_id' to be a str")
59
+ pulumi.set(__self__, "node_id", node_id)
60
+ if owner and not isinstance(owner, str):
61
+ raise TypeError("Expected argument 'owner' to be a str")
62
+ pulumi.set(__self__, "owner", owner)
63
+ if repository and not isinstance(repository, str):
64
+ raise TypeError("Expected argument 'repository' to be a str")
65
+ pulumi.set(__self__, "repository", repository)
66
+ if size and not isinstance(size, int):
67
+ raise TypeError("Expected argument 'size' to be a int")
68
+ pulumi.set(__self__, "size", size)
69
+ if updated_at and not isinstance(updated_at, str):
70
+ raise TypeError("Expected argument 'updated_at' to be a str")
71
+ pulumi.set(__self__, "updated_at", updated_at)
72
+ if url and not isinstance(url, str):
73
+ raise TypeError("Expected argument 'url' to be a str")
74
+ pulumi.set(__self__, "url", url)
75
+
76
+ @_builtins.property
77
+ @pulumi.getter(name="assetId")
78
+ def asset_id(self) -> _builtins.int:
79
+ return pulumi.get(self, "asset_id")
80
+
81
+ @_builtins.property
82
+ @pulumi.getter(name="browserDownloadUrl")
83
+ def browser_download_url(self) -> _builtins.str:
84
+ """
85
+ Browser URL from which the release asset can be downloaded
86
+ """
87
+ return pulumi.get(self, "browser_download_url")
88
+
89
+ @_builtins.property
90
+ @pulumi.getter(name="contentType")
91
+ def content_type(self) -> _builtins.str:
92
+ """
93
+ MIME type of the asset
94
+ """
95
+ return pulumi.get(self, "content_type")
96
+
97
+ @_builtins.property
98
+ @pulumi.getter(name="createdAt")
99
+ def created_at(self) -> _builtins.str:
100
+ """
101
+ Date the asset was created
102
+ """
103
+ return pulumi.get(self, "created_at")
104
+
105
+ @_builtins.property
106
+ @pulumi.getter(name="downloadFileContents")
107
+ def download_file_contents(self) -> Optional[_builtins.bool]:
108
+ return pulumi.get(self, "download_file_contents")
109
+
110
+ @_builtins.property
111
+ @pulumi.getter(name="fileContents")
112
+ def file_contents(self) -> _builtins.str:
113
+ """
114
+ The base64-encoded release asset file contents (requires `download_file_contents` to be `true`)
115
+ """
116
+ return pulumi.get(self, "file_contents")
117
+
118
+ @_builtins.property
119
+ @pulumi.getter
120
+ def id(self) -> _builtins.str:
121
+ """
122
+ The provider-assigned unique ID for this managed resource.
123
+ """
124
+ return pulumi.get(self, "id")
125
+
126
+ @_builtins.property
127
+ @pulumi.getter
128
+ def label(self) -> _builtins.str:
129
+ """
130
+ Label for the asset
131
+ """
132
+ return pulumi.get(self, "label")
133
+
134
+ @_builtins.property
135
+ @pulumi.getter
136
+ def name(self) -> _builtins.str:
137
+ """
138
+ The file name of the asset
139
+ """
140
+ return pulumi.get(self, "name")
141
+
142
+ @_builtins.property
143
+ @pulumi.getter(name="nodeId")
144
+ def node_id(self) -> _builtins.str:
145
+ """
146
+ Node ID of the asset
147
+ """
148
+ return pulumi.get(self, "node_id")
149
+
150
+ @_builtins.property
151
+ @pulumi.getter
152
+ def owner(self) -> _builtins.str:
153
+ return pulumi.get(self, "owner")
154
+
155
+ @_builtins.property
156
+ @pulumi.getter
157
+ def repository(self) -> _builtins.str:
158
+ return pulumi.get(self, "repository")
159
+
160
+ @_builtins.property
161
+ @pulumi.getter
162
+ def size(self) -> _builtins.int:
163
+ """
164
+ Asset size in bytes
165
+ """
166
+ return pulumi.get(self, "size")
167
+
168
+ @_builtins.property
169
+ @pulumi.getter(name="updatedAt")
170
+ def updated_at(self) -> _builtins.str:
171
+ """
172
+ Date the asset was last updated
173
+ """
174
+ return pulumi.get(self, "updated_at")
175
+
176
+ @_builtins.property
177
+ @pulumi.getter
178
+ def url(self) -> _builtins.str:
179
+ """
180
+ URL of the asset
181
+ """
182
+ return pulumi.get(self, "url")
183
+
184
+
185
+ class AwaitableGetReleaseAssetResult(GetReleaseAssetResult):
186
+ # pylint: disable=using-constant-test
187
+ def __await__(self):
188
+ if False:
189
+ yield self
190
+ return GetReleaseAssetResult(
191
+ asset_id=self.asset_id,
192
+ browser_download_url=self.browser_download_url,
193
+ content_type=self.content_type,
194
+ created_at=self.created_at,
195
+ download_file_contents=self.download_file_contents,
196
+ file_contents=self.file_contents,
197
+ id=self.id,
198
+ label=self.label,
199
+ name=self.name,
200
+ node_id=self.node_id,
201
+ owner=self.owner,
202
+ repository=self.repository,
203
+ size=self.size,
204
+ updated_at=self.updated_at,
205
+ url=self.url)
206
+
207
+
208
+ def get_release_asset(asset_id: Optional[_builtins.int] = None,
209
+ download_file_contents: Optional[_builtins.bool] = None,
210
+ owner: Optional[_builtins.str] = None,
211
+ repository: Optional[_builtins.str] = None,
212
+ opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetReleaseAssetResult:
213
+ """
214
+ Use this data source to retrieve information about a GitHub release asset.
215
+
216
+ ## Example Usage
217
+
218
+ To retrieve a specific release asset from a repository based on its ID:
219
+
220
+ ```python
221
+ import pulumi
222
+ import pulumi_github as github
223
+
224
+ example = github.get_release_asset(repository="example-repository",
225
+ owner="example-owner",
226
+ asset_id=12345)
227
+ ```
228
+
229
+ To retrieve a specific release asset from a repository, and download the file
230
+ into a `file` attribute on the data source:
231
+
232
+ To retrieve the first release asset associated with the latest release in a repository:
233
+
234
+ ```python
235
+ import pulumi
236
+ import pulumi_github as github
237
+
238
+ example = github.get_release(repository="example-repository",
239
+ owner="example-owner",
240
+ retrieve_by="latest")
241
+ example_get_release_asset = github.get_release_asset(repository="example-repository",
242
+ owner="example-owner",
243
+ asset_id=example.assets[0].id)
244
+ ```
245
+
246
+ To retrieve all release assets associated with the the latest release in a repository:
247
+
248
+ ```python
249
+ import pulumi
250
+ import pulumi_github as github
251
+
252
+ example = github.get_release(repository="example-repository",
253
+ owner="example-owner",
254
+ retrieve_by="latest")
255
+ example_get_release_asset = [github.get_release_asset(repository="example-repository",
256
+ owner="example-owner",
257
+ asset_id=example.assets[__index].id) for __index in len(example.assets).apply(lambda length: range(length))]
258
+ ```
259
+
260
+
261
+ :param _builtins.int asset_id: ID of the release asset to retrieve
262
+ :param _builtins.bool download_file_contents: Whether to download the asset file content into the `file_contents` attribute (defaults to `false`)
263
+ :param _builtins.str owner: Owner of the repository
264
+ :param _builtins.str repository: Name of the repository to retrieve the release from
265
+ """
266
+ __args__ = dict()
267
+ __args__['assetId'] = asset_id
268
+ __args__['downloadFileContents'] = download_file_contents
269
+ __args__['owner'] = owner
270
+ __args__['repository'] = repository
271
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
272
+ __ret__ = pulumi.runtime.invoke('github:index/getReleaseAsset:getReleaseAsset', __args__, opts=opts, typ=GetReleaseAssetResult).value
273
+
274
+ return AwaitableGetReleaseAssetResult(
275
+ asset_id=pulumi.get(__ret__, 'asset_id'),
276
+ browser_download_url=pulumi.get(__ret__, 'browser_download_url'),
277
+ content_type=pulumi.get(__ret__, 'content_type'),
278
+ created_at=pulumi.get(__ret__, 'created_at'),
279
+ download_file_contents=pulumi.get(__ret__, 'download_file_contents'),
280
+ file_contents=pulumi.get(__ret__, 'file_contents'),
281
+ id=pulumi.get(__ret__, 'id'),
282
+ label=pulumi.get(__ret__, 'label'),
283
+ name=pulumi.get(__ret__, 'name'),
284
+ node_id=pulumi.get(__ret__, 'node_id'),
285
+ owner=pulumi.get(__ret__, 'owner'),
286
+ repository=pulumi.get(__ret__, 'repository'),
287
+ size=pulumi.get(__ret__, 'size'),
288
+ updated_at=pulumi.get(__ret__, 'updated_at'),
289
+ url=pulumi.get(__ret__, 'url'))
290
+ def get_release_asset_output(asset_id: Optional[pulumi.Input[_builtins.int]] = None,
291
+ download_file_contents: Optional[pulumi.Input[Optional[_builtins.bool]]] = None,
292
+ owner: Optional[pulumi.Input[_builtins.str]] = None,
293
+ repository: Optional[pulumi.Input[_builtins.str]] = None,
294
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetReleaseAssetResult]:
295
+ """
296
+ Use this data source to retrieve information about a GitHub release asset.
297
+
298
+ ## Example Usage
299
+
300
+ To retrieve a specific release asset from a repository based on its ID:
301
+
302
+ ```python
303
+ import pulumi
304
+ import pulumi_github as github
305
+
306
+ example = github.get_release_asset(repository="example-repository",
307
+ owner="example-owner",
308
+ asset_id=12345)
309
+ ```
310
+
311
+ To retrieve a specific release asset from a repository, and download the file
312
+ into a `file` attribute on the data source:
313
+
314
+ To retrieve the first release asset associated with the latest release in a repository:
315
+
316
+ ```python
317
+ import pulumi
318
+ import pulumi_github as github
319
+
320
+ example = github.get_release(repository="example-repository",
321
+ owner="example-owner",
322
+ retrieve_by="latest")
323
+ example_get_release_asset = github.get_release_asset(repository="example-repository",
324
+ owner="example-owner",
325
+ asset_id=example.assets[0].id)
326
+ ```
327
+
328
+ To retrieve all release assets associated with the the latest release in a repository:
329
+
330
+ ```python
331
+ import pulumi
332
+ import pulumi_github as github
333
+
334
+ example = github.get_release(repository="example-repository",
335
+ owner="example-owner",
336
+ retrieve_by="latest")
337
+ example_get_release_asset = [github.get_release_asset(repository="example-repository",
338
+ owner="example-owner",
339
+ asset_id=example.assets[__index].id) for __index in len(example.assets).apply(lambda length: range(length))]
340
+ ```
341
+
342
+
343
+ :param _builtins.int asset_id: ID of the release asset to retrieve
344
+ :param _builtins.bool download_file_contents: Whether to download the asset file content into the `file_contents` attribute (defaults to `false`)
345
+ :param _builtins.str owner: Owner of the repository
346
+ :param _builtins.str repository: Name of the repository to retrieve the release from
347
+ """
348
+ __args__ = dict()
349
+ __args__['assetId'] = asset_id
350
+ __args__['downloadFileContents'] = download_file_contents
351
+ __args__['owner'] = owner
352
+ __args__['repository'] = repository
353
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
354
+ __ret__ = pulumi.runtime.invoke_output('github:index/getReleaseAsset:getReleaseAsset', __args__, opts=opts, typ=GetReleaseAssetResult)
355
+ return __ret__.apply(lambda __response__: GetReleaseAssetResult(
356
+ asset_id=pulumi.get(__response__, 'asset_id'),
357
+ browser_download_url=pulumi.get(__response__, 'browser_download_url'),
358
+ content_type=pulumi.get(__response__, 'content_type'),
359
+ created_at=pulumi.get(__response__, 'created_at'),
360
+ download_file_contents=pulumi.get(__response__, 'download_file_contents'),
361
+ file_contents=pulumi.get(__response__, 'file_contents'),
362
+ id=pulumi.get(__response__, 'id'),
363
+ label=pulumi.get(__response__, 'label'),
364
+ name=pulumi.get(__response__, 'name'),
365
+ node_id=pulumi.get(__response__, 'node_id'),
366
+ owner=pulumi.get(__response__, 'owner'),
367
+ repository=pulumi.get(__response__, 'repository'),
368
+ size=pulumi.get(__response__, 'size'),
369
+ updated_at=pulumi.get(__response__, 'updated_at'),
370
+ url=pulumi.get(__response__, 'url')))
@@ -33,7 +33,7 @@ class OrganizationRulesetArgs:
33
33
  :param pulumi.Input['OrganizationRulesetRulesArgs'] rules: (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
34
34
  :param pulumi.Input[_builtins.str] target: (String) Possible values are `branch`, `tag` and `push`.
35
35
  :param pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetBypassActorArgs']]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
36
- :param pulumi.Input['OrganizationRulesetConditionsArgs'] conditions: (Block List, Max: 1) Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`. (see below for nested schema)
36
+ :param pulumi.Input['OrganizationRulesetConditionsArgs'] conditions: (Block List, Max: 1) Parameters for an organization ruleset condition. For `branch` and `tag` targets, `ref_name` is required alongside one of `repository_name` or `repository_id`. For `push` targets, `ref_name` must NOT be set - only `repository_name` or `repository_id` should be used. (see below for nested schema)
37
37
  :param pulumi.Input[_builtins.str] name: (String) The name of the ruleset.
38
38
  """
39
39
  pulumi.set(__self__, "enforcement", enforcement)
@@ -98,7 +98,7 @@ class OrganizationRulesetArgs:
98
98
  @pulumi.getter
99
99
  def conditions(self) -> Optional[pulumi.Input['OrganizationRulesetConditionsArgs']]:
100
100
  """
101
- (Block List, Max: 1) Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`. (see below for nested schema)
101
+ (Block List, Max: 1) Parameters for an organization ruleset condition. For `branch` and `tag` targets, `ref_name` is required alongside one of `repository_name` or `repository_id`. For `push` targets, `ref_name` must NOT be set - only `repository_name` or `repository_id` should be used. (see below for nested schema)
102
102
  """
103
103
  return pulumi.get(self, "conditions")
104
104
 
@@ -134,7 +134,7 @@ class _OrganizationRulesetState:
134
134
  """
135
135
  Input properties used for looking up and filtering OrganizationRuleset resources.
136
136
  :param pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetBypassActorArgs']]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
137
- :param pulumi.Input['OrganizationRulesetConditionsArgs'] conditions: (Block List, Max: 1) Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`. (see below for nested schema)
137
+ :param pulumi.Input['OrganizationRulesetConditionsArgs'] conditions: (Block List, Max: 1) Parameters for an organization ruleset condition. For `branch` and `tag` targets, `ref_name` is required alongside one of `repository_name` or `repository_id`. For `push` targets, `ref_name` must NOT be set - only `repository_name` or `repository_id` should be used. (see below for nested schema)
138
138
  :param pulumi.Input[_builtins.str] enforcement: (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.
139
139
  :param pulumi.Input[_builtins.str] etag: (String)
140
140
  :param pulumi.Input[_builtins.str] name: (String) The name of the ruleset.
@@ -178,7 +178,7 @@ class _OrganizationRulesetState:
178
178
  @pulumi.getter
179
179
  def conditions(self) -> Optional[pulumi.Input['OrganizationRulesetConditionsArgs']]:
180
180
  """
181
- (Block List, Max: 1) Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`. (see below for nested schema)
181
+ (Block List, Max: 1) Parameters for an organization ruleset condition. For `branch` and `tag` targets, `ref_name` is required alongside one of `repository_name` or `repository_id`. For `push` targets, `ref_name` must NOT be set - only `repository_name` or `repository_id` should be used. (see below for nested schema)
182
182
  """
183
183
  return pulumi.get(self, "conditions")
184
184
 
@@ -338,16 +338,13 @@ class OrganizationRuleset(pulumi.CustomResource):
338
338
  }],
339
339
  },
340
340
  })
341
- # Example with push ruleset
341
+ # Example with push ruleset
342
+ # Note: Push targets must NOT have ref_name in conditions, only repository_name or repository_id
342
343
  example_push = github.OrganizationRuleset("example_push",
343
344
  name="example_push",
344
345
  target="push",
345
346
  enforcement="active",
346
347
  conditions={
347
- "ref_name": {
348
- "includes": ["~ALL"],
349
- "excludes": [],
350
- },
351
348
  "repository_name": {
352
349
  "includes": ["~ALL"],
353
350
  "excludes": [],
@@ -387,7 +384,7 @@ class OrganizationRuleset(pulumi.CustomResource):
387
384
  :param str resource_name: The name of the resource.
388
385
  :param pulumi.ResourceOptions opts: Options for the resource.
389
386
  :param pulumi.Input[Sequence[pulumi.Input[Union['OrganizationRulesetBypassActorArgs', 'OrganizationRulesetBypassActorArgsDict']]]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
390
- :param pulumi.Input[Union['OrganizationRulesetConditionsArgs', 'OrganizationRulesetConditionsArgsDict']] conditions: (Block List, Max: 1) Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`. (see below for nested schema)
387
+ :param pulumi.Input[Union['OrganizationRulesetConditionsArgs', 'OrganizationRulesetConditionsArgsDict']] conditions: (Block List, Max: 1) Parameters for an organization ruleset condition. For `branch` and `tag` targets, `ref_name` is required alongside one of `repository_name` or `repository_id`. For `push` targets, `ref_name` must NOT be set - only `repository_name` or `repository_id` should be used. (see below for nested schema)
391
388
  :param pulumi.Input[_builtins.str] enforcement: (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.
392
389
  :param pulumi.Input[_builtins.str] name: (String) The name of the ruleset.
393
390
  :param pulumi.Input[Union['OrganizationRulesetRulesArgs', 'OrganizationRulesetRulesArgsDict']] rules: (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
@@ -453,16 +450,13 @@ class OrganizationRuleset(pulumi.CustomResource):
453
450
  }],
454
451
  },
455
452
  })
456
- # Example with push ruleset
453
+ # Example with push ruleset
454
+ # Note: Push targets must NOT have ref_name in conditions, only repository_name or repository_id
457
455
  example_push = github.OrganizationRuleset("example_push",
458
456
  name="example_push",
459
457
  target="push",
460
458
  enforcement="active",
461
459
  conditions={
462
- "ref_name": {
463
- "includes": ["~ALL"],
464
- "excludes": [],
465
- },
466
460
  "repository_name": {
467
461
  "includes": ["~ALL"],
468
462
  "excludes": [],
@@ -571,7 +565,7 @@ class OrganizationRuleset(pulumi.CustomResource):
571
565
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
572
566
  :param pulumi.ResourceOptions opts: Options for the resource.
573
567
  :param pulumi.Input[Sequence[pulumi.Input[Union['OrganizationRulesetBypassActorArgs', 'OrganizationRulesetBypassActorArgsDict']]]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
574
- :param pulumi.Input[Union['OrganizationRulesetConditionsArgs', 'OrganizationRulesetConditionsArgsDict']] conditions: (Block List, Max: 1) Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`. (see below for nested schema)
568
+ :param pulumi.Input[Union['OrganizationRulesetConditionsArgs', 'OrganizationRulesetConditionsArgsDict']] conditions: (Block List, Max: 1) Parameters for an organization ruleset condition. For `branch` and `tag` targets, `ref_name` is required alongside one of `repository_name` or `repository_id`. For `push` targets, `ref_name` must NOT be set - only `repository_name` or `repository_id` should be used. (see below for nested schema)
575
569
  :param pulumi.Input[_builtins.str] enforcement: (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.
576
570
  :param pulumi.Input[_builtins.str] etag: (String)
577
571
  :param pulumi.Input[_builtins.str] name: (String) The name of the ruleset.
@@ -607,7 +601,7 @@ class OrganizationRuleset(pulumi.CustomResource):
607
601
  @pulumi.getter
608
602
  def conditions(self) -> pulumi.Output[Optional['outputs.OrganizationRulesetConditions']]:
609
603
  """
610
- (Block List, Max: 1) Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`. (see below for nested schema)
604
+ (Block List, Max: 1) Parameters for an organization ruleset condition. For `branch` and `tag` targets, `ref_name` is required alongside one of `repository_name` or `repository_id`. For `push` targets, `ref_name` must NOT be set - only `repository_name` or `repository_id` should be used. (see below for nested schema)
611
605
  """
612
606
  return pulumi.get(self, "conditions")
613
607