@pulumi/github 5.0.0 → 5.2.0-alpha.1673638210

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 (260) hide show
  1. package/actionsEnvironmentSecret.d.ts +99 -0
  2. package/actionsEnvironmentSecret.js +68 -24
  3. package/actionsEnvironmentSecret.js.map +1 -1
  4. package/actionsOrganizationPermissions.d.ts +74 -1
  5. package/actionsOrganizationPermissions.js +58 -22
  6. package/actionsOrganizationPermissions.js.map +1 -1
  7. package/actionsOrganizationSecret.d.ts +110 -0
  8. package/actionsOrganizationSecret.js +76 -24
  9. package/actionsOrganizationSecret.js.map +1 -1
  10. package/actionsOrganizationSecretRepositories.d.ts +47 -0
  11. package/actionsOrganizationSecretRepositories.js +51 -22
  12. package/actionsOrganizationSecretRepositories.js.map +1 -1
  13. package/actionsRepositoryPermissions.d.ts +119 -0
  14. package/actionsRepositoryPermissions.js +91 -0
  15. package/actionsRepositoryPermissions.js.map +1 -0
  16. package/actionsRunnerGroup.d.ts +88 -0
  17. package/actionsRunnerGroup.js +47 -22
  18. package/actionsRunnerGroup.js.map +1 -1
  19. package/actionsSecret.d.ts +70 -0
  20. package/actionsSecret.js +48 -24
  21. package/actionsSecret.js.map +1 -1
  22. package/appInstallationRepositories.d.ts +81 -0
  23. package/appInstallationRepositories.js +78 -0
  24. package/appInstallationRepositories.js.map +1 -0
  25. package/appInstallationRepository.d.ts +53 -0
  26. package/appInstallationRepository.js +57 -22
  27. package/appInstallationRepository.js.map +1 -1
  28. package/branch.d.ts +92 -0
  29. package/branch.js +60 -22
  30. package/branch.js.map +1 -1
  31. package/branchDefault.d.ts +53 -0
  32. package/branchDefault.js +57 -22
  33. package/branchDefault.js.map +1 -1
  34. package/branchProtection.d.ts +175 -4
  35. package/branchProtection.js +83 -22
  36. package/branchProtection.js.map +1 -1
  37. package/branchProtectionV3.d.ts +140 -1
  38. package/branchProtectionV3.js +88 -22
  39. package/branchProtectionV3.js.map +1 -1
  40. package/config/vars.d.ts +1 -1
  41. package/config/vars.js.map +1 -1
  42. package/dependabotOrganizationSecret.js +26 -24
  43. package/dependabotOrganizationSecret.js.map +1 -1
  44. package/dependabotOrganizationSecretRepositories.js +22 -22
  45. package/dependabotOrganizationSecretRepositories.js.map +1 -1
  46. package/dependabotSecret.js +26 -24
  47. package/dependabotSecret.js.map +1 -1
  48. package/emuGroupMapping.d.ts +42 -0
  49. package/emuGroupMapping.js +46 -22
  50. package/emuGroupMapping.js.map +1 -1
  51. package/getActionsOrganizationRegistrationToken.d.ts +31 -0
  52. package/getActionsOrganizationRegistrationToken.js +25 -0
  53. package/getActionsOrganizationRegistrationToken.js.map +1 -0
  54. package/getActionsOrganizationSecrets.d.ts +16 -1
  55. package/getActionsOrganizationSecrets.js +13 -4
  56. package/getActionsOrganizationSecrets.js.map +1 -1
  57. package/getActionsPublicKey.d.ts +42 -0
  58. package/getActionsPublicKey.js +32 -5
  59. package/getActionsPublicKey.js.map +1 -1
  60. package/getActionsRegistrationToken.d.ts +67 -0
  61. package/getActionsRegistrationToken.js +47 -0
  62. package/getActionsRegistrationToken.js.map +1 -0
  63. package/getActionsSecrets.d.ts +47 -1
  64. package/getActionsSecrets.js +30 -5
  65. package/getActionsSecrets.js.map +1 -1
  66. package/getBranch.d.ts +51 -0
  67. package/getBranch.js +32 -5
  68. package/getBranch.js.map +1 -1
  69. package/getCollaborators.d.ts +52 -1
  70. package/getCollaborators.js +32 -5
  71. package/getCollaborators.js.map +1 -1
  72. package/getDependabotOrganizationSecrets.d.ts +28 -0
  73. package/getDependabotOrganizationSecrets.js +25 -0
  74. package/getDependabotOrganizationSecrets.js.map +1 -0
  75. package/getDependabotPublicKey.js +2 -5
  76. package/getDependabotPublicKey.js.map +1 -1
  77. package/getDependabotSecrets.d.ts +76 -0
  78. package/getDependabotSecrets.js +49 -0
  79. package/getDependabotSecrets.js.map +1 -0
  80. package/getExternalGroups.d.ts +18 -1
  81. package/getExternalGroups.js +15 -4
  82. package/getExternalGroups.js.map +1 -1
  83. package/getGithubApp.d.ts +71 -0
  84. package/getGithubApp.js +47 -0
  85. package/getGithubApp.js.map +1 -0
  86. package/getIpRanges.d.ts +84 -0
  87. package/getIpRanges.js +13 -4
  88. package/getIpRanges.js.map +1 -1
  89. package/getMembership.d.ts +59 -0
  90. package/getMembership.js +36 -5
  91. package/getMembership.js.map +1 -1
  92. package/getOrganization.d.ts +58 -0
  93. package/getOrganization.js +30 -5
  94. package/getOrganization.js.map +1 -1
  95. package/getOrganizationIpAllowList.d.ts +31 -0
  96. package/getOrganizationIpAllowList.js +27 -0
  97. package/getOrganizationIpAllowList.js.map +1 -0
  98. package/getOrganizationTeamSyncGroups.d.ts +16 -1
  99. package/getOrganizationTeamSyncGroups.js +13 -4
  100. package/getOrganizationTeamSyncGroups.js.map +1 -1
  101. package/getOrganizationTeams.d.ts +87 -1
  102. package/getOrganizationTeams.js +54 -5
  103. package/getOrganizationTeams.js.map +1 -1
  104. package/getOrganizationWebhooks.d.ts +31 -0
  105. package/getOrganizationWebhooks.js +27 -0
  106. package/getOrganizationWebhooks.js.map +1 -0
  107. package/getRef.d.ts +48 -0
  108. package/getRef.js +32 -5
  109. package/getRef.js.map +1 -1
  110. package/getRelease.d.ts +92 -0
  111. package/getRelease.js +8 -5
  112. package/getRelease.js.map +1 -1
  113. package/getRepositories.d.ts +70 -0
  114. package/getRepositories.js +40 -5
  115. package/getRepositories.js.map +1 -1
  116. package/getRepository.d.ts +142 -4
  117. package/getRepository.js +30 -6
  118. package/getRepository.js.map +1 -1
  119. package/getRepositoryBranches.d.ts +82 -0
  120. package/getRepositoryBranches.js +49 -0
  121. package/getRepositoryBranches.js.map +1 -0
  122. package/getRepositoryDeployKeys.d.ts +64 -0
  123. package/getRepositoryDeployKeys.js +47 -0
  124. package/getRepositoryDeployKeys.js.map +1 -0
  125. package/getRepositoryFile.d.ts +72 -0
  126. package/getRepositoryFile.js +36 -5
  127. package/getRepositoryFile.js.map +1 -1
  128. package/getRepositoryMilestone.d.ts +62 -0
  129. package/getRepositoryMilestone.js +34 -5
  130. package/getRepositoryMilestone.js.map +1 -1
  131. package/getRepositoryPullRequest.d.ts +90 -0
  132. package/getRepositoryPullRequest.js +32 -5
  133. package/getRepositoryPullRequest.js.map +1 -1
  134. package/getRepositoryPullRequests.d.ts +91 -1
  135. package/getRepositoryPullRequests.js +38 -5
  136. package/getRepositoryPullRequests.js.map +1 -1
  137. package/getRepositoryTeams.d.ts +47 -1
  138. package/getRepositoryTeams.js +30 -5
  139. package/getRepositoryTeams.js.map +1 -1
  140. package/getRepositoryWebhooks.d.ts +63 -0
  141. package/getRepositoryWebhooks.js +51 -0
  142. package/getRepositoryWebhooks.js.map +1 -0
  143. package/getTeam.d.ts +79 -0
  144. package/getTeam.js +32 -5
  145. package/getTeam.js.map +1 -1
  146. package/getTree.d.ts +70 -1
  147. package/getTree.js +50 -5
  148. package/getTree.js.map +1 -1
  149. package/getUser.d.ts +102 -0
  150. package/getUser.js +38 -5
  151. package/getUser.js.map +1 -1
  152. package/getUsers.d.ts +55 -0
  153. package/getUsers.js +42 -5
  154. package/getUsers.js.map +1 -1
  155. package/index.d.ts +244 -68
  156. package/index.js +259 -171
  157. package/index.js.map +1 -1
  158. package/issue.d.ts +117 -6
  159. package/issue.js +85 -22
  160. package/issue.js.map +1 -1
  161. package/issueLabel.d.ts +64 -0
  162. package/issueLabel.js +44 -22
  163. package/issueLabel.js.map +1 -1
  164. package/membership.d.ts +49 -0
  165. package/membership.js +49 -21
  166. package/membership.js.map +1 -1
  167. package/organizationBlock.d.ts +21 -0
  168. package/organizationBlock.js +31 -19
  169. package/organizationBlock.js.map +1 -1
  170. package/organizationProject.d.ts +36 -0
  171. package/organizationProject.js +32 -20
  172. package/organizationProject.js.map +1 -1
  173. package/organizationSecurityManager.d.ts +67 -0
  174. package/organizationSecurityManager.js +71 -0
  175. package/organizationSecurityManager.js.map +1 -0
  176. package/organizationSettings.d.ts +394 -0
  177. package/organizationSettings.js +148 -0
  178. package/organizationSettings.js.map +1 -0
  179. package/organizationWebhook.d.ts +65 -1
  180. package/organizationWebhook.js +52 -22
  181. package/organizationWebhook.js.map +1 -1
  182. package/package.json +2 -2
  183. package/package.json.dev +2 -2
  184. package/projectCard.d.ts +87 -0
  185. package/projectCard.js +73 -22
  186. package/projectCard.js.map +1 -1
  187. package/projectColumn.d.ts +31 -0
  188. package/projectColumn.js +35 -22
  189. package/projectColumn.js.map +1 -1
  190. package/provider.d.ts +1 -1
  191. package/provider.js +10 -10
  192. package/provider.js.map +1 -1
  193. package/release.d.ts +194 -0
  194. package/release.js +121 -0
  195. package/release.js.map +1 -0
  196. package/repository.d.ts +396 -4
  197. package/repository.js +72 -22
  198. package/repository.js.map +1 -1
  199. package/repositoryAutolinkReference.d.ts +54 -6
  200. package/repositoryAutolinkReference.js +54 -22
  201. package/repositoryAutolinkReference.js.map +1 -1
  202. package/repositoryCollaborator.d.ts +90 -0
  203. package/repositoryCollaborator.js +64 -22
  204. package/repositoryCollaborator.js.map +1 -1
  205. package/repositoryDeployKey.d.ts +71 -0
  206. package/repositoryDeployKey.js +57 -22
  207. package/repositoryDeployKey.js.map +1 -1
  208. package/repositoryEnvironment.d.ts +63 -1
  209. package/repositoryEnvironment.js +56 -22
  210. package/repositoryEnvironment.js.map +1 -1
  211. package/repositoryFile.d.ts +70 -30
  212. package/repositoryFile.js +59 -22
  213. package/repositoryFile.js.map +1 -1
  214. package/repositoryMilestone.d.ts +81 -3
  215. package/repositoryMilestone.js +49 -22
  216. package/repositoryMilestone.js.map +1 -1
  217. package/repositoryProject.d.ts +52 -0
  218. package/repositoryProject.js +41 -22
  219. package/repositoryProject.js.map +1 -1
  220. package/repositoryPullRequest.d.ts +127 -4
  221. package/repositoryPullRequest.js +40 -22
  222. package/repositoryPullRequest.js.map +1 -1
  223. package/repositoryTagProtection.d.ts +41 -0
  224. package/repositoryTagProtection.js +45 -22
  225. package/repositoryTagProtection.js.map +1 -1
  226. package/repositoryWebhook.d.ts +81 -1
  227. package/repositoryWebhook.js +59 -22
  228. package/repositoryWebhook.js.map +1 -1
  229. package/team.d.ts +100 -0
  230. package/team.js +49 -22
  231. package/team.js.map +1 -1
  232. package/teamMembers.d.ts +60 -1
  233. package/teamMembers.js +62 -22
  234. package/teamMembers.js.map +1 -1
  235. package/teamMembership.d.ts +67 -0
  236. package/teamMembership.js +59 -22
  237. package/teamMembership.js.map +1 -1
  238. package/teamRepository.d.ts +59 -3
  239. package/teamRepository.js +57 -22
  240. package/teamRepository.js.map +1 -1
  241. package/teamSettings.d.ts +119 -0
  242. package/teamSettings.js +99 -0
  243. package/teamSettings.js.map +1 -0
  244. package/teamSyncGroupMapping.d.ts +38 -1
  245. package/teamSyncGroupMapping.js +36 -21
  246. package/teamSyncGroupMapping.js.map +1 -1
  247. package/types/index.js.map +1 -1
  248. package/types/input.d.ts +208 -1
  249. package/types/output.d.ts +555 -1
  250. package/userGpgKey.d.ts +39 -0
  251. package/userGpgKey.js +42 -21
  252. package/userGpgKey.js.map +1 -1
  253. package/userInvitationAccepter.d.ts +30 -0
  254. package/userInvitationAccepter.js +38 -17
  255. package/userInvitationAccepter.js.map +1 -1
  256. package/userSshKey.d.ts +50 -0
  257. package/userSshKey.js +48 -22
  258. package/userSshKey.js.map +1 -1
  259. package/utilities.js +13 -1
  260. package/utilities.js.map +1 -1
package/repository.d.ts CHANGED
@@ -1,5 +1,52 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
- import { input as inputs, output as outputs } from "./types";
2
+ import * as inputs from "./types/input";
3
+ import * as outputs from "./types/output";
4
+ /**
5
+ * This resource allows you to create and manage repositories within your
6
+ * GitHub organization or personal account.
7
+ *
8
+ * ## Example Usage
9
+ *
10
+ * ```typescript
11
+ * import * as pulumi from "@pulumi/pulumi";
12
+ * import * as github from "@pulumi/github";
13
+ *
14
+ * const example = new github.Repository("example", {
15
+ * description: "My awesome codebase",
16
+ * template: {
17
+ * includeAllBranches: true,
18
+ * owner: "github",
19
+ * repository: "terraform-module-template",
20
+ * },
21
+ * visibility: "public",
22
+ * });
23
+ * ```
24
+ * ### With GitHub Pages Enabled
25
+ *
26
+ * ```typescript
27
+ * import * as pulumi from "@pulumi/pulumi";
28
+ * import * as github from "@pulumi/github";
29
+ *
30
+ * const example = new github.Repository("example", {
31
+ * description: "My awesome web page",
32
+ * pages: {
33
+ * source: {
34
+ * branch: "master",
35
+ * path: "/docs",
36
+ * },
37
+ * },
38
+ * "private": false,
39
+ * });
40
+ * ```
41
+ *
42
+ * ## Import
43
+ *
44
+ * Repositories can be imported using the `name`, e.g.
45
+ *
46
+ * ```sh
47
+ * $ pulumi import github:index/repository:Repository terraform terraform
48
+ * ```
49
+ */
3
50
  export declare class Repository extends pulumi.CustomResource {
4
51
  /**
5
52
  * Get an existing Repository resource's state with the given name, ID, and optional extra
@@ -16,52 +63,175 @@ export declare class Repository extends pulumi.CustomResource {
16
63
  * when multiple copies of the Pulumi SDK have been loaded into the same process.
17
64
  */
18
65
  static isInstance(obj: any): obj is Repository;
66
+ /**
67
+ * Set to `true` to allow auto-merging pull requests on the repository.
68
+ */
19
69
  readonly allowAutoMerge: pulumi.Output<boolean | undefined>;
70
+ /**
71
+ * Set to `false` to disable merge commits on the repository.
72
+ */
20
73
  readonly allowMergeCommit: pulumi.Output<boolean | undefined>;
74
+ /**
75
+ * Set to `false` to disable rebase merges on the repository.
76
+ */
21
77
  readonly allowRebaseMerge: pulumi.Output<boolean | undefined>;
78
+ /**
79
+ * Set to `false` to disable squash merges on the repository.
80
+ */
22
81
  readonly allowSquashMerge: pulumi.Output<boolean | undefined>;
82
+ /**
83
+ * Set to `true` to always suggest updating pull request branches.
84
+ */
85
+ readonly allowUpdateBranch: pulumi.Output<boolean | undefined>;
86
+ /**
87
+ * Set to `true` to archive the repository instead of deleting on destroy.
88
+ */
23
89
  readonly archiveOnDestroy: pulumi.Output<boolean | undefined>;
90
+ /**
91
+ * Specifies if the repository should be archived. Defaults to `false`. **NOTE** Currently, the API does not support unarchiving.
92
+ */
24
93
  readonly archived: pulumi.Output<boolean | undefined>;
94
+ /**
95
+ * Set to `true` to produce an initial commit in the repository.
96
+ */
25
97
  readonly autoInit: pulumi.Output<boolean | undefined>;
26
98
  /**
27
- * Can only be set after initial repository creation, and only if the target branch exists
99
+ * (Deprecated: Use `github.BranchDefault` resource instead) The name of the default branch of the repository. **NOTE:** This can only be set after a repository has already been created,
100
+ * and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the
101
+ * initial repository creation and create the target branch inside of the repository prior to setting this attribute.
28
102
  *
29
103
  * @deprecated Use the github_branch_default resource instead
30
104
  */
31
105
  readonly defaultBranch: pulumi.Output<string>;
106
+ /**
107
+ * Automatically delete head branch after a pull request is merged. Defaults to `false`.
108
+ */
32
109
  readonly deleteBranchOnMerge: pulumi.Output<boolean | undefined>;
110
+ /**
111
+ * A description of the repository.
112
+ */
33
113
  readonly description: pulumi.Output<string | undefined>;
34
114
  readonly etag: pulumi.Output<string>;
115
+ /**
116
+ * A string of the form "orgname/reponame".
117
+ */
35
118
  readonly fullName: pulumi.Output<string>;
119
+ /**
120
+ * URL that can be provided to `git clone` to clone the repository anonymously via the git protocol.
121
+ */
36
122
  readonly gitCloneUrl: pulumi.Output<string>;
123
+ /**
124
+ * Use the [name of the template](https://github.com/github/gitignore) without the extension. For example, "Haskell".
125
+ */
37
126
  readonly gitignoreTemplate: pulumi.Output<string | undefined>;
127
+ /**
128
+ * Set to `true` to enable the (deprecated) downloads features on the repository.
129
+ */
38
130
  readonly hasDownloads: pulumi.Output<boolean | undefined>;
131
+ /**
132
+ * Set to `true` to enable the GitHub Issues features
133
+ * on the repository.
134
+ */
39
135
  readonly hasIssues: pulumi.Output<boolean | undefined>;
136
+ /**
137
+ * Set to `true` to enable the GitHub Projects features on the repository. Per the GitHub [documentation](https://developer.github.com/v3/repos/#create) when in an organization that has disabled repository projects it will default to `false` and will otherwise default to `true`. If you specify `true` when it has been disabled it will return an error.
138
+ */
40
139
  readonly hasProjects: pulumi.Output<boolean | undefined>;
140
+ /**
141
+ * Set to `true` to enable the GitHub Wiki features on
142
+ * the repository.
143
+ */
41
144
  readonly hasWiki: pulumi.Output<boolean | undefined>;
145
+ /**
146
+ * URL of a page describing the project.
147
+ */
42
148
  readonly homepageUrl: pulumi.Output<string | undefined>;
149
+ /**
150
+ * The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`.
151
+ */
43
152
  readonly htmlUrl: pulumi.Output<string>;
153
+ /**
154
+ * URL that can be provided to `git clone` to clone the repository via HTTPS.
155
+ */
44
156
  readonly httpCloneUrl: pulumi.Output<string>;
157
+ /**
158
+ * Set to `true` to not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read.
159
+ */
45
160
  readonly ignoreVulnerabilityAlertsDuringRead: pulumi.Output<boolean | undefined>;
161
+ /**
162
+ * Set to `true` to tell GitHub that this is a template repository.
163
+ */
46
164
  readonly isTemplate: pulumi.Output<boolean | undefined>;
165
+ /**
166
+ * Use the [name of the template](https://github.com/github/choosealicense.com/tree/gh-pages/_licenses) without the extension. For example, "mit" or "mpl-2.0".
167
+ */
47
168
  readonly licenseTemplate: pulumi.Output<string | undefined>;
169
+ /**
170
+ * Can be `PR_BODY`, `PR_TITLE`, or `BLANK` for a default merge commit message.
171
+ */
48
172
  readonly mergeCommitMessage: pulumi.Output<string | undefined>;
173
+ /**
174
+ * Can be `PR_TITLE` or `MERGE_MESSAGE` for a default merge commit title.
175
+ */
49
176
  readonly mergeCommitTitle: pulumi.Output<string | undefined>;
177
+ /**
178
+ * The name of the repository.
179
+ */
50
180
  readonly name: pulumi.Output<string>;
181
+ /**
182
+ * GraphQL global node id for use with v4 API
183
+ */
51
184
  readonly nodeId: pulumi.Output<string>;
185
+ /**
186
+ * The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
187
+ */
52
188
  readonly pages: pulumi.Output<outputs.RepositoryPages | undefined>;
53
189
  /**
190
+ * Set to `true` to create a private repository.
191
+ * Repositories are created as public (e.g. open source) by default.
192
+ *
54
193
  * @deprecated use visibility instead
55
194
  */
56
195
  readonly private: pulumi.Output<boolean>;
196
+ /**
197
+ * GitHub ID for the repository
198
+ */
57
199
  readonly repoId: pulumi.Output<number>;
200
+ /**
201
+ * The repository's [security and analysis](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository) configuration. See Security and Analysis Configuration below for details.
202
+ */
203
+ readonly securityAndAnalysis: pulumi.Output<outputs.RepositorySecurityAndAnalysis | undefined>;
204
+ /**
205
+ * Can be `PR_BODY`, `COMMIT_MESSAGES`, or `BLANK` for a default squash merge commit message.
206
+ */
58
207
  readonly squashMergeCommitMessage: pulumi.Output<string | undefined>;
208
+ /**
209
+ * Can be `PR_TITLE` or `COMMIT_OR_PR_TITLE` for a default squash merge commit title.
210
+ */
59
211
  readonly squashMergeCommitTitle: pulumi.Output<string | undefined>;
212
+ /**
213
+ * URL that can be provided to `git clone` to clone the repository via SSH.
214
+ */
60
215
  readonly sshCloneUrl: pulumi.Output<string>;
216
+ /**
217
+ * URL that can be provided to `svn checkout` to check out the repository via GitHub's Subversion protocol emulation.
218
+ */
61
219
  readonly svnUrl: pulumi.Output<string>;
220
+ /**
221
+ * Use a template repository to create this resource. See Template Repositories below for details.
222
+ */
62
223
  readonly template: pulumi.Output<outputs.RepositoryTemplate | undefined>;
224
+ /**
225
+ * The list of topics of the repository.
226
+ */
63
227
  readonly topics: pulumi.Output<string[] | undefined>;
228
+ /**
229
+ * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be `internal`. The `visibility` parameter overrides the `private` parameter.
230
+ */
64
231
  readonly visibility: pulumi.Output<string>;
232
+ /**
233
+ * Set to `true` to enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See [GitHub Documentation](https://help.github.com/en/github/managing-security-vulnerabilities/about-security-alerts-for-vulnerable-dependencies) for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
234
+ */
65
235
  readonly vulnerabilityAlerts: pulumi.Output<boolean | undefined>;
66
236
  /**
67
237
  * Create a Repository resource with the given unique name, arguments, and options.
@@ -76,94 +246,316 @@ export declare class Repository extends pulumi.CustomResource {
76
246
  * Input properties used for looking up and filtering Repository resources.
77
247
  */
78
248
  export interface RepositoryState {
249
+ /**
250
+ * Set to `true` to allow auto-merging pull requests on the repository.
251
+ */
79
252
  allowAutoMerge?: pulumi.Input<boolean>;
253
+ /**
254
+ * Set to `false` to disable merge commits on the repository.
255
+ */
80
256
  allowMergeCommit?: pulumi.Input<boolean>;
257
+ /**
258
+ * Set to `false` to disable rebase merges on the repository.
259
+ */
81
260
  allowRebaseMerge?: pulumi.Input<boolean>;
261
+ /**
262
+ * Set to `false` to disable squash merges on the repository.
263
+ */
82
264
  allowSquashMerge?: pulumi.Input<boolean>;
265
+ /**
266
+ * Set to `true` to always suggest updating pull request branches.
267
+ */
268
+ allowUpdateBranch?: pulumi.Input<boolean>;
269
+ /**
270
+ * Set to `true` to archive the repository instead of deleting on destroy.
271
+ */
83
272
  archiveOnDestroy?: pulumi.Input<boolean>;
273
+ /**
274
+ * Specifies if the repository should be archived. Defaults to `false`. **NOTE** Currently, the API does not support unarchiving.
275
+ */
84
276
  archived?: pulumi.Input<boolean>;
277
+ /**
278
+ * Set to `true` to produce an initial commit in the repository.
279
+ */
85
280
  autoInit?: pulumi.Input<boolean>;
86
281
  /**
87
- * Can only be set after initial repository creation, and only if the target branch exists
282
+ * (Deprecated: Use `github.BranchDefault` resource instead) The name of the default branch of the repository. **NOTE:** This can only be set after a repository has already been created,
283
+ * and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the
284
+ * initial repository creation and create the target branch inside of the repository prior to setting this attribute.
88
285
  *
89
286
  * @deprecated Use the github_branch_default resource instead
90
287
  */
91
288
  defaultBranch?: pulumi.Input<string>;
289
+ /**
290
+ * Automatically delete head branch after a pull request is merged. Defaults to `false`.
291
+ */
92
292
  deleteBranchOnMerge?: pulumi.Input<boolean>;
293
+ /**
294
+ * A description of the repository.
295
+ */
93
296
  description?: pulumi.Input<string>;
94
297
  etag?: pulumi.Input<string>;
298
+ /**
299
+ * A string of the form "orgname/reponame".
300
+ */
95
301
  fullName?: pulumi.Input<string>;
302
+ /**
303
+ * URL that can be provided to `git clone` to clone the repository anonymously via the git protocol.
304
+ */
96
305
  gitCloneUrl?: pulumi.Input<string>;
306
+ /**
307
+ * Use the [name of the template](https://github.com/github/gitignore) without the extension. For example, "Haskell".
308
+ */
97
309
  gitignoreTemplate?: pulumi.Input<string>;
310
+ /**
311
+ * Set to `true` to enable the (deprecated) downloads features on the repository.
312
+ */
98
313
  hasDownloads?: pulumi.Input<boolean>;
314
+ /**
315
+ * Set to `true` to enable the GitHub Issues features
316
+ * on the repository.
317
+ */
99
318
  hasIssues?: pulumi.Input<boolean>;
319
+ /**
320
+ * Set to `true` to enable the GitHub Projects features on the repository. Per the GitHub [documentation](https://developer.github.com/v3/repos/#create) when in an organization that has disabled repository projects it will default to `false` and will otherwise default to `true`. If you specify `true` when it has been disabled it will return an error.
321
+ */
100
322
  hasProjects?: pulumi.Input<boolean>;
323
+ /**
324
+ * Set to `true` to enable the GitHub Wiki features on
325
+ * the repository.
326
+ */
101
327
  hasWiki?: pulumi.Input<boolean>;
328
+ /**
329
+ * URL of a page describing the project.
330
+ */
102
331
  homepageUrl?: pulumi.Input<string>;
332
+ /**
333
+ * The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`.
334
+ */
103
335
  htmlUrl?: pulumi.Input<string>;
336
+ /**
337
+ * URL that can be provided to `git clone` to clone the repository via HTTPS.
338
+ */
104
339
  httpCloneUrl?: pulumi.Input<string>;
340
+ /**
341
+ * Set to `true` to not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read.
342
+ */
105
343
  ignoreVulnerabilityAlertsDuringRead?: pulumi.Input<boolean>;
344
+ /**
345
+ * Set to `true` to tell GitHub that this is a template repository.
346
+ */
106
347
  isTemplate?: pulumi.Input<boolean>;
348
+ /**
349
+ * Use the [name of the template](https://github.com/github/choosealicense.com/tree/gh-pages/_licenses) without the extension. For example, "mit" or "mpl-2.0".
350
+ */
107
351
  licenseTemplate?: pulumi.Input<string>;
352
+ /**
353
+ * Can be `PR_BODY`, `PR_TITLE`, or `BLANK` for a default merge commit message.
354
+ */
108
355
  mergeCommitMessage?: pulumi.Input<string>;
356
+ /**
357
+ * Can be `PR_TITLE` or `MERGE_MESSAGE` for a default merge commit title.
358
+ */
109
359
  mergeCommitTitle?: pulumi.Input<string>;
360
+ /**
361
+ * The name of the repository.
362
+ */
110
363
  name?: pulumi.Input<string>;
364
+ /**
365
+ * GraphQL global node id for use with v4 API
366
+ */
111
367
  nodeId?: pulumi.Input<string>;
368
+ /**
369
+ * The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
370
+ */
112
371
  pages?: pulumi.Input<inputs.RepositoryPages>;
113
372
  /**
373
+ * Set to `true` to create a private repository.
374
+ * Repositories are created as public (e.g. open source) by default.
375
+ *
114
376
  * @deprecated use visibility instead
115
377
  */
116
378
  private?: pulumi.Input<boolean>;
379
+ /**
380
+ * GitHub ID for the repository
381
+ */
117
382
  repoId?: pulumi.Input<number>;
383
+ /**
384
+ * The repository's [security and analysis](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository) configuration. See Security and Analysis Configuration below for details.
385
+ */
386
+ securityAndAnalysis?: pulumi.Input<inputs.RepositorySecurityAndAnalysis>;
387
+ /**
388
+ * Can be `PR_BODY`, `COMMIT_MESSAGES`, or `BLANK` for a default squash merge commit message.
389
+ */
118
390
  squashMergeCommitMessage?: pulumi.Input<string>;
391
+ /**
392
+ * Can be `PR_TITLE` or `COMMIT_OR_PR_TITLE` for a default squash merge commit title.
393
+ */
119
394
  squashMergeCommitTitle?: pulumi.Input<string>;
395
+ /**
396
+ * URL that can be provided to `git clone` to clone the repository via SSH.
397
+ */
120
398
  sshCloneUrl?: pulumi.Input<string>;
399
+ /**
400
+ * URL that can be provided to `svn checkout` to check out the repository via GitHub's Subversion protocol emulation.
401
+ */
121
402
  svnUrl?: pulumi.Input<string>;
403
+ /**
404
+ * Use a template repository to create this resource. See Template Repositories below for details.
405
+ */
122
406
  template?: pulumi.Input<inputs.RepositoryTemplate>;
407
+ /**
408
+ * The list of topics of the repository.
409
+ */
123
410
  topics?: pulumi.Input<pulumi.Input<string>[]>;
411
+ /**
412
+ * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be `internal`. The `visibility` parameter overrides the `private` parameter.
413
+ */
124
414
  visibility?: pulumi.Input<string>;
415
+ /**
416
+ * Set to `true` to enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See [GitHub Documentation](https://help.github.com/en/github/managing-security-vulnerabilities/about-security-alerts-for-vulnerable-dependencies) for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
417
+ */
125
418
  vulnerabilityAlerts?: pulumi.Input<boolean>;
126
419
  }
127
420
  /**
128
421
  * The set of arguments for constructing a Repository resource.
129
422
  */
130
423
  export interface RepositoryArgs {
424
+ /**
425
+ * Set to `true` to allow auto-merging pull requests on the repository.
426
+ */
131
427
  allowAutoMerge?: pulumi.Input<boolean>;
428
+ /**
429
+ * Set to `false` to disable merge commits on the repository.
430
+ */
132
431
  allowMergeCommit?: pulumi.Input<boolean>;
432
+ /**
433
+ * Set to `false` to disable rebase merges on the repository.
434
+ */
133
435
  allowRebaseMerge?: pulumi.Input<boolean>;
436
+ /**
437
+ * Set to `false` to disable squash merges on the repository.
438
+ */
134
439
  allowSquashMerge?: pulumi.Input<boolean>;
440
+ /**
441
+ * Set to `true` to always suggest updating pull request branches.
442
+ */
443
+ allowUpdateBranch?: pulumi.Input<boolean>;
444
+ /**
445
+ * Set to `true` to archive the repository instead of deleting on destroy.
446
+ */
135
447
  archiveOnDestroy?: pulumi.Input<boolean>;
448
+ /**
449
+ * Specifies if the repository should be archived. Defaults to `false`. **NOTE** Currently, the API does not support unarchiving.
450
+ */
136
451
  archived?: pulumi.Input<boolean>;
452
+ /**
453
+ * Set to `true` to produce an initial commit in the repository.
454
+ */
137
455
  autoInit?: pulumi.Input<boolean>;
138
456
  /**
139
- * Can only be set after initial repository creation, and only if the target branch exists
457
+ * (Deprecated: Use `github.BranchDefault` resource instead) The name of the default branch of the repository. **NOTE:** This can only be set after a repository has already been created,
458
+ * and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the
459
+ * initial repository creation and create the target branch inside of the repository prior to setting this attribute.
140
460
  *
141
461
  * @deprecated Use the github_branch_default resource instead
142
462
  */
143
463
  defaultBranch?: pulumi.Input<string>;
464
+ /**
465
+ * Automatically delete head branch after a pull request is merged. Defaults to `false`.
466
+ */
144
467
  deleteBranchOnMerge?: pulumi.Input<boolean>;
468
+ /**
469
+ * A description of the repository.
470
+ */
145
471
  description?: pulumi.Input<string>;
472
+ /**
473
+ * Use the [name of the template](https://github.com/github/gitignore) without the extension. For example, "Haskell".
474
+ */
146
475
  gitignoreTemplate?: pulumi.Input<string>;
476
+ /**
477
+ * Set to `true` to enable the (deprecated) downloads features on the repository.
478
+ */
147
479
  hasDownloads?: pulumi.Input<boolean>;
480
+ /**
481
+ * Set to `true` to enable the GitHub Issues features
482
+ * on the repository.
483
+ */
148
484
  hasIssues?: pulumi.Input<boolean>;
485
+ /**
486
+ * Set to `true` to enable the GitHub Projects features on the repository. Per the GitHub [documentation](https://developer.github.com/v3/repos/#create) when in an organization that has disabled repository projects it will default to `false` and will otherwise default to `true`. If you specify `true` when it has been disabled it will return an error.
487
+ */
149
488
  hasProjects?: pulumi.Input<boolean>;
489
+ /**
490
+ * Set to `true` to enable the GitHub Wiki features on
491
+ * the repository.
492
+ */
150
493
  hasWiki?: pulumi.Input<boolean>;
494
+ /**
495
+ * URL of a page describing the project.
496
+ */
151
497
  homepageUrl?: pulumi.Input<string>;
498
+ /**
499
+ * Set to `true` to not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read.
500
+ */
152
501
  ignoreVulnerabilityAlertsDuringRead?: pulumi.Input<boolean>;
502
+ /**
503
+ * Set to `true` to tell GitHub that this is a template repository.
504
+ */
153
505
  isTemplate?: pulumi.Input<boolean>;
506
+ /**
507
+ * Use the [name of the template](https://github.com/github/choosealicense.com/tree/gh-pages/_licenses) without the extension. For example, "mit" or "mpl-2.0".
508
+ */
154
509
  licenseTemplate?: pulumi.Input<string>;
510
+ /**
511
+ * Can be `PR_BODY`, `PR_TITLE`, or `BLANK` for a default merge commit message.
512
+ */
155
513
  mergeCommitMessage?: pulumi.Input<string>;
514
+ /**
515
+ * Can be `PR_TITLE` or `MERGE_MESSAGE` for a default merge commit title.
516
+ */
156
517
  mergeCommitTitle?: pulumi.Input<string>;
518
+ /**
519
+ * The name of the repository.
520
+ */
157
521
  name?: pulumi.Input<string>;
522
+ /**
523
+ * The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
524
+ */
158
525
  pages?: pulumi.Input<inputs.RepositoryPages>;
159
526
  /**
527
+ * Set to `true` to create a private repository.
528
+ * Repositories are created as public (e.g. open source) by default.
529
+ *
160
530
  * @deprecated use visibility instead
161
531
  */
162
532
  private?: pulumi.Input<boolean>;
533
+ /**
534
+ * The repository's [security and analysis](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository) configuration. See Security and Analysis Configuration below for details.
535
+ */
536
+ securityAndAnalysis?: pulumi.Input<inputs.RepositorySecurityAndAnalysis>;
537
+ /**
538
+ * Can be `PR_BODY`, `COMMIT_MESSAGES`, or `BLANK` for a default squash merge commit message.
539
+ */
163
540
  squashMergeCommitMessage?: pulumi.Input<string>;
541
+ /**
542
+ * Can be `PR_TITLE` or `COMMIT_OR_PR_TITLE` for a default squash merge commit title.
543
+ */
164
544
  squashMergeCommitTitle?: pulumi.Input<string>;
545
+ /**
546
+ * Use a template repository to create this resource. See Template Repositories below for details.
547
+ */
165
548
  template?: pulumi.Input<inputs.RepositoryTemplate>;
549
+ /**
550
+ * The list of topics of the repository.
551
+ */
166
552
  topics?: pulumi.Input<pulumi.Input<string>[]>;
553
+ /**
554
+ * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be `internal`. The `visibility` parameter overrides the `private` parameter.
555
+ */
167
556
  visibility?: pulumi.Input<string>;
557
+ /**
558
+ * Set to `true` to enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See [GitHub Documentation](https://help.github.com/en/github/managing-security-vulnerabilities/about-security-alerts-for-vulnerable-dependencies) for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
559
+ */
168
560
  vulnerabilityAlerts?: pulumi.Input<boolean>;
169
561
  }
package/repository.js CHANGED
@@ -5,7 +5,75 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.Repository = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * This resource allows you to create and manage repositories within your
10
+ * GitHub organization or personal account.
11
+ *
12
+ * ## Example Usage
13
+ *
14
+ * ```typescript
15
+ * import * as pulumi from "@pulumi/pulumi";
16
+ * import * as github from "@pulumi/github";
17
+ *
18
+ * const example = new github.Repository("example", {
19
+ * description: "My awesome codebase",
20
+ * template: {
21
+ * includeAllBranches: true,
22
+ * owner: "github",
23
+ * repository: "terraform-module-template",
24
+ * },
25
+ * visibility: "public",
26
+ * });
27
+ * ```
28
+ * ### With GitHub Pages Enabled
29
+ *
30
+ * ```typescript
31
+ * import * as pulumi from "@pulumi/pulumi";
32
+ * import * as github from "@pulumi/github";
33
+ *
34
+ * const example = new github.Repository("example", {
35
+ * description: "My awesome web page",
36
+ * pages: {
37
+ * source: {
38
+ * branch: "master",
39
+ * path: "/docs",
40
+ * },
41
+ * },
42
+ * "private": false,
43
+ * });
44
+ * ```
45
+ *
46
+ * ## Import
47
+ *
48
+ * Repositories can be imported using the `name`, e.g.
49
+ *
50
+ * ```sh
51
+ * $ pulumi import github:index/repository:Repository terraform terraform
52
+ * ```
53
+ */
8
54
  class Repository extends pulumi.CustomResource {
55
+ /**
56
+ * Get an existing Repository resource's state with the given name, ID, and optional extra
57
+ * properties used to qualify the lookup.
58
+ *
59
+ * @param name The _unique_ name of the resulting resource.
60
+ * @param id The _unique_ provider ID of the resource to lookup.
61
+ * @param state Any extra arguments used during the lookup.
62
+ * @param opts Optional settings to control the behavior of the CustomResource.
63
+ */
64
+ static get(name, id, state, opts) {
65
+ return new Repository(name, state, Object.assign(Object.assign({}, opts), { id: id }));
66
+ }
67
+ /**
68
+ * Returns true if the given object is an instance of Repository. This is designed to work even
69
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
70
+ */
71
+ static isInstance(obj) {
72
+ if (obj === undefined || obj === null) {
73
+ return false;
74
+ }
75
+ return obj['__pulumiType'] === Repository.__pulumiType;
76
+ }
9
77
  constructor(name, argsOrState, opts) {
10
78
  let resourceInputs = {};
11
79
  opts = opts || {};
@@ -15,6 +83,7 @@ class Repository extends pulumi.CustomResource {
15
83
  resourceInputs["allowMergeCommit"] = state ? state.allowMergeCommit : undefined;
16
84
  resourceInputs["allowRebaseMerge"] = state ? state.allowRebaseMerge : undefined;
17
85
  resourceInputs["allowSquashMerge"] = state ? state.allowSquashMerge : undefined;
86
+ resourceInputs["allowUpdateBranch"] = state ? state.allowUpdateBranch : undefined;
18
87
  resourceInputs["archiveOnDestroy"] = state ? state.archiveOnDestroy : undefined;
19
88
  resourceInputs["archived"] = state ? state.archived : undefined;
20
89
  resourceInputs["autoInit"] = state ? state.autoInit : undefined;
@@ -42,6 +111,7 @@ class Repository extends pulumi.CustomResource {
42
111
  resourceInputs["pages"] = state ? state.pages : undefined;
43
112
  resourceInputs["private"] = state ? state.private : undefined;
44
113
  resourceInputs["repoId"] = state ? state.repoId : undefined;
114
+ resourceInputs["securityAndAnalysis"] = state ? state.securityAndAnalysis : undefined;
45
115
  resourceInputs["squashMergeCommitMessage"] = state ? state.squashMergeCommitMessage : undefined;
46
116
  resourceInputs["squashMergeCommitTitle"] = state ? state.squashMergeCommitTitle : undefined;
47
117
  resourceInputs["sshCloneUrl"] = state ? state.sshCloneUrl : undefined;
@@ -57,6 +127,7 @@ class Repository extends pulumi.CustomResource {
57
127
  resourceInputs["allowMergeCommit"] = args ? args.allowMergeCommit : undefined;
58
128
  resourceInputs["allowRebaseMerge"] = args ? args.allowRebaseMerge : undefined;
59
129
  resourceInputs["allowSquashMerge"] = args ? args.allowSquashMerge : undefined;
130
+ resourceInputs["allowUpdateBranch"] = args ? args.allowUpdateBranch : undefined;
60
131
  resourceInputs["archiveOnDestroy"] = args ? args.archiveOnDestroy : undefined;
61
132
  resourceInputs["archived"] = args ? args.archived : undefined;
62
133
  resourceInputs["autoInit"] = args ? args.autoInit : undefined;
@@ -77,6 +148,7 @@ class Repository extends pulumi.CustomResource {
77
148
  resourceInputs["name"] = args ? args.name : undefined;
78
149
  resourceInputs["pages"] = args ? args.pages : undefined;
79
150
  resourceInputs["private"] = args ? args.private : undefined;
151
+ resourceInputs["securityAndAnalysis"] = args ? args.securityAndAnalysis : undefined;
80
152
  resourceInputs["squashMergeCommitMessage"] = args ? args.squashMergeCommitMessage : undefined;
81
153
  resourceInputs["squashMergeCommitTitle"] = args ? args.squashMergeCommitTitle : undefined;
82
154
  resourceInputs["template"] = args ? args.template : undefined;
@@ -96,28 +168,6 @@ class Repository extends pulumi.CustomResource {
96
168
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
97
169
  super(Repository.__pulumiType, name, resourceInputs, opts);
98
170
  }
99
- /**
100
- * Get an existing Repository resource's state with the given name, ID, and optional extra
101
- * properties used to qualify the lookup.
102
- *
103
- * @param name The _unique_ name of the resulting resource.
104
- * @param id The _unique_ provider ID of the resource to lookup.
105
- * @param state Any extra arguments used during the lookup.
106
- * @param opts Optional settings to control the behavior of the CustomResource.
107
- */
108
- static get(name, id, state, opts) {
109
- return new Repository(name, state, Object.assign(Object.assign({}, opts), { id: id }));
110
- }
111
- /**
112
- * Returns true if the given object is an instance of Repository. This is designed to work even
113
- * when multiple copies of the Pulumi SDK have been loaded into the same process.
114
- */
115
- static isInstance(obj) {
116
- if (obj === undefined || obj === null) {
117
- return false;
118
- }
119
- return obj['__pulumiType'] === Repository.__pulumiType;
120
- }
121
171
  }
122
172
  exports.Repository = Repository;
123
173
  /** @internal */