@pulumi/github 5.1.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 (254) hide show
  1. package/actionsEnvironmentSecret.d.ts +99 -0
  2. package/actionsEnvironmentSecret.js +64 -22
  3. package/actionsEnvironmentSecret.js.map +1 -1
  4. package/actionsOrganizationPermissions.d.ts +72 -0
  5. package/actionsOrganizationPermissions.js +58 -22
  6. package/actionsOrganizationPermissions.js.map +1 -1
  7. package/actionsOrganizationSecret.d.ts +110 -0
  8. package/actionsOrganizationSecret.js +72 -22
  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 +44 -22
  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 +173 -3
  35. package/branchProtection.js +83 -22
  36. package/branchProtection.js.map +1 -1
  37. package/branchProtectionV3.d.ts +138 -0
  38. package/branchProtectionV3.js +88 -22
  39. package/branchProtectionV3.js.map +1 -1
  40. package/dependabotOrganizationSecret.js +22 -22
  41. package/dependabotOrganizationSecret.js.map +1 -1
  42. package/dependabotOrganizationSecretRepositories.js +22 -22
  43. package/dependabotOrganizationSecretRepositories.js.map +1 -1
  44. package/dependabotSecret.js +22 -22
  45. package/dependabotSecret.js.map +1 -1
  46. package/emuGroupMapping.d.ts +42 -0
  47. package/emuGroupMapping.js +46 -22
  48. package/emuGroupMapping.js.map +1 -1
  49. package/getActionsOrganizationRegistrationToken.d.ts +31 -0
  50. package/getActionsOrganizationRegistrationToken.js +25 -0
  51. package/getActionsOrganizationRegistrationToken.js.map +1 -0
  52. package/getActionsOrganizationSecrets.d.ts +15 -0
  53. package/getActionsOrganizationSecrets.js +13 -4
  54. package/getActionsOrganizationSecrets.js.map +1 -1
  55. package/getActionsPublicKey.d.ts +42 -0
  56. package/getActionsPublicKey.js +32 -5
  57. package/getActionsPublicKey.js.map +1 -1
  58. package/getActionsRegistrationToken.d.ts +67 -0
  59. package/getActionsRegistrationToken.js +47 -0
  60. package/getActionsRegistrationToken.js.map +1 -0
  61. package/getActionsSecrets.d.ts +46 -0
  62. package/getActionsSecrets.js +30 -5
  63. package/getActionsSecrets.js.map +1 -1
  64. package/getBranch.d.ts +51 -0
  65. package/getBranch.js +32 -5
  66. package/getBranch.js.map +1 -1
  67. package/getCollaborators.d.ts +51 -0
  68. package/getCollaborators.js +32 -5
  69. package/getCollaborators.js.map +1 -1
  70. package/getDependabotOrganizationSecrets.d.ts +15 -0
  71. package/getDependabotOrganizationSecrets.js +13 -4
  72. package/getDependabotOrganizationSecrets.js.map +1 -1
  73. package/getDependabotPublicKey.js +2 -5
  74. package/getDependabotPublicKey.js.map +1 -1
  75. package/getDependabotSecrets.d.ts +46 -0
  76. package/getDependabotSecrets.js +30 -5
  77. package/getDependabotSecrets.js.map +1 -1
  78. package/getExternalGroups.d.ts +17 -0
  79. package/getExternalGroups.js +15 -4
  80. package/getExternalGroups.js.map +1 -1
  81. package/getGithubApp.d.ts +43 -0
  82. package/getGithubApp.js +30 -5
  83. package/getGithubApp.js.map +1 -1
  84. package/getIpRanges.d.ts +84 -0
  85. package/getIpRanges.js +13 -4
  86. package/getIpRanges.js.map +1 -1
  87. package/getMembership.d.ts +58 -0
  88. package/getMembership.js +36 -5
  89. package/getMembership.js.map +1 -1
  90. package/getOrganization.d.ts +58 -0
  91. package/getOrganization.js +30 -5
  92. package/getOrganization.js.map +1 -1
  93. package/getOrganizationIpAllowList.d.ts +18 -0
  94. package/getOrganizationIpAllowList.js +15 -4
  95. package/getOrganizationIpAllowList.js.map +1 -1
  96. package/getOrganizationTeamSyncGroups.d.ts +15 -0
  97. package/getOrganizationTeamSyncGroups.js +13 -4
  98. package/getOrganizationTeamSyncGroups.js.map +1 -1
  99. package/getOrganizationTeams.d.ts +80 -0
  100. package/getOrganizationTeams.js +52 -5
  101. package/getOrganizationTeams.js.map +1 -1
  102. package/getOrganizationWebhooks.d.ts +18 -0
  103. package/getOrganizationWebhooks.js +15 -4
  104. package/getOrganizationWebhooks.js.map +1 -1
  105. package/getRef.d.ts +48 -0
  106. package/getRef.js +32 -5
  107. package/getRef.js.map +1 -1
  108. package/getRelease.d.ts +90 -0
  109. package/getRelease.js +8 -5
  110. package/getRelease.js.map +1 -1
  111. package/getRepositories.d.ts +70 -0
  112. package/getRepositories.js +40 -5
  113. package/getRepositories.js.map +1 -1
  114. package/getRepository.d.ts +141 -0
  115. package/getRepository.js +30 -5
  116. package/getRepository.js.map +1 -1
  117. package/getRepositoryBranches.d.ts +49 -0
  118. package/getRepositoryBranches.js +30 -5
  119. package/getRepositoryBranches.js.map +1 -1
  120. package/getRepositoryDeployKeys.d.ts +37 -0
  121. package/getRepositoryDeployKeys.js +30 -5
  122. package/getRepositoryDeployKeys.js.map +1 -1
  123. package/getRepositoryFile.d.ts +72 -0
  124. package/getRepositoryFile.js +36 -5
  125. package/getRepositoryFile.js.map +1 -1
  126. package/getRepositoryMilestone.d.ts +62 -0
  127. package/getRepositoryMilestone.js +34 -5
  128. package/getRepositoryMilestone.js.map +1 -1
  129. package/getRepositoryPullRequest.d.ts +90 -0
  130. package/getRepositoryPullRequest.js +32 -5
  131. package/getRepositoryPullRequest.js.map +1 -1
  132. package/getRepositoryPullRequests.d.ts +90 -0
  133. package/getRepositoryPullRequests.js +38 -5
  134. package/getRepositoryPullRequests.js.map +1 -1
  135. package/getRepositoryTeams.d.ts +46 -0
  136. package/getRepositoryTeams.js +30 -5
  137. package/getRepositoryTeams.js.map +1 -1
  138. package/getRepositoryWebhooks.d.ts +36 -0
  139. package/getRepositoryWebhooks.js +34 -5
  140. package/getRepositoryWebhooks.js.map +1 -1
  141. package/getTeam.d.ts +79 -0
  142. package/getTeam.js +32 -5
  143. package/getTeam.js.map +1 -1
  144. package/getTree.d.ts +69 -0
  145. package/getTree.js +50 -5
  146. package/getTree.js.map +1 -1
  147. package/getUser.d.ts +102 -0
  148. package/getUser.js +38 -5
  149. package/getUser.js.map +1 -1
  150. package/getUsers.d.ts +55 -0
  151. package/getUsers.js +42 -5
  152. package/getUsers.js.map +1 -1
  153. package/index.d.ts +64 -44
  154. package/index.js +33 -3
  155. package/index.js.map +1 -1
  156. package/issue.d.ts +117 -6
  157. package/issue.js +85 -22
  158. package/issue.js.map +1 -1
  159. package/issueLabel.d.ts +64 -0
  160. package/issueLabel.js +44 -22
  161. package/issueLabel.js.map +1 -1
  162. package/membership.d.ts +49 -0
  163. package/membership.js +49 -21
  164. package/membership.js.map +1 -1
  165. package/organizationBlock.d.ts +21 -0
  166. package/organizationBlock.js +31 -19
  167. package/organizationBlock.js.map +1 -1
  168. package/organizationProject.d.ts +36 -0
  169. package/organizationProject.js +32 -20
  170. package/organizationProject.js.map +1 -1
  171. package/organizationSecurityManager.d.ts +67 -0
  172. package/organizationSecurityManager.js +71 -0
  173. package/organizationSecurityManager.js.map +1 -0
  174. package/organizationSettings.d.ts +274 -3
  175. package/organizationSettings.js +68 -22
  176. package/organizationSettings.js.map +1 -1
  177. package/organizationWebhook.d.ts +63 -0
  178. package/organizationWebhook.js +52 -22
  179. package/organizationWebhook.js.map +1 -1
  180. package/package.json +2 -2
  181. package/package.json.dev +2 -2
  182. package/projectCard.d.ts +87 -0
  183. package/projectCard.js +73 -22
  184. package/projectCard.js.map +1 -1
  185. package/projectColumn.d.ts +31 -0
  186. package/projectColumn.js +35 -22
  187. package/projectColumn.js.map +1 -1
  188. package/provider.js +10 -10
  189. package/provider.js.map +1 -1
  190. package/release.d.ts +194 -0
  191. package/release.js +121 -0
  192. package/release.js.map +1 -0
  193. package/repository.d.ts +391 -3
  194. package/repository.js +70 -22
  195. package/repository.js.map +1 -1
  196. package/repositoryAutolinkReference.d.ts +45 -12
  197. package/repositoryAutolinkReference.js +52 -22
  198. package/repositoryAutolinkReference.js.map +1 -1
  199. package/repositoryCollaborator.d.ts +90 -0
  200. package/repositoryCollaborator.js +64 -22
  201. package/repositoryCollaborator.js.map +1 -1
  202. package/repositoryDeployKey.d.ts +71 -0
  203. package/repositoryDeployKey.js +57 -22
  204. package/repositoryDeployKey.js.map +1 -1
  205. package/repositoryEnvironment.d.ts +61 -0
  206. package/repositoryEnvironment.js +56 -22
  207. package/repositoryEnvironment.js.map +1 -1
  208. package/repositoryFile.d.ts +68 -34
  209. package/repositoryFile.js +59 -22
  210. package/repositoryFile.js.map +1 -1
  211. package/repositoryMilestone.d.ts +81 -3
  212. package/repositoryMilestone.js +49 -22
  213. package/repositoryMilestone.js.map +1 -1
  214. package/repositoryProject.d.ts +52 -0
  215. package/repositoryProject.js +41 -22
  216. package/repositoryProject.js.map +1 -1
  217. package/repositoryPullRequest.d.ts +127 -4
  218. package/repositoryPullRequest.js +40 -22
  219. package/repositoryPullRequest.js.map +1 -1
  220. package/repositoryTagProtection.d.ts +41 -0
  221. package/repositoryTagProtection.js +45 -22
  222. package/repositoryTagProtection.js.map +1 -1
  223. package/repositoryWebhook.d.ts +79 -0
  224. package/repositoryWebhook.js +59 -22
  225. package/repositoryWebhook.js.map +1 -1
  226. package/team.d.ts +100 -0
  227. package/team.js +49 -22
  228. package/team.js.map +1 -1
  229. package/teamMembers.d.ts +58 -0
  230. package/teamMembers.js +62 -22
  231. package/teamMembers.js.map +1 -1
  232. package/teamMembership.d.ts +67 -0
  233. package/teamMembership.js +59 -22
  234. package/teamMembership.js.map +1 -1
  235. package/teamRepository.d.ts +59 -3
  236. package/teamRepository.js +57 -22
  237. package/teamRepository.js.map +1 -1
  238. package/teamSettings.d.ts +119 -0
  239. package/teamSettings.js +99 -0
  240. package/teamSettings.js.map +1 -0
  241. package/teamSyncGroupMapping.d.ts +36 -0
  242. package/teamSyncGroupMapping.js +36 -21
  243. package/teamSyncGroupMapping.js.map +1 -1
  244. package/types/input.d.ts +206 -0
  245. package/types/output.d.ts +498 -0
  246. package/userGpgKey.d.ts +39 -0
  247. package/userGpgKey.js +42 -21
  248. package/userGpgKey.js.map +1 -1
  249. package/userInvitationAccepter.d.ts +30 -0
  250. package/userInvitationAccepter.js +38 -17
  251. package/userInvitationAccepter.js.map +1 -1
  252. package/userSshKey.d.ts +50 -0
  253. package/userSshKey.js +48 -22
  254. package/userSshKey.js.map +1 -1
@@ -5,11 +5,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getRepositoryPullRequestsOutput = exports.getRepositoryPullRequests = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * Use this data source to retrieve information about multiple GitHub Pull Requests in a repository.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as github from "@pulumi/github";
16
+ *
17
+ * const example = github.getRepositoryPullRequests({
18
+ * baseRef: "main",
19
+ * baseRepository: "example-repository",
20
+ * sortBy: "updated",
21
+ * sortDirection: "desc",
22
+ * state: "open",
23
+ * });
24
+ * ```
25
+ */
8
26
  function getRepositoryPullRequests(args, opts) {
9
- if (!opts) {
10
- opts = {};
11
- }
12
- opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
27
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
13
28
  return pulumi.runtime.invoke("github:index/getRepositoryPullRequests:getRepositoryPullRequests", {
14
29
  "baseRef": args.baseRef,
15
30
  "baseRepository": args.baseRepository,
@@ -21,8 +36,26 @@ function getRepositoryPullRequests(args, opts) {
21
36
  }, opts);
22
37
  }
23
38
  exports.getRepositoryPullRequests = getRepositoryPullRequests;
39
+ /**
40
+ * Use this data source to retrieve information about multiple GitHub Pull Requests in a repository.
41
+ *
42
+ * ## Example Usage
43
+ *
44
+ * ```typescript
45
+ * import * as pulumi from "@pulumi/pulumi";
46
+ * import * as github from "@pulumi/github";
47
+ *
48
+ * const example = github.getRepositoryPullRequests({
49
+ * baseRef: "main",
50
+ * baseRepository: "example-repository",
51
+ * sortBy: "updated",
52
+ * sortDirection: "desc",
53
+ * state: "open",
54
+ * });
55
+ * ```
56
+ */
24
57
  function getRepositoryPullRequestsOutput(args, opts) {
25
- return pulumi.output(args).apply(a => getRepositoryPullRequests(a, opts));
58
+ return pulumi.output(args).apply((a) => getRepositoryPullRequests(a, opts));
26
59
  }
27
60
  exports.getRepositoryPullRequestsOutput = getRepositoryPullRequestsOutput;
28
61
  //# sourceMappingURL=getRepositoryPullRequests.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRepositoryPullRequests.js","sourceRoot":"","sources":["../getRepositoryPullRequests.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC,SAAgB,yBAAyB,CAAC,IAAmC,EAAE,IAA2B;IACtG,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,kEAAkE,EAAE;QAC7F,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,gBAAgB,EAAE,IAAI,CAAC,cAAc;QACrC,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,OAAO,EAAE,IAAI,CAAC,KAAK;QACnB,QAAQ,EAAE,IAAI,CAAC,MAAM;QACrB,eAAe,EAAE,IAAI,CAAC,aAAa;QACnC,OAAO,EAAE,IAAI,CAAC,KAAK;KACtB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAfD,8DAeC;AAiCD,SAAgB,+BAA+B,CAAC,IAAyC,EAAE,IAA2B;IAClH,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,yBAAyB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAC7E,CAAC;AAFD,0EAEC"}
1
+ {"version":3,"file":"getRepositoryPullRequests.js","sourceRoot":"","sources":["../getRepositoryPullRequests.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,yBAAyB,CAAC,IAAmC,EAAE,IAA2B;IAEtG,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,kEAAkE,EAAE;QAC7F,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,gBAAgB,EAAE,IAAI,CAAC,cAAc;QACrC,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,OAAO,EAAE,IAAI,CAAC,KAAK;QACnB,QAAQ,EAAE,IAAI,CAAC,MAAM;QACrB,eAAe,EAAE,IAAI,CAAC,aAAa;QACnC,OAAO,EAAE,IAAI,CAAC,KAAK;KACtB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAZD,8DAYC;AAiED;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,+BAA+B,CAAC,IAAyC,EAAE,IAA2B;IAClH,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,yBAAyB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AACpF,CAAC;AAFD,0EAEC"}
@@ -1,11 +1,31 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import * as outputs from "./types/output";
3
+ /**
4
+ * Use this data source to retrieve the list of teams which have access to a GitHub repository.
5
+ *
6
+ * ## Example Usage
7
+ *
8
+ * ```typescript
9
+ * import * as pulumi from "@pulumi/pulumi";
10
+ * import * as github from "@pulumi/github";
11
+ *
12
+ * const example = github.getRepositoryTeams({
13
+ * name: "example",
14
+ * });
15
+ * ```
16
+ */
3
17
  export declare function getRepositoryTeams(args?: GetRepositoryTeamsArgs, opts?: pulumi.InvokeOptions): Promise<GetRepositoryTeamsResult>;
4
18
  /**
5
19
  * A collection of arguments for invoking getRepositoryTeams.
6
20
  */
7
21
  export interface GetRepositoryTeamsArgs {
22
+ /**
23
+ * Full name of the repository (in `org/name` format).
24
+ */
8
25
  fullName?: string;
26
+ /**
27
+ * The name of the repository.
28
+ */
9
29
  name?: string;
10
30
  }
11
31
  /**
@@ -17,14 +37,40 @@ export interface GetRepositoryTeamsResult {
17
37
  * The provider-assigned unique ID for this managed resource.
18
38
  */
19
39
  readonly id: string;
40
+ /**
41
+ * Team name
42
+ */
20
43
  readonly name: string;
44
+ /**
45
+ * List of teams which have access to the repository
46
+ */
21
47
  readonly teams: outputs.GetRepositoryTeamsTeam[];
22
48
  }
49
+ /**
50
+ * Use this data source to retrieve the list of teams which have access to a GitHub repository.
51
+ *
52
+ * ## Example Usage
53
+ *
54
+ * ```typescript
55
+ * import * as pulumi from "@pulumi/pulumi";
56
+ * import * as github from "@pulumi/github";
57
+ *
58
+ * const example = github.getRepositoryTeams({
59
+ * name: "example",
60
+ * });
61
+ * ```
62
+ */
23
63
  export declare function getRepositoryTeamsOutput(args?: GetRepositoryTeamsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetRepositoryTeamsResult>;
24
64
  /**
25
65
  * A collection of arguments for invoking getRepositoryTeams.
26
66
  */
27
67
  export interface GetRepositoryTeamsOutputArgs {
68
+ /**
69
+ * Full name of the repository (in `org/name` format).
70
+ */
28
71
  fullName?: pulumi.Input<string>;
72
+ /**
73
+ * The name of the repository.
74
+ */
29
75
  name?: pulumi.Input<string>;
30
76
  }
@@ -5,20 +5,45 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getRepositoryTeamsOutput = exports.getRepositoryTeams = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * Use this data source to retrieve the list of teams which have access to a GitHub repository.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as github from "@pulumi/github";
16
+ *
17
+ * const example = github.getRepositoryTeams({
18
+ * name: "example",
19
+ * });
20
+ * ```
21
+ */
8
22
  function getRepositoryTeams(args, opts) {
9
23
  args = args || {};
10
- if (!opts) {
11
- opts = {};
12
- }
13
- opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
24
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
14
25
  return pulumi.runtime.invoke("github:index/getRepositoryTeams:getRepositoryTeams", {
15
26
  "fullName": args.fullName,
16
27
  "name": args.name,
17
28
  }, opts);
18
29
  }
19
30
  exports.getRepositoryTeams = getRepositoryTeams;
31
+ /**
32
+ * Use this data source to retrieve the list of teams which have access to a GitHub repository.
33
+ *
34
+ * ## Example Usage
35
+ *
36
+ * ```typescript
37
+ * import * as pulumi from "@pulumi/pulumi";
38
+ * import * as github from "@pulumi/github";
39
+ *
40
+ * const example = github.getRepositoryTeams({
41
+ * name: "example",
42
+ * });
43
+ * ```
44
+ */
20
45
  function getRepositoryTeamsOutput(args, opts) {
21
- return pulumi.output(args).apply(a => getRepositoryTeams(a, opts));
46
+ return pulumi.output(args).apply((a) => getRepositoryTeams(a, opts));
22
47
  }
23
48
  exports.getRepositoryTeamsOutput = getRepositoryTeamsOutput;
24
49
  //# sourceMappingURL=getRepositoryTeams.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRepositoryTeams.js","sourceRoot":"","sources":["../getRepositoryTeams.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC,SAAgB,kBAAkB,CAAC,IAA6B,EAAE,IAA2B;IACzF,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,oDAAoD,EAAE;QAC/E,UAAU,EAAE,IAAI,CAAC,QAAQ;QACzB,MAAM,EAAE,IAAI,CAAC,IAAI;KACpB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAXD,gDAWC;AAuBD,SAAgB,wBAAwB,CAAC,IAAmC,EAAE,IAA2B;IACrG,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AACtE,CAAC;AAFD,4DAEC"}
1
+ {"version":3,"file":"getRepositoryTeams.js","sourceRoot":"","sources":["../getRepositoryTeams.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;GAaG;AACH,SAAgB,kBAAkB,CAAC,IAA6B,EAAE,IAA2B;IACzF,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAElB,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,oDAAoD,EAAE;QAC/E,UAAU,EAAE,IAAI,CAAC,QAAQ;QACzB,MAAM,EAAE,IAAI,CAAC,IAAI;KACpB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AARD,gDAQC;AAkCD;;;;;;;;;;;;;GAaG;AACH,SAAgB,wBAAwB,CAAC,IAAmC,EAAE,IAA2B;IACrG,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAC7E,CAAC;AAFD,4DAEC"}
@@ -1,5 +1,21 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import * as outputs from "./types/output";
3
+ /**
4
+ * Use this data source to retrieve webhooks for a given repository.
5
+ *
6
+ * ## Example Usage
7
+ *
8
+ * To retrieve webhooks of a repository:
9
+ *
10
+ * ```typescript
11
+ * import * as pulumi from "@pulumi/pulumi";
12
+ * import * as github from "@pulumi/github";
13
+ *
14
+ * const repo = github.getRepositoryWebhooks({
15
+ * repository: "foo",
16
+ * });
17
+ * ```
18
+ */
3
19
  export declare function getRepositoryWebhooks(args: GetRepositoryWebhooksArgs, opts?: pulumi.InvokeOptions): Promise<GetRepositoryWebhooksResult>;
4
20
  /**
5
21
  * A collection of arguments for invoking getRepositoryWebhooks.
@@ -16,8 +32,28 @@ export interface GetRepositoryWebhooksResult {
16
32
  */
17
33
  readonly id: string;
18
34
  readonly repository: string;
35
+ /**
36
+ * An Array of GitHub Webhooks. Each `webhook` block consists of the fields documented below.
37
+ * ___
38
+ */
19
39
  readonly webhooks: outputs.GetRepositoryWebhooksWebhook[];
20
40
  }
41
+ /**
42
+ * Use this data source to retrieve webhooks for a given repository.
43
+ *
44
+ * ## Example Usage
45
+ *
46
+ * To retrieve webhooks of a repository:
47
+ *
48
+ * ```typescript
49
+ * import * as pulumi from "@pulumi/pulumi";
50
+ * import * as github from "@pulumi/github";
51
+ *
52
+ * const repo = github.getRepositoryWebhooks({
53
+ * repository: "foo",
54
+ * });
55
+ * ```
56
+ */
21
57
  export declare function getRepositoryWebhooksOutput(args: GetRepositoryWebhooksOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetRepositoryWebhooksResult>;
22
58
  /**
23
59
  * A collection of arguments for invoking getRepositoryWebhooks.
@@ -5,18 +5,47 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getRepositoryWebhooksOutput = exports.getRepositoryWebhooks = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * Use this data source to retrieve webhooks for a given repository.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * To retrieve webhooks of a repository:
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as github from "@pulumi/github";
18
+ *
19
+ * const repo = github.getRepositoryWebhooks({
20
+ * repository: "foo",
21
+ * });
22
+ * ```
23
+ */
8
24
  function getRepositoryWebhooks(args, opts) {
9
- if (!opts) {
10
- opts = {};
11
- }
12
- opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
25
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
13
26
  return pulumi.runtime.invoke("github:index/getRepositoryWebhooks:getRepositoryWebhooks", {
14
27
  "repository": args.repository,
15
28
  }, opts);
16
29
  }
17
30
  exports.getRepositoryWebhooks = getRepositoryWebhooks;
31
+ /**
32
+ * Use this data source to retrieve webhooks for a given repository.
33
+ *
34
+ * ## Example Usage
35
+ *
36
+ * To retrieve webhooks of a repository:
37
+ *
38
+ * ```typescript
39
+ * import * as pulumi from "@pulumi/pulumi";
40
+ * import * as github from "@pulumi/github";
41
+ *
42
+ * const repo = github.getRepositoryWebhooks({
43
+ * repository: "foo",
44
+ * });
45
+ * ```
46
+ */
18
47
  function getRepositoryWebhooksOutput(args, opts) {
19
- return pulumi.output(args).apply(a => getRepositoryWebhooks(a, opts));
48
+ return pulumi.output(args).apply((a) => getRepositoryWebhooks(a, opts));
20
49
  }
21
50
  exports.getRepositoryWebhooksOutput = getRepositoryWebhooksOutput;
22
51
  //# sourceMappingURL=getRepositoryWebhooks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRepositoryWebhooks.js","sourceRoot":"","sources":["../getRepositoryWebhooks.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC,SAAgB,qBAAqB,CAAC,IAA+B,EAAE,IAA2B;IAC9F,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,0DAA0D,EAAE;QACrF,YAAY,EAAE,IAAI,CAAC,UAAU;KAChC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AATD,sDASC;AAqBD,SAAgB,2BAA2B,CAAC,IAAqC,EAAE,IAA2B;IAC1G,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AACzE,CAAC;AAFD,kEAEC"}
1
+ {"version":3,"file":"getRepositoryWebhooks.js","sourceRoot":"","sources":["../getRepositoryWebhooks.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,qBAAqB,CAAC,IAA+B,EAAE,IAA2B;IAE9F,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,0DAA0D,EAAE;QACrF,YAAY,EAAE,IAAI,CAAC,UAAU;KAChC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAND,sDAMC;AAwBD;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,2BAA2B,CAAC,IAAqC,EAAE,IAA2B;IAC1G,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAChF,CAAC;AAFD,kEAEC"}
package/getTeam.d.ts CHANGED
@@ -1,35 +1,114 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * Use this data source to retrieve information about a GitHub team.
4
+ *
5
+ * ## Example Usage
6
+ *
7
+ * ```typescript
8
+ * import * as pulumi from "@pulumi/pulumi";
9
+ * import * as github from "@pulumi/github";
10
+ *
11
+ * const example = github.getTeam({
12
+ * slug: "example",
13
+ * });
14
+ * ```
15
+ */
2
16
  export declare function getTeam(args: GetTeamArgs, opts?: pulumi.InvokeOptions): Promise<GetTeamResult>;
3
17
  /**
4
18
  * A collection of arguments for invoking getTeam.
5
19
  */
6
20
  export interface GetTeamArgs {
21
+ /**
22
+ * Type of membershp to be requested to fill the list of members. Can be either "all" or "immediate". Default: "all"
23
+ */
7
24
  membershipType?: string;
25
+ /**
26
+ * Set the number of results per graphql query. Reducing this number can alleviate timeout errors. Accepts a value between 0 - 100. Defaults to `100`.
27
+ */
28
+ resultsPerPage?: number;
29
+ /**
30
+ * The team slug.
31
+ */
8
32
  slug: string;
33
+ /**
34
+ * Exclude the members and repositories of the team from the returned result. Defaults to `false`.
35
+ */
36
+ summaryOnly?: boolean;
9
37
  }
10
38
  /**
11
39
  * A collection of values returned by getTeam.
12
40
  */
13
41
  export interface GetTeamResult {
42
+ /**
43
+ * the team's description.
44
+ */
14
45
  readonly description: string;
15
46
  /**
16
47
  * The provider-assigned unique ID for this managed resource.
17
48
  */
18
49
  readonly id: string;
50
+ /**
51
+ * List of team members (list of GitHub usernames). Not returned if `summaryOnly = true`
52
+ */
19
53
  readonly members: string[];
20
54
  readonly membershipType?: string;
55
+ /**
56
+ * the team's full name.
57
+ */
21
58
  readonly name: string;
59
+ /**
60
+ * the Node ID of the team.
61
+ */
22
62
  readonly nodeId: string;
63
+ /**
64
+ * the team's permission level.
65
+ */
23
66
  readonly permission: string;
67
+ /**
68
+ * the team's privacy type.
69
+ */
24
70
  readonly privacy: string;
71
+ /**
72
+ * List of team repositories (list of repo names). Not returned if `summaryOnly = true`
73
+ */
25
74
  readonly repositories: string[];
75
+ readonly resultsPerPage?: number;
26
76
  readonly slug: string;
77
+ readonly summaryOnly?: boolean;
27
78
  }
79
+ /**
80
+ * Use this data source to retrieve information about a GitHub team.
81
+ *
82
+ * ## Example Usage
83
+ *
84
+ * ```typescript
85
+ * import * as pulumi from "@pulumi/pulumi";
86
+ * import * as github from "@pulumi/github";
87
+ *
88
+ * const example = github.getTeam({
89
+ * slug: "example",
90
+ * });
91
+ * ```
92
+ */
28
93
  export declare function getTeamOutput(args: GetTeamOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetTeamResult>;
29
94
  /**
30
95
  * A collection of arguments for invoking getTeam.
31
96
  */
32
97
  export interface GetTeamOutputArgs {
98
+ /**
99
+ * Type of membershp to be requested to fill the list of members. Can be either "all" or "immediate". Default: "all"
100
+ */
33
101
  membershipType?: pulumi.Input<string>;
102
+ /**
103
+ * Set the number of results per graphql query. Reducing this number can alleviate timeout errors. Accepts a value between 0 - 100. Defaults to `100`.
104
+ */
105
+ resultsPerPage?: pulumi.Input<number>;
106
+ /**
107
+ * The team slug.
108
+ */
34
109
  slug: pulumi.Input<string>;
110
+ /**
111
+ * Exclude the members and repositories of the team from the returned result. Defaults to `false`.
112
+ */
113
+ summaryOnly?: pulumi.Input<boolean>;
35
114
  }
package/getTeam.js CHANGED
@@ -5,19 +5,46 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getTeamOutput = exports.getTeam = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * Use this data source to retrieve information about a GitHub team.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as github from "@pulumi/github";
16
+ *
17
+ * const example = github.getTeam({
18
+ * slug: "example",
19
+ * });
20
+ * ```
21
+ */
8
22
  function getTeam(args, opts) {
9
- if (!opts) {
10
- opts = {};
11
- }
12
- opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
23
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
13
24
  return pulumi.runtime.invoke("github:index/getTeam:getTeam", {
14
25
  "membershipType": args.membershipType,
26
+ "resultsPerPage": args.resultsPerPage,
15
27
  "slug": args.slug,
28
+ "summaryOnly": args.summaryOnly,
16
29
  }, opts);
17
30
  }
18
31
  exports.getTeam = getTeam;
32
+ /**
33
+ * Use this data source to retrieve information about a GitHub team.
34
+ *
35
+ * ## Example Usage
36
+ *
37
+ * ```typescript
38
+ * import * as pulumi from "@pulumi/pulumi";
39
+ * import * as github from "@pulumi/github";
40
+ *
41
+ * const example = github.getTeam({
42
+ * slug: "example",
43
+ * });
44
+ * ```
45
+ */
19
46
  function getTeamOutput(args, opts) {
20
- return pulumi.output(args).apply(a => getTeam(a, opts));
47
+ return pulumi.output(args).apply((a) => getTeam(a, opts));
21
48
  }
22
49
  exports.getTeamOutput = getTeamOutput;
23
50
  //# sourceMappingURL=getTeam.js.map
package/getTeam.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"getTeam.js","sourceRoot":"","sources":["../getTeam.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,SAAgB,OAAO,CAAC,IAAiB,EAAE,IAA2B;IAClE,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,8BAA8B,EAAE;QACzD,gBAAgB,EAAE,IAAI,CAAC,cAAc;QACrC,MAAM,EAAE,IAAI,CAAC,IAAI;KACpB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAVD,0BAUC;AA6BD,SAAgB,aAAa,CAAC,IAAuB,EAAE,IAA2B;IAC9E,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAC3D,CAAC;AAFD,sCAEC"}
1
+ {"version":3,"file":"getTeam.js","sourceRoot":"","sources":["../getTeam.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;GAaG;AACH,SAAgB,OAAO,CAAC,IAAiB,EAAE,IAA2B;IAElE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,8BAA8B,EAAE;QACzD,gBAAgB,EAAE,IAAI,CAAC,cAAc;QACrC,gBAAgB,EAAE,IAAI,CAAC,cAAc;QACrC,MAAM,EAAE,IAAI,CAAC,IAAI;QACjB,aAAa,EAAE,IAAI,CAAC,WAAW;KAClC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AATD,0BASC;AAiED;;;;;;;;;;;;;GAaG;AACH,SAAgB,aAAa,CAAC,IAAuB,EAAE,IAA2B;IAC9E,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAClE,CAAC;AAFD,sCAEC"}
package/getTree.d.ts CHANGED
@@ -1,18 +1,54 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import * as outputs from "./types/output";
3
+ /**
4
+ * Use this data source to retrieve information about a single tree.
5
+ *
6
+ * ## Example Usage
7
+ *
8
+ * ```typescript
9
+ * import * as pulumi from "@pulumi/pulumi";
10
+ * import * as github from "@pulumi/github";
11
+ *
12
+ * const thisRepository = github.getRepository({
13
+ * name: "example",
14
+ * });
15
+ * const thisBranch = Promise.all([thisRepository, thisRepository]).then(([thisRepository, thisRepository1]) => github.getBranch({
16
+ * branch: thisRepository.defaultBranch,
17
+ * repository: thisRepository1.name,
18
+ * }));
19
+ * const thisTree = Promise.all([thisRepository, thisBranch]).then(([thisRepository, thisBranch]) => github.getTree({
20
+ * recursive: false,
21
+ * repository: thisRepository.name,
22
+ * treeSha: thisBranch.sha,
23
+ * }));
24
+ * export const entries = thisTree.then(thisTree => thisTree.entries);
25
+ * ```
26
+ */
3
27
  export declare function getTree(args: GetTreeArgs, opts?: pulumi.InvokeOptions): Promise<GetTreeResult>;
4
28
  /**
5
29
  * A collection of arguments for invoking getTree.
6
30
  */
7
31
  export interface GetTreeArgs {
32
+ /**
33
+ * Setting this parameter to `true` returns the objects or subtrees referenced by the tree specified in `treeSha`.
34
+ */
8
35
  recursive?: boolean;
36
+ /**
37
+ * The name of the repository.
38
+ */
9
39
  repository: string;
40
+ /**
41
+ * The SHA1 value for the tree.
42
+ */
10
43
  treeSha: string;
11
44
  }
12
45
  /**
13
46
  * A collection of values returned by getTree.
14
47
  */
15
48
  export interface GetTreeResult {
49
+ /**
50
+ * Objects (of `path`, `mode`, `type`, `size`, and `sha`) specifying a tree structure.
51
+ */
16
52
  readonly entries: outputs.GetTreeEntry[];
17
53
  /**
18
54
  * The provider-assigned unique ID for this managed resource.
@@ -22,12 +58,45 @@ export interface GetTreeResult {
22
58
  readonly repository: string;
23
59
  readonly treeSha: string;
24
60
  }
61
+ /**
62
+ * Use this data source to retrieve information about a single tree.
63
+ *
64
+ * ## Example Usage
65
+ *
66
+ * ```typescript
67
+ * import * as pulumi from "@pulumi/pulumi";
68
+ * import * as github from "@pulumi/github";
69
+ *
70
+ * const thisRepository = github.getRepository({
71
+ * name: "example",
72
+ * });
73
+ * const thisBranch = Promise.all([thisRepository, thisRepository]).then(([thisRepository, thisRepository1]) => github.getBranch({
74
+ * branch: thisRepository.defaultBranch,
75
+ * repository: thisRepository1.name,
76
+ * }));
77
+ * const thisTree = Promise.all([thisRepository, thisBranch]).then(([thisRepository, thisBranch]) => github.getTree({
78
+ * recursive: false,
79
+ * repository: thisRepository.name,
80
+ * treeSha: thisBranch.sha,
81
+ * }));
82
+ * export const entries = thisTree.then(thisTree => thisTree.entries);
83
+ * ```
84
+ */
25
85
  export declare function getTreeOutput(args: GetTreeOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetTreeResult>;
26
86
  /**
27
87
  * A collection of arguments for invoking getTree.
28
88
  */
29
89
  export interface GetTreeOutputArgs {
90
+ /**
91
+ * Setting this parameter to `true` returns the objects or subtrees referenced by the tree specified in `treeSha`.
92
+ */
30
93
  recursive?: pulumi.Input<boolean>;
94
+ /**
95
+ * The name of the repository.
96
+ */
31
97
  repository: pulumi.Input<string>;
98
+ /**
99
+ * The SHA1 value for the tree.
100
+ */
32
101
  treeSha: pulumi.Input<string>;
33
102
  }
package/getTree.js CHANGED
@@ -5,11 +5,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getTreeOutput = exports.getTree = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * Use this data source to retrieve information about a single tree.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as github from "@pulumi/github";
16
+ *
17
+ * const thisRepository = github.getRepository({
18
+ * name: "example",
19
+ * });
20
+ * const thisBranch = Promise.all([thisRepository, thisRepository]).then(([thisRepository, thisRepository1]) => github.getBranch({
21
+ * branch: thisRepository.defaultBranch,
22
+ * repository: thisRepository1.name,
23
+ * }));
24
+ * const thisTree = Promise.all([thisRepository, thisBranch]).then(([thisRepository, thisBranch]) => github.getTree({
25
+ * recursive: false,
26
+ * repository: thisRepository.name,
27
+ * treeSha: thisBranch.sha,
28
+ * }));
29
+ * export const entries = thisTree.then(thisTree => thisTree.entries);
30
+ * ```
31
+ */
8
32
  function getTree(args, opts) {
9
- if (!opts) {
10
- opts = {};
11
- }
12
- opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
33
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
13
34
  return pulumi.runtime.invoke("github:index/getTree:getTree", {
14
35
  "recursive": args.recursive,
15
36
  "repository": args.repository,
@@ -17,8 +38,32 @@ function getTree(args, opts) {
17
38
  }, opts);
18
39
  }
19
40
  exports.getTree = getTree;
41
+ /**
42
+ * Use this data source to retrieve information about a single tree.
43
+ *
44
+ * ## Example Usage
45
+ *
46
+ * ```typescript
47
+ * import * as pulumi from "@pulumi/pulumi";
48
+ * import * as github from "@pulumi/github";
49
+ *
50
+ * const thisRepository = github.getRepository({
51
+ * name: "example",
52
+ * });
53
+ * const thisBranch = Promise.all([thisRepository, thisRepository]).then(([thisRepository, thisRepository1]) => github.getBranch({
54
+ * branch: thisRepository.defaultBranch,
55
+ * repository: thisRepository1.name,
56
+ * }));
57
+ * const thisTree = Promise.all([thisRepository, thisBranch]).then(([thisRepository, thisBranch]) => github.getTree({
58
+ * recursive: false,
59
+ * repository: thisRepository.name,
60
+ * treeSha: thisBranch.sha,
61
+ * }));
62
+ * export const entries = thisTree.then(thisTree => thisTree.entries);
63
+ * ```
64
+ */
20
65
  function getTreeOutput(args, opts) {
21
- return pulumi.output(args).apply(a => getTree(a, opts));
66
+ return pulumi.output(args).apply((a) => getTree(a, opts));
22
67
  }
23
68
  exports.getTreeOutput = getTreeOutput;
24
69
  //# sourceMappingURL=getTree.js.map
package/getTree.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"getTree.js","sourceRoot":"","sources":["../getTree.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC,SAAgB,OAAO,CAAC,IAAiB,EAAE,IAA2B;IAClE,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,8BAA8B,EAAE;QACzD,WAAW,EAAE,IAAI,CAAC,SAAS;QAC3B,YAAY,EAAE,IAAI,CAAC,UAAU;QAC7B,SAAS,EAAE,IAAI,CAAC,OAAO;KAC1B,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAXD,0BAWC;AAyBD,SAAgB,aAAa,CAAC,IAAuB,EAAE,IAA2B;IAC9E,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAC3D,CAAC;AAFD,sCAEC"}
1
+ {"version":3,"file":"getTree.js","sourceRoot":"","sources":["../getTree.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,OAAO,CAAC,IAAiB,EAAE,IAA2B;IAElE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,8BAA8B,EAAE;QACzD,WAAW,EAAE,IAAI,CAAC,SAAS;QAC3B,YAAY,EAAE,IAAI,CAAC,UAAU;QAC7B,SAAS,EAAE,IAAI,CAAC,OAAO;KAC1B,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AARD,0BAQC;AAoCD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,aAAa,CAAC,IAAuB,EAAE,IAA2B;IAC9E,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAClE,CAAC;AAFD,sCAEC"}