@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.
- package/actionsEnvironmentSecret.d.ts +99 -0
- package/actionsEnvironmentSecret.js +68 -24
- package/actionsEnvironmentSecret.js.map +1 -1
- package/actionsOrganizationPermissions.d.ts +74 -1
- package/actionsOrganizationPermissions.js +58 -22
- package/actionsOrganizationPermissions.js.map +1 -1
- package/actionsOrganizationSecret.d.ts +110 -0
- package/actionsOrganizationSecret.js +76 -24
- package/actionsOrganizationSecret.js.map +1 -1
- package/actionsOrganizationSecretRepositories.d.ts +47 -0
- package/actionsOrganizationSecretRepositories.js +51 -22
- package/actionsOrganizationSecretRepositories.js.map +1 -1
- package/actionsRepositoryPermissions.d.ts +119 -0
- package/actionsRepositoryPermissions.js +91 -0
- package/actionsRepositoryPermissions.js.map +1 -0
- package/actionsRunnerGroup.d.ts +88 -0
- package/actionsRunnerGroup.js +47 -22
- package/actionsRunnerGroup.js.map +1 -1
- package/actionsSecret.d.ts +70 -0
- package/actionsSecret.js +48 -24
- package/actionsSecret.js.map +1 -1
- package/appInstallationRepositories.d.ts +81 -0
- package/appInstallationRepositories.js +78 -0
- package/appInstallationRepositories.js.map +1 -0
- package/appInstallationRepository.d.ts +53 -0
- package/appInstallationRepository.js +57 -22
- package/appInstallationRepository.js.map +1 -1
- package/branch.d.ts +92 -0
- package/branch.js +60 -22
- package/branch.js.map +1 -1
- package/branchDefault.d.ts +53 -0
- package/branchDefault.js +57 -22
- package/branchDefault.js.map +1 -1
- package/branchProtection.d.ts +175 -4
- package/branchProtection.js +83 -22
- package/branchProtection.js.map +1 -1
- package/branchProtectionV3.d.ts +140 -1
- package/branchProtectionV3.js +88 -22
- package/branchProtectionV3.js.map +1 -1
- package/config/vars.d.ts +1 -1
- package/config/vars.js.map +1 -1
- package/dependabotOrganizationSecret.js +26 -24
- package/dependabotOrganizationSecret.js.map +1 -1
- package/dependabotOrganizationSecretRepositories.js +22 -22
- package/dependabotOrganizationSecretRepositories.js.map +1 -1
- package/dependabotSecret.js +26 -24
- package/dependabotSecret.js.map +1 -1
- package/emuGroupMapping.d.ts +42 -0
- package/emuGroupMapping.js +46 -22
- package/emuGroupMapping.js.map +1 -1
- package/getActionsOrganizationRegistrationToken.d.ts +31 -0
- package/getActionsOrganizationRegistrationToken.js +25 -0
- package/getActionsOrganizationRegistrationToken.js.map +1 -0
- package/getActionsOrganizationSecrets.d.ts +16 -1
- package/getActionsOrganizationSecrets.js +13 -4
- package/getActionsOrganizationSecrets.js.map +1 -1
- package/getActionsPublicKey.d.ts +42 -0
- package/getActionsPublicKey.js +32 -5
- package/getActionsPublicKey.js.map +1 -1
- package/getActionsRegistrationToken.d.ts +67 -0
- package/getActionsRegistrationToken.js +47 -0
- package/getActionsRegistrationToken.js.map +1 -0
- package/getActionsSecrets.d.ts +47 -1
- package/getActionsSecrets.js +30 -5
- package/getActionsSecrets.js.map +1 -1
- package/getBranch.d.ts +51 -0
- package/getBranch.js +32 -5
- package/getBranch.js.map +1 -1
- package/getCollaborators.d.ts +52 -1
- package/getCollaborators.js +32 -5
- package/getCollaborators.js.map +1 -1
- package/getDependabotOrganizationSecrets.d.ts +28 -0
- package/getDependabotOrganizationSecrets.js +25 -0
- package/getDependabotOrganizationSecrets.js.map +1 -0
- package/getDependabotPublicKey.js +2 -5
- package/getDependabotPublicKey.js.map +1 -1
- package/getDependabotSecrets.d.ts +76 -0
- package/getDependabotSecrets.js +49 -0
- package/getDependabotSecrets.js.map +1 -0
- package/getExternalGroups.d.ts +18 -1
- package/getExternalGroups.js +15 -4
- package/getExternalGroups.js.map +1 -1
- package/getGithubApp.d.ts +71 -0
- package/getGithubApp.js +47 -0
- package/getGithubApp.js.map +1 -0
- package/getIpRanges.d.ts +84 -0
- package/getIpRanges.js +13 -4
- package/getIpRanges.js.map +1 -1
- package/getMembership.d.ts +59 -0
- package/getMembership.js +36 -5
- package/getMembership.js.map +1 -1
- package/getOrganization.d.ts +58 -0
- package/getOrganization.js +30 -5
- package/getOrganization.js.map +1 -1
- package/getOrganizationIpAllowList.d.ts +31 -0
- package/getOrganizationIpAllowList.js +27 -0
- package/getOrganizationIpAllowList.js.map +1 -0
- package/getOrganizationTeamSyncGroups.d.ts +16 -1
- package/getOrganizationTeamSyncGroups.js +13 -4
- package/getOrganizationTeamSyncGroups.js.map +1 -1
- package/getOrganizationTeams.d.ts +87 -1
- package/getOrganizationTeams.js +54 -5
- package/getOrganizationTeams.js.map +1 -1
- package/getOrganizationWebhooks.d.ts +31 -0
- package/getOrganizationWebhooks.js +27 -0
- package/getOrganizationWebhooks.js.map +1 -0
- package/getRef.d.ts +48 -0
- package/getRef.js +32 -5
- package/getRef.js.map +1 -1
- package/getRelease.d.ts +92 -0
- package/getRelease.js +8 -5
- package/getRelease.js.map +1 -1
- package/getRepositories.d.ts +70 -0
- package/getRepositories.js +40 -5
- package/getRepositories.js.map +1 -1
- package/getRepository.d.ts +142 -4
- package/getRepository.js +30 -6
- package/getRepository.js.map +1 -1
- package/getRepositoryBranches.d.ts +82 -0
- package/getRepositoryBranches.js +49 -0
- package/getRepositoryBranches.js.map +1 -0
- package/getRepositoryDeployKeys.d.ts +64 -0
- package/getRepositoryDeployKeys.js +47 -0
- package/getRepositoryDeployKeys.js.map +1 -0
- package/getRepositoryFile.d.ts +72 -0
- package/getRepositoryFile.js +36 -5
- package/getRepositoryFile.js.map +1 -1
- package/getRepositoryMilestone.d.ts +62 -0
- package/getRepositoryMilestone.js +34 -5
- package/getRepositoryMilestone.js.map +1 -1
- package/getRepositoryPullRequest.d.ts +90 -0
- package/getRepositoryPullRequest.js +32 -5
- package/getRepositoryPullRequest.js.map +1 -1
- package/getRepositoryPullRequests.d.ts +91 -1
- package/getRepositoryPullRequests.js +38 -5
- package/getRepositoryPullRequests.js.map +1 -1
- package/getRepositoryTeams.d.ts +47 -1
- package/getRepositoryTeams.js +30 -5
- package/getRepositoryTeams.js.map +1 -1
- package/getRepositoryWebhooks.d.ts +63 -0
- package/getRepositoryWebhooks.js +51 -0
- package/getRepositoryWebhooks.js.map +1 -0
- package/getTeam.d.ts +79 -0
- package/getTeam.js +32 -5
- package/getTeam.js.map +1 -1
- package/getTree.d.ts +70 -1
- package/getTree.js +50 -5
- package/getTree.js.map +1 -1
- package/getUser.d.ts +102 -0
- package/getUser.js +38 -5
- package/getUser.js.map +1 -1
- package/getUsers.d.ts +55 -0
- package/getUsers.js +42 -5
- package/getUsers.js.map +1 -1
- package/index.d.ts +244 -68
- package/index.js +259 -171
- package/index.js.map +1 -1
- package/issue.d.ts +117 -6
- package/issue.js +85 -22
- package/issue.js.map +1 -1
- package/issueLabel.d.ts +64 -0
- package/issueLabel.js +44 -22
- package/issueLabel.js.map +1 -1
- package/membership.d.ts +49 -0
- package/membership.js +49 -21
- package/membership.js.map +1 -1
- package/organizationBlock.d.ts +21 -0
- package/organizationBlock.js +31 -19
- package/organizationBlock.js.map +1 -1
- package/organizationProject.d.ts +36 -0
- package/organizationProject.js +32 -20
- package/organizationProject.js.map +1 -1
- package/organizationSecurityManager.d.ts +67 -0
- package/organizationSecurityManager.js +71 -0
- package/organizationSecurityManager.js.map +1 -0
- package/organizationSettings.d.ts +394 -0
- package/organizationSettings.js +148 -0
- package/organizationSettings.js.map +1 -0
- package/organizationWebhook.d.ts +65 -1
- package/organizationWebhook.js +52 -22
- package/organizationWebhook.js.map +1 -1
- package/package.json +2 -2
- package/package.json.dev +2 -2
- package/projectCard.d.ts +87 -0
- package/projectCard.js +73 -22
- package/projectCard.js.map +1 -1
- package/projectColumn.d.ts +31 -0
- package/projectColumn.js +35 -22
- package/projectColumn.js.map +1 -1
- package/provider.d.ts +1 -1
- package/provider.js +10 -10
- package/provider.js.map +1 -1
- package/release.d.ts +194 -0
- package/release.js +121 -0
- package/release.js.map +1 -0
- package/repository.d.ts +396 -4
- package/repository.js +72 -22
- package/repository.js.map +1 -1
- package/repositoryAutolinkReference.d.ts +54 -6
- package/repositoryAutolinkReference.js +54 -22
- package/repositoryAutolinkReference.js.map +1 -1
- package/repositoryCollaborator.d.ts +90 -0
- package/repositoryCollaborator.js +64 -22
- package/repositoryCollaborator.js.map +1 -1
- package/repositoryDeployKey.d.ts +71 -0
- package/repositoryDeployKey.js +57 -22
- package/repositoryDeployKey.js.map +1 -1
- package/repositoryEnvironment.d.ts +63 -1
- package/repositoryEnvironment.js +56 -22
- package/repositoryEnvironment.js.map +1 -1
- package/repositoryFile.d.ts +70 -30
- package/repositoryFile.js +59 -22
- package/repositoryFile.js.map +1 -1
- package/repositoryMilestone.d.ts +81 -3
- package/repositoryMilestone.js +49 -22
- package/repositoryMilestone.js.map +1 -1
- package/repositoryProject.d.ts +52 -0
- package/repositoryProject.js +41 -22
- package/repositoryProject.js.map +1 -1
- package/repositoryPullRequest.d.ts +127 -4
- package/repositoryPullRequest.js +40 -22
- package/repositoryPullRequest.js.map +1 -1
- package/repositoryTagProtection.d.ts +41 -0
- package/repositoryTagProtection.js +45 -22
- package/repositoryTagProtection.js.map +1 -1
- package/repositoryWebhook.d.ts +81 -1
- package/repositoryWebhook.js +59 -22
- package/repositoryWebhook.js.map +1 -1
- package/team.d.ts +100 -0
- package/team.js +49 -22
- package/team.js.map +1 -1
- package/teamMembers.d.ts +60 -1
- package/teamMembers.js +62 -22
- package/teamMembers.js.map +1 -1
- package/teamMembership.d.ts +67 -0
- package/teamMembership.js +59 -22
- package/teamMembership.js.map +1 -1
- package/teamRepository.d.ts +59 -3
- package/teamRepository.js +57 -22
- package/teamRepository.js.map +1 -1
- package/teamSettings.d.ts +119 -0
- package/teamSettings.js +99 -0
- package/teamSettings.js.map +1 -0
- package/teamSyncGroupMapping.d.ts +38 -1
- package/teamSyncGroupMapping.js +36 -21
- package/teamSyncGroupMapping.js.map +1 -1
- package/types/index.js.map +1 -1
- package/types/input.d.ts +208 -1
- package/types/output.d.ts +555 -1
- package/userGpgKey.d.ts +39 -0
- package/userGpgKey.js +42 -21
- package/userGpgKey.js.map +1 -1
- package/userInvitationAccepter.d.ts +30 -0
- package/userInvitationAccepter.js +38 -17
- package/userInvitationAccepter.js.map +1 -1
- package/userSshKey.d.ts +50 -0
- package/userSshKey.js +48 -22
- package/userSshKey.js.map +1 -1
- package/utilities.js +13 -1
- package/utilities.js.map +1 -1
package/repositoryDeployKey.js
CHANGED
|
@@ -5,7 +5,64 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.RepositoryDeployKey = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Provides a GitHub repository deploy key resource.
|
|
10
|
+
*
|
|
11
|
+
* A deploy key is an SSH key that is stored on your server and grants
|
|
12
|
+
* access to a single GitHub repository. This key is attached directly to the repository instead of to a personal user
|
|
13
|
+
* account.
|
|
14
|
+
*
|
|
15
|
+
* This resource allows you to add/remove repository deploy keys.
|
|
16
|
+
*
|
|
17
|
+
* Further documentation on GitHub repository deploy keys:
|
|
18
|
+
* - [About deploy keys](https://developer.github.com/guides/managing-deploy-keys/#deploy-keys)
|
|
19
|
+
*
|
|
20
|
+
* ## Example Usage
|
|
21
|
+
*
|
|
22
|
+
* ```typescript
|
|
23
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
24
|
+
* import * as github from "@pulumi/github";
|
|
25
|
+
*
|
|
26
|
+
* // Add a deploy key
|
|
27
|
+
* const exampleRepositoryDeployKey = new github.RepositoryDeployKey("exampleRepositoryDeployKey", {
|
|
28
|
+
* key: "ssh-rsa AAA...",
|
|
29
|
+
* readOnly: false,
|
|
30
|
+
* repository: "test-repo",
|
|
31
|
+
* title: "Repository test key",
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* ## Import
|
|
36
|
+
*
|
|
37
|
+
* Repository deploy keys can be imported using a colon-separated pair of repository name and GitHub's key id. The latter can be obtained by GitHub's SDKs and API.
|
|
38
|
+
*
|
|
39
|
+
* ```sh
|
|
40
|
+
* $ pulumi import github:index/repositoryDeployKey:RepositoryDeployKey foo test-repo:23824728
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
8
43
|
class RepositoryDeployKey extends pulumi.CustomResource {
|
|
44
|
+
/**
|
|
45
|
+
* Get an existing RepositoryDeployKey resource's state with the given name, ID, and optional extra
|
|
46
|
+
* properties used to qualify the lookup.
|
|
47
|
+
*
|
|
48
|
+
* @param name The _unique_ name of the resulting resource.
|
|
49
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
50
|
+
* @param state Any extra arguments used during the lookup.
|
|
51
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
52
|
+
*/
|
|
53
|
+
static get(name, id, state, opts) {
|
|
54
|
+
return new RepositoryDeployKey(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns true if the given object is an instance of RepositoryDeployKey. This is designed to work even
|
|
58
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
59
|
+
*/
|
|
60
|
+
static isInstance(obj) {
|
|
61
|
+
if (obj === undefined || obj === null) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
return obj['__pulumiType'] === RepositoryDeployKey.__pulumiType;
|
|
65
|
+
}
|
|
9
66
|
constructor(name, argsOrState, opts) {
|
|
10
67
|
let resourceInputs = {};
|
|
11
68
|
opts = opts || {};
|
|
@@ -37,28 +94,6 @@ class RepositoryDeployKey extends pulumi.CustomResource {
|
|
|
37
94
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
38
95
|
super(RepositoryDeployKey.__pulumiType, name, resourceInputs, opts);
|
|
39
96
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Get an existing RepositoryDeployKey resource's state with the given name, ID, and optional extra
|
|
42
|
-
* properties used to qualify the lookup.
|
|
43
|
-
*
|
|
44
|
-
* @param name The _unique_ name of the resulting resource.
|
|
45
|
-
* @param id The _unique_ provider ID of the resource to lookup.
|
|
46
|
-
* @param state Any extra arguments used during the lookup.
|
|
47
|
-
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
48
|
-
*/
|
|
49
|
-
static get(name, id, state, opts) {
|
|
50
|
-
return new RepositoryDeployKey(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Returns true if the given object is an instance of RepositoryDeployKey. This is designed to work even
|
|
54
|
-
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
55
|
-
*/
|
|
56
|
-
static isInstance(obj) {
|
|
57
|
-
if (obj === undefined || obj === null) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
return obj['__pulumiType'] === RepositoryDeployKey.__pulumiType;
|
|
61
|
-
}
|
|
62
97
|
}
|
|
63
98
|
exports.RepositoryDeployKey = RepositoryDeployKey;
|
|
64
99
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repositoryDeployKey.js","sourceRoot":"","sources":["../repositoryDeployKey.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;
|
|
1
|
+
{"version":3,"file":"repositoryDeployKey.js","sourceRoot":"","sources":["../repositoryDeployKey.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;IAC1D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAgC,EAAE,IAAmC;QAC9H,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EA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
5
|
+
* This resource allows you to create and manage environments for a GitHub repository.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as github from "@pulumi/github";
|
|
12
|
+
*
|
|
13
|
+
* const current = github.getUser({
|
|
14
|
+
* username: "",
|
|
15
|
+
* });
|
|
16
|
+
* const exampleRepository = new github.Repository("exampleRepository", {description: "My awesome codebase"});
|
|
17
|
+
* const exampleRepositoryEnvironment = new github.RepositoryEnvironment("exampleRepositoryEnvironment", {
|
|
18
|
+
* environment: "example",
|
|
19
|
+
* repository: exampleRepository.name,
|
|
20
|
+
* reviewers: [{
|
|
21
|
+
* users: [current.then(current => current.id)],
|
|
22
|
+
* }],
|
|
23
|
+
* deploymentBranchPolicy: {
|
|
24
|
+
* protectedBranches: true,
|
|
25
|
+
* customBranchPolicies: false,
|
|
26
|
+
* },
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* ## Import
|
|
31
|
+
*
|
|
32
|
+
* GitHub Repository Environment can be imported using an ID made up of `name` of the repository combined with the `environment` name of the environment, separated by a `:` character, e.g.
|
|
33
|
+
*
|
|
34
|
+
* ```sh
|
|
35
|
+
* $ pulumi import github:index/repositoryEnvironment:RepositoryEnvironment daily terraform:daily
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
3
38
|
export declare class RepositoryEnvironment extends pulumi.CustomResource {
|
|
4
39
|
/**
|
|
5
40
|
* Get an existing RepositoryEnvironment resource's state with the given name, ID, and optional extra
|
|
@@ -17,9 +52,18 @@ export declare class RepositoryEnvironment extends pulumi.CustomResource {
|
|
|
17
52
|
*/
|
|
18
53
|
static isInstance(obj: any): obj is RepositoryEnvironment;
|
|
19
54
|
readonly deploymentBranchPolicy: pulumi.Output<outputs.RepositoryEnvironmentDeploymentBranchPolicy | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* The name of the environment.
|
|
57
|
+
*/
|
|
20
58
|
readonly environment: pulumi.Output<string>;
|
|
59
|
+
/**
|
|
60
|
+
* The repository of the environment.
|
|
61
|
+
*/
|
|
21
62
|
readonly repository: pulumi.Output<string>;
|
|
22
63
|
readonly reviewers: pulumi.Output<outputs.RepositoryEnvironmentReviewer[] | undefined>;
|
|
64
|
+
/**
|
|
65
|
+
* Amount of time to delay a job after the job is initially triggered.
|
|
66
|
+
*/
|
|
23
67
|
readonly waitTimer: pulumi.Output<number | undefined>;
|
|
24
68
|
/**
|
|
25
69
|
* Create a RepositoryEnvironment resource with the given unique name, arguments, and options.
|
|
@@ -35,9 +79,18 @@ export declare class RepositoryEnvironment extends pulumi.CustomResource {
|
|
|
35
79
|
*/
|
|
36
80
|
export interface RepositoryEnvironmentState {
|
|
37
81
|
deploymentBranchPolicy?: pulumi.Input<inputs.RepositoryEnvironmentDeploymentBranchPolicy>;
|
|
82
|
+
/**
|
|
83
|
+
* The name of the environment.
|
|
84
|
+
*/
|
|
38
85
|
environment?: pulumi.Input<string>;
|
|
86
|
+
/**
|
|
87
|
+
* The repository of the environment.
|
|
88
|
+
*/
|
|
39
89
|
repository?: pulumi.Input<string>;
|
|
40
90
|
reviewers?: pulumi.Input<pulumi.Input<inputs.RepositoryEnvironmentReviewer>[]>;
|
|
91
|
+
/**
|
|
92
|
+
* Amount of time to delay a job after the job is initially triggered.
|
|
93
|
+
*/
|
|
41
94
|
waitTimer?: pulumi.Input<number>;
|
|
42
95
|
}
|
|
43
96
|
/**
|
|
@@ -45,8 +98,17 @@ export interface RepositoryEnvironmentState {
|
|
|
45
98
|
*/
|
|
46
99
|
export interface RepositoryEnvironmentArgs {
|
|
47
100
|
deploymentBranchPolicy?: pulumi.Input<inputs.RepositoryEnvironmentDeploymentBranchPolicy>;
|
|
101
|
+
/**
|
|
102
|
+
* The name of the environment.
|
|
103
|
+
*/
|
|
48
104
|
environment: pulumi.Input<string>;
|
|
105
|
+
/**
|
|
106
|
+
* The repository of the environment.
|
|
107
|
+
*/
|
|
49
108
|
repository: pulumi.Input<string>;
|
|
50
109
|
reviewers?: pulumi.Input<pulumi.Input<inputs.RepositoryEnvironmentReviewer>[]>;
|
|
110
|
+
/**
|
|
111
|
+
* Amount of time to delay a job after the job is initially triggered.
|
|
112
|
+
*/
|
|
51
113
|
waitTimer?: pulumi.Input<number>;
|
|
52
114
|
}
|
package/repositoryEnvironment.js
CHANGED
|
@@ -5,7 +5,63 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.RepositoryEnvironment = 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 environments for 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 current = github.getUser({
|
|
18
|
+
* username: "",
|
|
19
|
+
* });
|
|
20
|
+
* const exampleRepository = new github.Repository("exampleRepository", {description: "My awesome codebase"});
|
|
21
|
+
* const exampleRepositoryEnvironment = new github.RepositoryEnvironment("exampleRepositoryEnvironment", {
|
|
22
|
+
* environment: "example",
|
|
23
|
+
* repository: exampleRepository.name,
|
|
24
|
+
* reviewers: [{
|
|
25
|
+
* users: [current.then(current => current.id)],
|
|
26
|
+
* }],
|
|
27
|
+
* deploymentBranchPolicy: {
|
|
28
|
+
* protectedBranches: true,
|
|
29
|
+
* customBranchPolicies: false,
|
|
30
|
+
* },
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* ## Import
|
|
35
|
+
*
|
|
36
|
+
* GitHub Repository Environment can be imported using an ID made up of `name` of the repository combined with the `environment` name of the environment, separated by a `:` character, e.g.
|
|
37
|
+
*
|
|
38
|
+
* ```sh
|
|
39
|
+
* $ pulumi import github:index/repositoryEnvironment:RepositoryEnvironment daily terraform:daily
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
8
42
|
class RepositoryEnvironment extends pulumi.CustomResource {
|
|
43
|
+
/**
|
|
44
|
+
* Get an existing RepositoryEnvironment resource's state with the given name, ID, and optional extra
|
|
45
|
+
* properties used to qualify the lookup.
|
|
46
|
+
*
|
|
47
|
+
* @param name The _unique_ name of the resulting resource.
|
|
48
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
49
|
+
* @param state Any extra arguments used during the lookup.
|
|
50
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
51
|
+
*/
|
|
52
|
+
static get(name, id, state, opts) {
|
|
53
|
+
return new RepositoryEnvironment(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Returns true if the given object is an instance of RepositoryEnvironment. This is designed to work even
|
|
57
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
58
|
+
*/
|
|
59
|
+
static isInstance(obj) {
|
|
60
|
+
if (obj === undefined || obj === null) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
return obj['__pulumiType'] === RepositoryEnvironment.__pulumiType;
|
|
64
|
+
}
|
|
9
65
|
constructor(name, argsOrState, opts) {
|
|
10
66
|
let resourceInputs = {};
|
|
11
67
|
opts = opts || {};
|
|
@@ -34,28 +90,6 @@ class RepositoryEnvironment extends pulumi.CustomResource {
|
|
|
34
90
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
35
91
|
super(RepositoryEnvironment.__pulumiType, name, resourceInputs, opts);
|
|
36
92
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Get an existing RepositoryEnvironment resource's state with the given name, ID, and optional extra
|
|
39
|
-
* properties used to qualify the lookup.
|
|
40
|
-
*
|
|
41
|
-
* @param name The _unique_ name of the resulting resource.
|
|
42
|
-
* @param id The _unique_ provider ID of the resource to lookup.
|
|
43
|
-
* @param state Any extra arguments used during the lookup.
|
|
44
|
-
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
45
|
-
*/
|
|
46
|
-
static get(name, id, state, opts) {
|
|
47
|
-
return new RepositoryEnvironment(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Returns true if the given object is an instance of RepositoryEnvironment. This is designed to work even
|
|
51
|
-
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
52
|
-
*/
|
|
53
|
-
static isInstance(obj) {
|
|
54
|
-
if (obj === undefined || obj === null) {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
return obj['__pulumiType'] === RepositoryEnvironment.__pulumiType;
|
|
58
|
-
}
|
|
59
93
|
}
|
|
60
94
|
exports.RepositoryEnvironment = RepositoryEnvironment;
|
|
61
95
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repositoryEnvironment.js","sourceRoot":"","sources":["../repositoryEnvironment.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;
|
|
1
|
+
{"version":3,"file":"repositoryEnvironment.js","sourceRoot":"","sources":["../repositoryEnvironment.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAa,qBAAsB,SAAQ,MAAM,CAAC,cAAc;IAC5D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAkC,EAAE,IAAmC;QAChI,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC5E,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ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AG,EAAE;gBACvD,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;aAC7D;YACD,cAAc,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1F,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;YAClE,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;SACnE;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,qBAAqB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC1E,CAAC;;AA7EL,sDA8EC;AAhEG,gBAAgB;AACO,kCAAY,GAAG,0DAA0D,CAAC"}
|
package/repositoryFile.d.ts
CHANGED
|
@@ -1,4 +1,41 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* This resource allows you to create and manage files within a
|
|
4
|
+
* 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 fooRepository = new github.Repository("fooRepository", {autoInit: true});
|
|
13
|
+
* const fooRepositoryFile = new github.RepositoryFile("fooRepositoryFile", {
|
|
14
|
+
* repository: fooRepository.name,
|
|
15
|
+
* branch: "main",
|
|
16
|
+
* file: ".gitignore",
|
|
17
|
+
* content: "**/*.tfstate",
|
|
18
|
+
* commitMessage: "Managed by Terraform",
|
|
19
|
+
* commitAuthor: "Terraform User",
|
|
20
|
+
* commitEmail: "terraform@example.com",
|
|
21
|
+
* overwriteOnCreate: true,
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* ## Import
|
|
26
|
+
*
|
|
27
|
+
* Repository files can be imported using a combination of the `repo` and `file`, e.g.
|
|
28
|
+
*
|
|
29
|
+
* ```sh
|
|
30
|
+
* $ pulumi import github:index/repositoryFile:RepositoryFile gitignore example/.gitignore
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* To import a file from a branch other than main, append `:` and the branch name, e.g.
|
|
34
|
+
*
|
|
35
|
+
* ```sh
|
|
36
|
+
* $ pulumi import github:index/repositoryFile:RepositoryFile gitignore example/.gitignore:dev
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
2
39
|
export declare class RepositoryFile extends pulumi.CustomResource {
|
|
3
40
|
/**
|
|
4
41
|
* Get an existing RepositoryFile resource's state with the given name, ID, and optional extra
|
|
@@ -16,43 +53,44 @@ export declare class RepositoryFile extends pulumi.CustomResource {
|
|
|
16
53
|
*/
|
|
17
54
|
static isInstance(obj: any): obj is RepositoryFile;
|
|
18
55
|
/**
|
|
19
|
-
*
|
|
56
|
+
* Git branch (defaults to `main`).
|
|
57
|
+
* The branch must already exist, it will not be created if it does not already exist.
|
|
20
58
|
*/
|
|
21
59
|
readonly branch: pulumi.Output<string | undefined>;
|
|
22
60
|
/**
|
|
23
|
-
*
|
|
61
|
+
* Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
|
|
24
62
|
*/
|
|
25
|
-
readonly commitAuthor: pulumi.Output<string>;
|
|
63
|
+
readonly commitAuthor: pulumi.Output<string | undefined>;
|
|
26
64
|
/**
|
|
27
|
-
*
|
|
65
|
+
* Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
|
|
28
66
|
*/
|
|
29
|
-
readonly commitEmail: pulumi.Output<string>;
|
|
67
|
+
readonly commitEmail: pulumi.Output<string | undefined>;
|
|
30
68
|
/**
|
|
31
|
-
*
|
|
69
|
+
* Commit message when adding or updating the managed file.
|
|
32
70
|
*/
|
|
33
71
|
readonly commitMessage: pulumi.Output<string>;
|
|
34
72
|
/**
|
|
35
|
-
* The SHA of the commit that modified the file
|
|
73
|
+
* The SHA of the commit that modified the file.
|
|
36
74
|
*/
|
|
37
75
|
readonly commitSha: pulumi.Output<string>;
|
|
38
76
|
/**
|
|
39
|
-
* The file
|
|
77
|
+
* The file content.
|
|
40
78
|
*/
|
|
41
79
|
readonly content: pulumi.Output<string>;
|
|
42
80
|
/**
|
|
43
|
-
* The file
|
|
81
|
+
* The path of the file to manage.
|
|
44
82
|
*/
|
|
45
83
|
readonly file: pulumi.Output<string>;
|
|
46
84
|
/**
|
|
47
|
-
* Enable overwriting existing files
|
|
85
|
+
* Enable overwriting existing files
|
|
48
86
|
*/
|
|
49
87
|
readonly overwriteOnCreate: pulumi.Output<boolean | undefined>;
|
|
50
88
|
/**
|
|
51
|
-
* The repository
|
|
89
|
+
* The repository to create the file in.
|
|
52
90
|
*/
|
|
53
91
|
readonly repository: pulumi.Output<string>;
|
|
54
92
|
/**
|
|
55
|
-
* The blob
|
|
93
|
+
* The SHA blob of the file.
|
|
56
94
|
*/
|
|
57
95
|
readonly sha: pulumi.Output<string>;
|
|
58
96
|
/**
|
|
@@ -69,43 +107,44 @@ export declare class RepositoryFile extends pulumi.CustomResource {
|
|
|
69
107
|
*/
|
|
70
108
|
export interface RepositoryFileState {
|
|
71
109
|
/**
|
|
72
|
-
*
|
|
110
|
+
* Git branch (defaults to `main`).
|
|
111
|
+
* The branch must already exist, it will not be created if it does not already exist.
|
|
73
112
|
*/
|
|
74
113
|
branch?: pulumi.Input<string>;
|
|
75
114
|
/**
|
|
76
|
-
*
|
|
115
|
+
* Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
|
|
77
116
|
*/
|
|
78
117
|
commitAuthor?: pulumi.Input<string>;
|
|
79
118
|
/**
|
|
80
|
-
*
|
|
119
|
+
* Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
|
|
81
120
|
*/
|
|
82
121
|
commitEmail?: pulumi.Input<string>;
|
|
83
122
|
/**
|
|
84
|
-
*
|
|
123
|
+
* Commit message when adding or updating the managed file.
|
|
85
124
|
*/
|
|
86
125
|
commitMessage?: pulumi.Input<string>;
|
|
87
126
|
/**
|
|
88
|
-
* The SHA of the commit that modified the file
|
|
127
|
+
* The SHA of the commit that modified the file.
|
|
89
128
|
*/
|
|
90
129
|
commitSha?: pulumi.Input<string>;
|
|
91
130
|
/**
|
|
92
|
-
* The file
|
|
131
|
+
* The file content.
|
|
93
132
|
*/
|
|
94
133
|
content?: pulumi.Input<string>;
|
|
95
134
|
/**
|
|
96
|
-
* The file
|
|
135
|
+
* The path of the file to manage.
|
|
97
136
|
*/
|
|
98
137
|
file?: pulumi.Input<string>;
|
|
99
138
|
/**
|
|
100
|
-
* Enable overwriting existing files
|
|
139
|
+
* Enable overwriting existing files
|
|
101
140
|
*/
|
|
102
141
|
overwriteOnCreate?: pulumi.Input<boolean>;
|
|
103
142
|
/**
|
|
104
|
-
* The repository
|
|
143
|
+
* The repository to create the file in.
|
|
105
144
|
*/
|
|
106
145
|
repository?: pulumi.Input<string>;
|
|
107
146
|
/**
|
|
108
|
-
* The blob
|
|
147
|
+
* The SHA blob of the file.
|
|
109
148
|
*/
|
|
110
149
|
sha?: pulumi.Input<string>;
|
|
111
150
|
}
|
|
@@ -114,35 +153,36 @@ export interface RepositoryFileState {
|
|
|
114
153
|
*/
|
|
115
154
|
export interface RepositoryFileArgs {
|
|
116
155
|
/**
|
|
117
|
-
*
|
|
156
|
+
* Git branch (defaults to `main`).
|
|
157
|
+
* The branch must already exist, it will not be created if it does not already exist.
|
|
118
158
|
*/
|
|
119
159
|
branch?: pulumi.Input<string>;
|
|
120
160
|
/**
|
|
121
|
-
*
|
|
161
|
+
* Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
|
|
122
162
|
*/
|
|
123
163
|
commitAuthor?: pulumi.Input<string>;
|
|
124
164
|
/**
|
|
125
|
-
*
|
|
165
|
+
* Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
|
|
126
166
|
*/
|
|
127
167
|
commitEmail?: pulumi.Input<string>;
|
|
128
168
|
/**
|
|
129
|
-
*
|
|
169
|
+
* Commit message when adding or updating the managed file.
|
|
130
170
|
*/
|
|
131
171
|
commitMessage?: pulumi.Input<string>;
|
|
132
172
|
/**
|
|
133
|
-
* The file
|
|
173
|
+
* The file content.
|
|
134
174
|
*/
|
|
135
175
|
content: pulumi.Input<string>;
|
|
136
176
|
/**
|
|
137
|
-
* The file
|
|
177
|
+
* The path of the file to manage.
|
|
138
178
|
*/
|
|
139
179
|
file: pulumi.Input<string>;
|
|
140
180
|
/**
|
|
141
|
-
* Enable overwriting existing files
|
|
181
|
+
* Enable overwriting existing files
|
|
142
182
|
*/
|
|
143
183
|
overwriteOnCreate?: pulumi.Input<boolean>;
|
|
144
184
|
/**
|
|
145
|
-
* The repository
|
|
185
|
+
* The repository to create the file in.
|
|
146
186
|
*/
|
|
147
187
|
repository: pulumi.Input<string>;
|
|
148
188
|
}
|
package/repositoryFile.js
CHANGED
|
@@ -5,7 +5,66 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.RepositoryFile = 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 files within a
|
|
10
|
+
* GitHub repository.
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
16
|
+
* import * as github from "@pulumi/github";
|
|
17
|
+
*
|
|
18
|
+
* const fooRepository = new github.Repository("fooRepository", {autoInit: true});
|
|
19
|
+
* const fooRepositoryFile = new github.RepositoryFile("fooRepositoryFile", {
|
|
20
|
+
* repository: fooRepository.name,
|
|
21
|
+
* branch: "main",
|
|
22
|
+
* file: ".gitignore",
|
|
23
|
+
* content: "**/*.tfstate",
|
|
24
|
+
* commitMessage: "Managed by Terraform",
|
|
25
|
+
* commitAuthor: "Terraform User",
|
|
26
|
+
* commitEmail: "terraform@example.com",
|
|
27
|
+
* overwriteOnCreate: true,
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* ## Import
|
|
32
|
+
*
|
|
33
|
+
* Repository files can be imported using a combination of the `repo` and `file`, e.g.
|
|
34
|
+
*
|
|
35
|
+
* ```sh
|
|
36
|
+
* $ pulumi import github:index/repositoryFile:RepositoryFile gitignore example/.gitignore
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* To import a file from a branch other than main, append `:` and the branch name, e.g.
|
|
40
|
+
*
|
|
41
|
+
* ```sh
|
|
42
|
+
* $ pulumi import github:index/repositoryFile:RepositoryFile gitignore example/.gitignore:dev
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
8
45
|
class RepositoryFile extends pulumi.CustomResource {
|
|
46
|
+
/**
|
|
47
|
+
* Get an existing RepositoryFile resource's state with the given name, ID, and optional extra
|
|
48
|
+
* properties used to qualify the lookup.
|
|
49
|
+
*
|
|
50
|
+
* @param name The _unique_ name of the resulting resource.
|
|
51
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
52
|
+
* @param state Any extra arguments used during the lookup.
|
|
53
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
54
|
+
*/
|
|
55
|
+
static get(name, id, state, opts) {
|
|
56
|
+
return new RepositoryFile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Returns true if the given object is an instance of RepositoryFile. This is designed to work even
|
|
60
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
61
|
+
*/
|
|
62
|
+
static isInstance(obj) {
|
|
63
|
+
if (obj === undefined || obj === null) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
return obj['__pulumiType'] === RepositoryFile.__pulumiType;
|
|
67
|
+
}
|
|
9
68
|
constructor(name, argsOrState, opts) {
|
|
10
69
|
let resourceInputs = {};
|
|
11
70
|
opts = opts || {};
|
|
@@ -47,28 +106,6 @@ class RepositoryFile extends pulumi.CustomResource {
|
|
|
47
106
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
48
107
|
super(RepositoryFile.__pulumiType, name, resourceInputs, opts);
|
|
49
108
|
}
|
|
50
|
-
/**
|
|
51
|
-
* Get an existing RepositoryFile resource's state with the given name, ID, and optional extra
|
|
52
|
-
* properties used to qualify the lookup.
|
|
53
|
-
*
|
|
54
|
-
* @param name The _unique_ name of the resulting resource.
|
|
55
|
-
* @param id The _unique_ provider ID of the resource to lookup.
|
|
56
|
-
* @param state Any extra arguments used during the lookup.
|
|
57
|
-
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
58
|
-
*/
|
|
59
|
-
static get(name, id, state, opts) {
|
|
60
|
-
return new RepositoryFile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Returns true if the given object is an instance of RepositoryFile. This is designed to work even
|
|
64
|
-
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
65
|
-
*/
|
|
66
|
-
static isInstance(obj) {
|
|
67
|
-
if (obj === undefined || obj === null) {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
return obj['__pulumiType'] === RepositoryFile.__pulumiType;
|
|
71
|
-
}
|
|
72
109
|
}
|
|
73
110
|
exports.RepositoryFile = RepositoryFile;
|
|
74
111
|
/** @internal */
|
package/repositoryFile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repositoryFile.js","sourceRoot":"","sources":["../repositoryFile.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,cAAe,SAAQ,MAAM,CAAC,cAAc;
|
|
1
|
+
{"version":3,"file":"repositoryFile.js","sourceRoot":"","sources":["../repositoryFile.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAa,cAAe,SAAQ,MAAM,CAAC,cAAc;IACrD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA2B,EAAE,IAAmC;QACzH,OAAO,IAAI,cAAc,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACrE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,cAAc,CAAC,YAAY,CAAC;IAC/D,CAAC;IAoDD,YAAY,IAAY,EAAE,WAA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