@pulumi/github 4.17.0 → 5.0.0-alpha.1663887713
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/README.md +1 -1
- package/actionsEnvironmentSecret.d.ts +0 -105
- package/actionsEnvironmentSecret.js +0 -48
- package/actionsEnvironmentSecret.js.map +1 -1
- package/actionsOrganizationPermissions.d.ts +0 -72
- package/actionsOrganizationPermissions.js +0 -36
- package/actionsOrganizationPermissions.js.map +1 -1
- package/actionsOrganizationSecret.d.ts +0 -110
- package/actionsOrganizationSecret.js +0 -50
- package/actionsOrganizationSecret.js.map +1 -1
- package/actionsOrganizationSecretRepositories.d.ts +0 -47
- package/actionsOrganizationSecretRepositories.js +0 -29
- package/actionsOrganizationSecretRepositories.js.map +1 -1
- package/actionsRunnerGroup.d.ts +0 -88
- package/actionsRunnerGroup.js +0 -25
- package/actionsRunnerGroup.js.map +1 -1
- package/actionsSecret.d.ts +0 -70
- package/actionsSecret.js +0 -22
- package/actionsSecret.js.map +1 -1
- package/appInstallationRepository.d.ts +0 -54
- package/appInstallationRepository.js +0 -36
- package/appInstallationRepository.js.map +1 -1
- package/branch.d.ts +0 -92
- package/branch.js +0 -38
- package/branch.js.map +1 -1
- package/branchDefault.d.ts +0 -53
- package/branchDefault.js +0 -35
- package/branchDefault.js.map +1 -1
- package/branchProtection.d.ts +3 -155
- package/branchProtection.js +0 -53
- package/branchProtection.js.map +1 -1
- package/branchProtectionV3.d.ts +0 -138
- package/branchProtectionV3.js +0 -66
- package/branchProtectionV3.js.map +1 -1
- package/emuGroupMapping.d.ts +0 -41
- package/emuGroupMapping.js +0 -23
- package/emuGroupMapping.js.map +1 -1
- package/getActionsOrganizationSecrets.d.ts +13 -0
- package/getActionsOrganizationSecrets.js +16 -0
- package/getActionsOrganizationSecrets.js.map +1 -0
- package/getActionsPublicKey.d.ts +0 -27
- package/getActionsPublicKey.js +0 -15
- package/getActionsPublicKey.js.map +1 -1
- package/getActionsSecrets.d.ts +30 -0
- package/getActionsSecrets.js +24 -0
- package/getActionsSecrets.js.map +1 -0
- package/getBranch.d.ts +0 -36
- package/getBranch.js +0 -15
- package/getBranch.js.map +1 -1
- package/getCollaborators.d.ts +0 -36
- package/getCollaborators.js +0 -15
- package/getCollaborators.js.map +1 -1
- package/getExternalGroups.d.ts +0 -17
- package/getExternalGroups.js +0 -14
- package/getExternalGroups.js.map +1 -1
- package/getIpRanges.d.ts +0 -84
- package/getIpRanges.js +0 -12
- package/getIpRanges.js.map +1 -1
- package/getMembership.d.ts +0 -38
- package/getMembership.js +0 -17
- package/getMembership.js.map +1 -1
- package/getOrganization.d.ts +0 -38
- package/getOrganization.js +0 -14
- package/getOrganization.js.map +1 -1
- package/getOrganizationTeamSyncGroups.d.ts +0 -15
- package/getOrganizationTeamSyncGroups.js +0 -12
- package/getOrganizationTeamSyncGroups.js.map +1 -1
- package/getOrganizationTeams.d.ts +0 -38
- package/getOrganizationTeams.js +0 -25
- package/getOrganizationTeams.js.map +1 -1
- package/getRef.d.ts +0 -33
- package/getRef.js +0 -15
- package/getRef.js.map +1 -1
- package/getRelease.d.ts +0 -121
- package/getRelease.js +0 -46
- package/getRelease.js.map +1 -1
- package/getRepositories.d.ts +0 -29
- package/getRepositories.js +0 -17
- package/getRepositories.js.map +1 -1
- package/getRepository.d.ts +0 -132
- package/getRepository.js +0 -14
- package/getRepository.js.map +1 -1
- package/getRepositoryFile.d.ts +0 -55
- package/getRepositoryFile.js +0 -17
- package/getRepositoryFile.js.map +1 -1
- package/getRepositoryMilestone.d.ts +0 -46
- package/getRepositoryMilestone.js +0 -16
- package/getRepositoryMilestone.js.map +1 -1
- package/getRepositoryPullRequest.d.ts +0 -75
- package/getRepositoryPullRequest.js +0 -15
- package/getRepositoryPullRequest.js.map +1 -1
- package/getRepositoryPullRequests.d.ts +0 -72
- package/getRepositoryPullRequests.js +0 -18
- package/getRepositoryPullRequests.js.map +1 -1
- package/getRepositoryTeams.d.ts +30 -0
- package/getRepositoryTeams.js +24 -0
- package/getRepositoryTeams.js.map +1 -0
- package/getTeam.d.ts +0 -47
- package/getTeam.js +0 -14
- package/getTeam.js.map +1 -1
- package/getTree.d.ts +0 -45
- package/getTree.js +0 -24
- package/getTree.js.map +1 -1
- package/getUser.d.ts +0 -87
- package/getUser.js +0 -21
- package/getUser.js.map +1 -1
- package/getUsers.d.ts +0 -37
- package/getUsers.js +0 -22
- package/getUsers.js.map +1 -1
- package/index.d.ts +4 -0
- package/index.js +8 -0
- package/index.js.map +1 -1
- package/issue.d.ts +6 -117
- package/issue.js +0 -63
- package/issue.js.map +1 -1
- package/issueLabel.d.ts +0 -64
- package/issueLabel.js +0 -22
- package/issueLabel.js.map +1 -1
- package/membership.d.ts +0 -49
- package/membership.js +0 -28
- package/membership.js.map +1 -1
- package/organizationBlock.d.ts +0 -23
- package/organizationBlock.js +0 -14
- package/organizationBlock.js.map +1 -1
- package/organizationProject.d.ts +0 -38
- package/organizationProject.js +0 -14
- package/organizationProject.js.map +1 -1
- package/organizationWebhook.d.ts +0 -63
- package/organizationWebhook.js +0 -30
- package/organizationWebhook.js.map +1 -1
- package/package.json +2 -2
- package/package.json.dev +2 -2
- package/projectCard.d.ts +0 -87
- package/projectCard.js +0 -51
- package/projectCard.js.map +1 -1
- package/projectColumn.d.ts +0 -31
- package/projectColumn.js +0 -13
- package/projectColumn.js.map +1 -1
- package/repository.d.ts +3 -377
- package/repository.js +0 -47
- package/repository.js.map +1 -1
- package/repositoryAutolinkReference.d.ts +6 -40
- package/repositoryAutolinkReference.js +0 -28
- package/repositoryAutolinkReference.js.map +1 -1
- package/repositoryCollaborator.d.ts +0 -90
- package/repositoryCollaborator.js +0 -42
- package/repositoryCollaborator.js.map +1 -1
- package/repositoryDeployKey.d.ts +0 -71
- package/repositoryDeployKey.js +0 -35
- package/repositoryDeployKey.js.map +1 -1
- package/repositoryEnvironment.d.ts +0 -61
- package/repositoryEnvironment.js +0 -34
- package/repositoryEnvironment.js.map +1 -1
- package/repositoryFile.d.ts +28 -68
- package/repositoryFile.js +0 -37
- package/repositoryFile.js.map +1 -1
- package/repositoryMilestone.d.ts +3 -81
- package/repositoryMilestone.js +0 -27
- package/repositoryMilestone.js.map +1 -1
- package/repositoryProject.d.ts +0 -52
- package/repositoryProject.js +0 -19
- package/repositoryProject.js.map +1 -1
- package/repositoryPullRequest.d.ts +4 -127
- package/repositoryPullRequest.js +0 -18
- package/repositoryPullRequest.js.map +1 -1
- package/repositoryTagProtection.d.ts +44 -0
- package/repositoryTagProtection.js +59 -0
- package/repositoryTagProtection.js.map +1 -0
- package/repositoryWebhook.d.ts +0 -79
- package/repositoryWebhook.js +0 -37
- package/repositoryWebhook.js.map +1 -1
- package/team.d.ts +0 -100
- package/team.js +0 -27
- package/team.js.map +1 -1
- package/teamMembers.d.ts +0 -58
- package/teamMembers.js +0 -40
- package/teamMembers.js.map +1 -1
- package/teamMembership.d.ts +0 -67
- package/teamMembership.js +0 -37
- package/teamMembership.js.map +1 -1
- package/teamRepository.d.ts +3 -59
- package/teamRepository.js +0 -35
- package/teamRepository.js.map +1 -1
- package/teamSyncGroupMapping.d.ts +0 -36
- package/teamSyncGroupMapping.js +0 -15
- package/teamSyncGroupMapping.js.map +1 -1
- package/types/input.d.ts +0 -86
- package/types/output.d.ts +16 -237
- package/userGpgKey.d.ts +0 -40
- package/userGpgKey.js +0 -22
- package/userGpgKey.js.map +1 -1
- package/userInvitationAccepter.d.ts +0 -30
- package/userInvitationAccepter.js +0 -21
- package/userInvitationAccepter.js.map +1 -1
- package/userSshKey.d.ts +0 -50
- package/userSshKey.js +0 -26
- package/userSshKey.js.map +1 -1
package/branch.d.ts
CHANGED
|
@@ -1,42 +1,4 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
/**
|
|
3
|
-
* This resource allows you to create and manage branches within your repository.
|
|
4
|
-
*
|
|
5
|
-
* Additional constraints can be applied to ensure your branch is created from
|
|
6
|
-
* another branch or commit.
|
|
7
|
-
*
|
|
8
|
-
* ## Example Usage
|
|
9
|
-
*
|
|
10
|
-
* ```typescript
|
|
11
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
12
|
-
* import * as github from "@pulumi/github";
|
|
13
|
-
*
|
|
14
|
-
* const development = new github.Branch("development", {
|
|
15
|
-
* branch: "development",
|
|
16
|
-
* repository: "example",
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* ## Import
|
|
21
|
-
*
|
|
22
|
-
* GitHub Branch can be imported using an ID made up of `repository:branch`, e.g.
|
|
23
|
-
*
|
|
24
|
-
* ```sh
|
|
25
|
-
* $ pulumi import github:index/branch:Branch terraform terraform:main
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* Importing github branch into an instance object (when using a for each block to manage multiple branches)
|
|
29
|
-
*
|
|
30
|
-
* ```sh
|
|
31
|
-
* $ pulumi import github:index/branch:Branch terraform["terraform"] terraform:main
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* Optionally, a source branch may be specified using an ID of `repository:branch:source_branch`. This is useful for importing branches that do not branch directly off main.
|
|
35
|
-
*
|
|
36
|
-
* ```sh
|
|
37
|
-
* $ pulumi import github:index/branch:Branch terraform terraform:feature-branch:dev
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
2
|
export declare class Branch extends pulumi.CustomResource {
|
|
41
3
|
/**
|
|
42
4
|
* Get an existing Branch resource's state with the given name, ID, and optional extra
|
|
@@ -53,33 +15,12 @@ export declare class Branch extends pulumi.CustomResource {
|
|
|
53
15
|
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
54
16
|
*/
|
|
55
17
|
static isInstance(obj: any): obj is Branch;
|
|
56
|
-
/**
|
|
57
|
-
* The repository branch to create.
|
|
58
|
-
*/
|
|
59
18
|
readonly branch: pulumi.Output<string>;
|
|
60
|
-
/**
|
|
61
|
-
* An etag representing the Branch object.
|
|
62
|
-
*/
|
|
63
19
|
readonly etag: pulumi.Output<string>;
|
|
64
|
-
/**
|
|
65
|
-
* A string representing a branch reference, in the form of `refs/heads/<branch>`.
|
|
66
|
-
*/
|
|
67
20
|
readonly ref: pulumi.Output<string>;
|
|
68
|
-
/**
|
|
69
|
-
* The GitHub repository name.
|
|
70
|
-
*/
|
|
71
21
|
readonly repository: pulumi.Output<string>;
|
|
72
|
-
/**
|
|
73
|
-
* A string storing the reference's `HEAD` commit's SHA1.
|
|
74
|
-
*/
|
|
75
22
|
readonly sha: pulumi.Output<string>;
|
|
76
|
-
/**
|
|
77
|
-
* The branch name to start from. Defaults to `main`.
|
|
78
|
-
*/
|
|
79
23
|
readonly sourceBranch: pulumi.Output<string | undefined>;
|
|
80
|
-
/**
|
|
81
|
-
* The commit hash to start from. Defaults to the tip of `sourceBranch`. If provided, `sourceBranch` is ignored.
|
|
82
|
-
*/
|
|
83
24
|
readonly sourceSha: pulumi.Output<string>;
|
|
84
25
|
/**
|
|
85
26
|
* Create a Branch resource with the given unique name, arguments, and options.
|
|
@@ -94,53 +35,20 @@ export declare class Branch extends pulumi.CustomResource {
|
|
|
94
35
|
* Input properties used for looking up and filtering Branch resources.
|
|
95
36
|
*/
|
|
96
37
|
export interface BranchState {
|
|
97
|
-
/**
|
|
98
|
-
* The repository branch to create.
|
|
99
|
-
*/
|
|
100
38
|
branch?: pulumi.Input<string>;
|
|
101
|
-
/**
|
|
102
|
-
* An etag representing the Branch object.
|
|
103
|
-
*/
|
|
104
39
|
etag?: pulumi.Input<string>;
|
|
105
|
-
/**
|
|
106
|
-
* A string representing a branch reference, in the form of `refs/heads/<branch>`.
|
|
107
|
-
*/
|
|
108
40
|
ref?: pulumi.Input<string>;
|
|
109
|
-
/**
|
|
110
|
-
* The GitHub repository name.
|
|
111
|
-
*/
|
|
112
41
|
repository?: pulumi.Input<string>;
|
|
113
|
-
/**
|
|
114
|
-
* A string storing the reference's `HEAD` commit's SHA1.
|
|
115
|
-
*/
|
|
116
42
|
sha?: pulumi.Input<string>;
|
|
117
|
-
/**
|
|
118
|
-
* The branch name to start from. Defaults to `main`.
|
|
119
|
-
*/
|
|
120
43
|
sourceBranch?: pulumi.Input<string>;
|
|
121
|
-
/**
|
|
122
|
-
* The commit hash to start from. Defaults to the tip of `sourceBranch`. If provided, `sourceBranch` is ignored.
|
|
123
|
-
*/
|
|
124
44
|
sourceSha?: pulumi.Input<string>;
|
|
125
45
|
}
|
|
126
46
|
/**
|
|
127
47
|
* The set of arguments for constructing a Branch resource.
|
|
128
48
|
*/
|
|
129
49
|
export interface BranchArgs {
|
|
130
|
-
/**
|
|
131
|
-
* The repository branch to create.
|
|
132
|
-
*/
|
|
133
50
|
branch: pulumi.Input<string>;
|
|
134
|
-
/**
|
|
135
|
-
* The GitHub repository name.
|
|
136
|
-
*/
|
|
137
51
|
repository: pulumi.Input<string>;
|
|
138
|
-
/**
|
|
139
|
-
* The branch name to start from. Defaults to `main`.
|
|
140
|
-
*/
|
|
141
52
|
sourceBranch?: pulumi.Input<string>;
|
|
142
|
-
/**
|
|
143
|
-
* The commit hash to start from. Defaults to the tip of `sourceBranch`. If provided, `sourceBranch` is ignored.
|
|
144
|
-
*/
|
|
145
53
|
sourceSha?: pulumi.Input<string>;
|
|
146
54
|
}
|
package/branch.js
CHANGED
|
@@ -5,44 +5,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.Branch = 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 branches within your repository.
|
|
10
|
-
*
|
|
11
|
-
* Additional constraints can be applied to ensure your branch is created from
|
|
12
|
-
* another branch or commit.
|
|
13
|
-
*
|
|
14
|
-
* ## Example Usage
|
|
15
|
-
*
|
|
16
|
-
* ```typescript
|
|
17
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
18
|
-
* import * as github from "@pulumi/github";
|
|
19
|
-
*
|
|
20
|
-
* const development = new github.Branch("development", {
|
|
21
|
-
* branch: "development",
|
|
22
|
-
* repository: "example",
|
|
23
|
-
* });
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* ## Import
|
|
27
|
-
*
|
|
28
|
-
* GitHub Branch can be imported using an ID made up of `repository:branch`, e.g.
|
|
29
|
-
*
|
|
30
|
-
* ```sh
|
|
31
|
-
* $ pulumi import github:index/branch:Branch terraform terraform:main
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* Importing github branch into an instance object (when using a for each block to manage multiple branches)
|
|
35
|
-
*
|
|
36
|
-
* ```sh
|
|
37
|
-
* $ pulumi import github:index/branch:Branch terraform["terraform"] terraform:main
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* Optionally, a source branch may be specified using an ID of `repository:branch:source_branch`. This is useful for importing branches that do not branch directly off main.
|
|
41
|
-
*
|
|
42
|
-
* ```sh
|
|
43
|
-
* $ pulumi import github:index/branch:Branch terraform terraform:feature-branch:dev
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
8
|
class Branch extends pulumi.CustomResource {
|
|
47
9
|
constructor(name, argsOrState, opts) {
|
|
48
10
|
let resourceInputs = {};
|
package/branch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch.js","sourceRoot":"","sources":["../branch.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"branch.js","sourceRoot":"","sources":["../branch.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IA4C7C,YAAY,IAAY,EAAE,WAAsC,EAAE,IAAmC;QACjG,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI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B;AACO,mBAAY,GAAG,4BAA4B,CAAC"}
|
package/branchDefault.d.ts
CHANGED
|
@@ -1,39 +1,4 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
/**
|
|
3
|
-
* Provides a GitHub branch default resource.
|
|
4
|
-
*
|
|
5
|
-
* This resource allows you to set the default branch for a given repository.
|
|
6
|
-
*
|
|
7
|
-
* Note that use of this resource is incompatible with the `defaultBranch` option of the `github.Repository` resource. Using both will result in plans always showing a diff.
|
|
8
|
-
*
|
|
9
|
-
* ## Example Usage
|
|
10
|
-
*
|
|
11
|
-
* ```typescript
|
|
12
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
13
|
-
* import * as github from "@pulumi/github";
|
|
14
|
-
*
|
|
15
|
-
* const example = new github.Repository("example", {
|
|
16
|
-
* description: "My awesome codebase",
|
|
17
|
-
* autoInit: true,
|
|
18
|
-
* });
|
|
19
|
-
* const development = new github.Branch("development", {
|
|
20
|
-
* repository: example.name,
|
|
21
|
-
* branch: "development",
|
|
22
|
-
* });
|
|
23
|
-
* const _default = new github.BranchDefault("default", {
|
|
24
|
-
* repository: example.name,
|
|
25
|
-
* branch: development.branch,
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* ## Import
|
|
30
|
-
*
|
|
31
|
-
* GitHub Branch Defaults can be imported using an ID made up of `repository`, e.g.
|
|
32
|
-
*
|
|
33
|
-
* ```sh
|
|
34
|
-
* $ pulumi import github:index/branchDefault:BranchDefault branch_default my-repo
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
2
|
export declare class BranchDefault extends pulumi.CustomResource {
|
|
38
3
|
/**
|
|
39
4
|
* Get an existing BranchDefault resource's state with the given name, ID, and optional extra
|
|
@@ -50,13 +15,7 @@ export declare class BranchDefault extends pulumi.CustomResource {
|
|
|
50
15
|
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
51
16
|
*/
|
|
52
17
|
static isInstance(obj: any): obj is BranchDefault;
|
|
53
|
-
/**
|
|
54
|
-
* The branch (e.g. `main`)
|
|
55
|
-
*/
|
|
56
18
|
readonly branch: pulumi.Output<string>;
|
|
57
|
-
/**
|
|
58
|
-
* The GitHub repository
|
|
59
|
-
*/
|
|
60
19
|
readonly repository: pulumi.Output<string>;
|
|
61
20
|
/**
|
|
62
21
|
* Create a BranchDefault resource with the given unique name, arguments, and options.
|
|
@@ -71,25 +30,13 @@ export declare class BranchDefault extends pulumi.CustomResource {
|
|
|
71
30
|
* Input properties used for looking up and filtering BranchDefault resources.
|
|
72
31
|
*/
|
|
73
32
|
export interface BranchDefaultState {
|
|
74
|
-
/**
|
|
75
|
-
* The branch (e.g. `main`)
|
|
76
|
-
*/
|
|
77
33
|
branch?: pulumi.Input<string>;
|
|
78
|
-
/**
|
|
79
|
-
* The GitHub repository
|
|
80
|
-
*/
|
|
81
34
|
repository?: pulumi.Input<string>;
|
|
82
35
|
}
|
|
83
36
|
/**
|
|
84
37
|
* The set of arguments for constructing a BranchDefault resource.
|
|
85
38
|
*/
|
|
86
39
|
export interface BranchDefaultArgs {
|
|
87
|
-
/**
|
|
88
|
-
* The branch (e.g. `main`)
|
|
89
|
-
*/
|
|
90
40
|
branch: pulumi.Input<string>;
|
|
91
|
-
/**
|
|
92
|
-
* The GitHub repository
|
|
93
|
-
*/
|
|
94
41
|
repository: pulumi.Input<string>;
|
|
95
42
|
}
|
package/branchDefault.js
CHANGED
|
@@ -5,41 +5,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.BranchDefault = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
-
/**
|
|
9
|
-
* Provides a GitHub branch default resource.
|
|
10
|
-
*
|
|
11
|
-
* This resource allows you to set the default branch for a given repository.
|
|
12
|
-
*
|
|
13
|
-
* Note that use of this resource is incompatible with the `defaultBranch` option of the `github.Repository` resource. Using both will result in plans always showing a diff.
|
|
14
|
-
*
|
|
15
|
-
* ## Example Usage
|
|
16
|
-
*
|
|
17
|
-
* ```typescript
|
|
18
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
19
|
-
* import * as github from "@pulumi/github";
|
|
20
|
-
*
|
|
21
|
-
* const example = new github.Repository("example", {
|
|
22
|
-
* description: "My awesome codebase",
|
|
23
|
-
* autoInit: true,
|
|
24
|
-
* });
|
|
25
|
-
* const development = new github.Branch("development", {
|
|
26
|
-
* repository: example.name,
|
|
27
|
-
* branch: "development",
|
|
28
|
-
* });
|
|
29
|
-
* const _default = new github.BranchDefault("default", {
|
|
30
|
-
* repository: example.name,
|
|
31
|
-
* branch: development.branch,
|
|
32
|
-
* });
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* ## Import
|
|
36
|
-
*
|
|
37
|
-
* GitHub Branch Defaults can be imported using an ID made up of `repository`, e.g.
|
|
38
|
-
*
|
|
39
|
-
* ```sh
|
|
40
|
-
* $ pulumi import github:index/branchDefault:BranchDefault branch_default my-repo
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
8
|
class BranchDefault extends pulumi.CustomResource {
|
|
44
9
|
constructor(name, argsOrState, opts) {
|
|
45
10
|
let resourceInputs = {};
|
package/branchDefault.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branchDefault.js","sourceRoot":"","sources":["../branchDefault.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"branchDefault.js","sourceRoot":"","sources":["../branchDefault.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,aAAc,SAAQ,MAAM,CAAC,cAAc;IAuCpD,YAAY,IAAY,EAAE,WAAoD,EAAE,IAAmC;QAC/G,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,I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I,aAAa,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACpE,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,aAAa,CAAC,YAAY,CAAC;IAC9D,CAAC;;AA1BL,sCA4DC;AA9CG,gBAAgB;AACO,0BAAY,GAAG,0CAA0C,CAAC"}
|
package/branchProtection.d.ts
CHANGED
|
@@ -1,58 +1,5 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
import { input as inputs, output as outputs } from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* Protects a GitHub branch.
|
|
5
|
-
*
|
|
6
|
-
* This resource allows you to configure branch protection for repositories in your organization. When applied, the branch will be protected from forced pushes and deletion. Additional constraints, such as required status checks or restrictions on users, teams, and apps, can also be configured.
|
|
7
|
-
*
|
|
8
|
-
* ## Example Usage
|
|
9
|
-
*
|
|
10
|
-
* ```typescript
|
|
11
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
12
|
-
* import * as github from "@pulumi/github";
|
|
13
|
-
*
|
|
14
|
-
* const exampleRepository = new github.Repository("exampleRepository", {});
|
|
15
|
-
* const exampleUser = github.getUser({
|
|
16
|
-
* username: "example",
|
|
17
|
-
* });
|
|
18
|
-
* const exampleTeam = new github.Team("exampleTeam", {});
|
|
19
|
-
* // Protect the main branch of the foo repository. Additionally, require that
|
|
20
|
-
* // the "ci/travis" context to be passing and only allow the engineers team merge
|
|
21
|
-
* // to the branch.
|
|
22
|
-
* const exampleBranchProtection = new github.BranchProtection("exampleBranchProtection", {
|
|
23
|
-
* repositoryId: exampleRepository.nodeId,
|
|
24
|
-
* pattern: "main",
|
|
25
|
-
* enforceAdmins: true,
|
|
26
|
-
* allowsDeletions: true,
|
|
27
|
-
* requiredStatusChecks: [{
|
|
28
|
-
* strict: false,
|
|
29
|
-
* contexts: ["ci/travis"],
|
|
30
|
-
* }],
|
|
31
|
-
* requiredPullRequestReviews: [{
|
|
32
|
-
* dismissStaleReviews: true,
|
|
33
|
-
* restrictDismissals: true,
|
|
34
|
-
* dismissalRestrictions: [
|
|
35
|
-
* exampleUser.then(exampleUser => exampleUser.nodeId),
|
|
36
|
-
* exampleTeam.nodeId,
|
|
37
|
-
* ],
|
|
38
|
-
* }],
|
|
39
|
-
* pushRestrictions: [exampleUser.then(exampleUser => exampleUser.nodeId)],
|
|
40
|
-
* });
|
|
41
|
-
* const exampleTeamRepository = new github.TeamRepository("exampleTeamRepository", {
|
|
42
|
-
* teamId: exampleTeam.id,
|
|
43
|
-
* repository: exampleRepository.name,
|
|
44
|
-
* permission: "pull",
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* ## Import
|
|
49
|
-
*
|
|
50
|
-
* GitHub Branch Protection can be imported using an ID made up of `repository:pattern`, e.g.
|
|
51
|
-
*
|
|
52
|
-
* ```sh
|
|
53
|
-
* $ pulumi import github:index/branchProtection:BranchProtection terraform terraform:main
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
3
|
export declare class BranchProtection extends pulumi.CustomResource {
|
|
57
4
|
/**
|
|
58
5
|
* Get an existing BranchProtection resource's state with the given name, ID, and optional extra
|
|
@@ -69,53 +16,20 @@ export declare class BranchProtection extends pulumi.CustomResource {
|
|
|
69
16
|
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
70
17
|
*/
|
|
71
18
|
static isInstance(obj: any): obj is BranchProtection;
|
|
72
|
-
/**
|
|
73
|
-
* Boolean, setting this to `true` to allow the branch to be deleted.
|
|
74
|
-
*/
|
|
75
19
|
readonly allowsDeletions: pulumi.Output<boolean | undefined>;
|
|
76
|
-
/**
|
|
77
|
-
* Boolean, setting this to `true` to allow force pushes on the branch.
|
|
78
|
-
*/
|
|
79
20
|
readonly allowsForcePushes: pulumi.Output<boolean | undefined>;
|
|
80
|
-
/**
|
|
81
|
-
* Boolean, setting this to `true` to block creating the branch.
|
|
82
|
-
*/
|
|
83
21
|
readonly blocksCreations: pulumi.Output<boolean | undefined>;
|
|
84
|
-
/**
|
|
85
|
-
* Boolean, setting this to `true` enforces status checks for repository administrators.
|
|
86
|
-
*/
|
|
87
22
|
readonly enforceAdmins: pulumi.Output<boolean | undefined>;
|
|
88
|
-
/**
|
|
89
|
-
* Identifies the protection rule pattern.
|
|
90
|
-
*/
|
|
91
23
|
readonly pattern: pulumi.Output<string>;
|
|
92
|
-
/**
|
|
93
|
-
* The list of actor IDs that may push to the branch.
|
|
94
|
-
*/
|
|
95
24
|
readonly pushRestrictions: pulumi.Output<string[] | undefined>;
|
|
96
25
|
/**
|
|
97
|
-
*
|
|
26
|
+
* Node ID or name of repository
|
|
98
27
|
*/
|
|
99
28
|
readonly repositoryId: pulumi.Output<string>;
|
|
100
|
-
/**
|
|
101
|
-
* Boolean, setting this to `true` requires all conversations on code must be resolved before a pull request can be merged.
|
|
102
|
-
*/
|
|
103
29
|
readonly requireConversationResolution: pulumi.Output<boolean | undefined>;
|
|
104
|
-
/**
|
|
105
|
-
* Boolean, setting this to `true` requires all commits to be signed with GPG.
|
|
106
|
-
*/
|
|
107
30
|
readonly requireSignedCommits: pulumi.Output<boolean | undefined>;
|
|
108
|
-
/**
|
|
109
|
-
* Boolean, setting this to `true` enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch
|
|
110
|
-
*/
|
|
111
31
|
readonly requiredLinearHistory: pulumi.Output<boolean | undefined>;
|
|
112
|
-
/**
|
|
113
|
-
* Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details.
|
|
114
|
-
*/
|
|
115
32
|
readonly requiredPullRequestReviews: pulumi.Output<outputs.BranchProtectionRequiredPullRequestReview[] | undefined>;
|
|
116
|
-
/**
|
|
117
|
-
* Enforce restrictions for required status checks. See Required Status Checks below for details.
|
|
118
|
-
*/
|
|
119
33
|
readonly requiredStatusChecks: pulumi.Output<outputs.BranchProtectionRequiredStatusCheck[] | undefined>;
|
|
120
34
|
/**
|
|
121
35
|
* Create a BranchProtection resource with the given unique name, arguments, and options.
|
|
@@ -130,105 +44,39 @@ export declare class BranchProtection extends pulumi.CustomResource {
|
|
|
130
44
|
* Input properties used for looking up and filtering BranchProtection resources.
|
|
131
45
|
*/
|
|
132
46
|
export interface BranchProtectionState {
|
|
133
|
-
/**
|
|
134
|
-
* Boolean, setting this to `true` to allow the branch to be deleted.
|
|
135
|
-
*/
|
|
136
47
|
allowsDeletions?: pulumi.Input<boolean>;
|
|
137
|
-
/**
|
|
138
|
-
* Boolean, setting this to `true` to allow force pushes on the branch.
|
|
139
|
-
*/
|
|
140
48
|
allowsForcePushes?: pulumi.Input<boolean>;
|
|
141
|
-
/**
|
|
142
|
-
* Boolean, setting this to `true` to block creating the branch.
|
|
143
|
-
*/
|
|
144
49
|
blocksCreations?: pulumi.Input<boolean>;
|
|
145
|
-
/**
|
|
146
|
-
* Boolean, setting this to `true` enforces status checks for repository administrators.
|
|
147
|
-
*/
|
|
148
50
|
enforceAdmins?: pulumi.Input<boolean>;
|
|
149
|
-
/**
|
|
150
|
-
* Identifies the protection rule pattern.
|
|
151
|
-
*/
|
|
152
51
|
pattern?: pulumi.Input<string>;
|
|
153
|
-
/**
|
|
154
|
-
* The list of actor IDs that may push to the branch.
|
|
155
|
-
*/
|
|
156
52
|
pushRestrictions?: pulumi.Input<pulumi.Input<string>[]>;
|
|
157
53
|
/**
|
|
158
|
-
*
|
|
54
|
+
* Node ID or name of repository
|
|
159
55
|
*/
|
|
160
56
|
repositoryId?: pulumi.Input<string>;
|
|
161
|
-
/**
|
|
162
|
-
* Boolean, setting this to `true` requires all conversations on code must be resolved before a pull request can be merged.
|
|
163
|
-
*/
|
|
164
57
|
requireConversationResolution?: pulumi.Input<boolean>;
|
|
165
|
-
/**
|
|
166
|
-
* Boolean, setting this to `true` requires all commits to be signed with GPG.
|
|
167
|
-
*/
|
|
168
58
|
requireSignedCommits?: pulumi.Input<boolean>;
|
|
169
|
-
/**
|
|
170
|
-
* Boolean, setting this to `true` enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch
|
|
171
|
-
*/
|
|
172
59
|
requiredLinearHistory?: pulumi.Input<boolean>;
|
|
173
|
-
/**
|
|
174
|
-
* Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details.
|
|
175
|
-
*/
|
|
176
60
|
requiredPullRequestReviews?: pulumi.Input<pulumi.Input<inputs.BranchProtectionRequiredPullRequestReview>[]>;
|
|
177
|
-
/**
|
|
178
|
-
* Enforce restrictions for required status checks. See Required Status Checks below for details.
|
|
179
|
-
*/
|
|
180
61
|
requiredStatusChecks?: pulumi.Input<pulumi.Input<inputs.BranchProtectionRequiredStatusCheck>[]>;
|
|
181
62
|
}
|
|
182
63
|
/**
|
|
183
64
|
* The set of arguments for constructing a BranchProtection resource.
|
|
184
65
|
*/
|
|
185
66
|
export interface BranchProtectionArgs {
|
|
186
|
-
/**
|
|
187
|
-
* Boolean, setting this to `true` to allow the branch to be deleted.
|
|
188
|
-
*/
|
|
189
67
|
allowsDeletions?: pulumi.Input<boolean>;
|
|
190
|
-
/**
|
|
191
|
-
* Boolean, setting this to `true` to allow force pushes on the branch.
|
|
192
|
-
*/
|
|
193
68
|
allowsForcePushes?: pulumi.Input<boolean>;
|
|
194
|
-
/**
|
|
195
|
-
* Boolean, setting this to `true` to block creating the branch.
|
|
196
|
-
*/
|
|
197
69
|
blocksCreations?: pulumi.Input<boolean>;
|
|
198
|
-
/**
|
|
199
|
-
* Boolean, setting this to `true` enforces status checks for repository administrators.
|
|
200
|
-
*/
|
|
201
70
|
enforceAdmins?: pulumi.Input<boolean>;
|
|
202
|
-
/**
|
|
203
|
-
* Identifies the protection rule pattern.
|
|
204
|
-
*/
|
|
205
71
|
pattern: pulumi.Input<string>;
|
|
206
|
-
/**
|
|
207
|
-
* The list of actor IDs that may push to the branch.
|
|
208
|
-
*/
|
|
209
72
|
pushRestrictions?: pulumi.Input<pulumi.Input<string>[]>;
|
|
210
73
|
/**
|
|
211
|
-
*
|
|
74
|
+
* Node ID or name of repository
|
|
212
75
|
*/
|
|
213
76
|
repositoryId: pulumi.Input<string>;
|
|
214
|
-
/**
|
|
215
|
-
* Boolean, setting this to `true` requires all conversations on code must be resolved before a pull request can be merged.
|
|
216
|
-
*/
|
|
217
77
|
requireConversationResolution?: pulumi.Input<boolean>;
|
|
218
|
-
/**
|
|
219
|
-
* Boolean, setting this to `true` requires all commits to be signed with GPG.
|
|
220
|
-
*/
|
|
221
78
|
requireSignedCommits?: pulumi.Input<boolean>;
|
|
222
|
-
/**
|
|
223
|
-
* Boolean, setting this to `true` enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch
|
|
224
|
-
*/
|
|
225
79
|
requiredLinearHistory?: pulumi.Input<boolean>;
|
|
226
|
-
/**
|
|
227
|
-
* Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details.
|
|
228
|
-
*/
|
|
229
80
|
requiredPullRequestReviews?: pulumi.Input<pulumi.Input<inputs.BranchProtectionRequiredPullRequestReview>[]>;
|
|
230
|
-
/**
|
|
231
|
-
* Enforce restrictions for required status checks. See Required Status Checks below for details.
|
|
232
|
-
*/
|
|
233
81
|
requiredStatusChecks?: pulumi.Input<pulumi.Input<inputs.BranchProtectionRequiredStatusCheck>[]>;
|
|
234
82
|
}
|
package/branchProtection.js
CHANGED
|
@@ -5,59 +5,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.BranchProtection = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
-
/**
|
|
9
|
-
* Protects a GitHub branch.
|
|
10
|
-
*
|
|
11
|
-
* This resource allows you to configure branch protection for repositories in your organization. When applied, the branch will be protected from forced pushes and deletion. Additional constraints, such as required status checks or restrictions on users, teams, and apps, can also be configured.
|
|
12
|
-
*
|
|
13
|
-
* ## Example Usage
|
|
14
|
-
*
|
|
15
|
-
* ```typescript
|
|
16
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
17
|
-
* import * as github from "@pulumi/github";
|
|
18
|
-
*
|
|
19
|
-
* const exampleRepository = new github.Repository("exampleRepository", {});
|
|
20
|
-
* const exampleUser = github.getUser({
|
|
21
|
-
* username: "example",
|
|
22
|
-
* });
|
|
23
|
-
* const exampleTeam = new github.Team("exampleTeam", {});
|
|
24
|
-
* // Protect the main branch of the foo repository. Additionally, require that
|
|
25
|
-
* // the "ci/travis" context to be passing and only allow the engineers team merge
|
|
26
|
-
* // to the branch.
|
|
27
|
-
* const exampleBranchProtection = new github.BranchProtection("exampleBranchProtection", {
|
|
28
|
-
* repositoryId: exampleRepository.nodeId,
|
|
29
|
-
* pattern: "main",
|
|
30
|
-
* enforceAdmins: true,
|
|
31
|
-
* allowsDeletions: true,
|
|
32
|
-
* requiredStatusChecks: [{
|
|
33
|
-
* strict: false,
|
|
34
|
-
* contexts: ["ci/travis"],
|
|
35
|
-
* }],
|
|
36
|
-
* requiredPullRequestReviews: [{
|
|
37
|
-
* dismissStaleReviews: true,
|
|
38
|
-
* restrictDismissals: true,
|
|
39
|
-
* dismissalRestrictions: [
|
|
40
|
-
* exampleUser.then(exampleUser => exampleUser.nodeId),
|
|
41
|
-
* exampleTeam.nodeId,
|
|
42
|
-
* ],
|
|
43
|
-
* }],
|
|
44
|
-
* pushRestrictions: [exampleUser.then(exampleUser => exampleUser.nodeId)],
|
|
45
|
-
* });
|
|
46
|
-
* const exampleTeamRepository = new github.TeamRepository("exampleTeamRepository", {
|
|
47
|
-
* teamId: exampleTeam.id,
|
|
48
|
-
* repository: exampleRepository.name,
|
|
49
|
-
* permission: "pull",
|
|
50
|
-
* });
|
|
51
|
-
* ```
|
|
52
|
-
*
|
|
53
|
-
* ## Import
|
|
54
|
-
*
|
|
55
|
-
* GitHub Branch Protection can be imported using an ID made up of `repository:pattern`, e.g.
|
|
56
|
-
*
|
|
57
|
-
* ```sh
|
|
58
|
-
* $ pulumi import github:index/branchProtection:BranchProtection terraform terraform:main
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
8
|
class BranchProtection extends pulumi.CustomResource {
|
|
62
9
|
constructor(name, argsOrState, opts) {
|
|
63
10
|
let resourceInputs = {};
|
package/branchProtection.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branchProtection.js","sourceRoot":"","sources":["../branchProtection.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"branchProtection.js","sourceRoot":"","sources":["../branchProtection.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC,MAAa,gBAAiB,SAAQ,MAAM,CAAC,cAAc;IAoDvD,YAAY,IAAY,EAAE,WAA0D,EAAE,IAAmC;QACrH,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAgD,CAAC;YAC/D,cAAc,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9E,cAAc,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC;YAClF,cAAc,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9E,cAAc,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa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