Skip to content

Commit

Permalink
Merge pull request #226 from pulumi/stack72/v4.27.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 committed Jul 20, 2022
2 parents 8c9aa04 + 44fb458 commit 9d1ce48
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 11 deletions.
19 changes: 19 additions & 0 deletions provider/cmd/pulumi-resource-github/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2262,6 +2262,10 @@
"type": "boolean",
"description": "Boolean, setting this to `true` to allow force pushes on the branch.\n"
},
"blocksCreations": {
"type": "boolean",
"description": "Boolean, setting this to `true` to block creating the branch.\n"
},
"enforceAdmins": {
"type": "boolean",
"description": "Boolean, setting this to `true` enforces status checks for repository administrators.\n"
Expand Down Expand Up @@ -2321,6 +2325,10 @@
"type": "boolean",
"description": "Boolean, setting this to `true` to allow force pushes on the branch.\n"
},
"blocksCreations": {
"type": "boolean",
"description": "Boolean, setting this to `true` to block creating the branch.\n"
},
"enforceAdmins": {
"type": "boolean",
"description": "Boolean, setting this to `true` enforces status checks for repository administrators.\n"
Expand Down Expand Up @@ -2382,6 +2390,10 @@
"type": "boolean",
"description": "Boolean, setting this to `true` to allow force pushes on the branch.\n"
},
"blocksCreations": {
"type": "boolean",
"description": "Boolean, setting this to `true` to block creating the branch.\n"
},
"enforceAdmins": {
"type": "boolean",
"description": "Boolean, setting this to `true` enforces status checks for repository administrators.\n"
Expand Down Expand Up @@ -6060,6 +6072,10 @@
"name": {
"type": "string",
"description": "The name of the repository.\n"
},
"onlyProtectedBranches": {
"type": "boolean",
"description": ". If true, the `branches` attributes will be populated only with protected branches. Default: `false`.\n"
}
},
"type": "object"
Expand Down Expand Up @@ -6149,6 +6165,9 @@
"type": "string",
"description": "GraphQL global node id for use with v4 API\n"
},
"onlyProtectedBranches": {
"type": "boolean"
},
"pages": {
"type": "array",
"items": {
Expand Down
6 changes: 3 additions & 3 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/hashicorp/terraform-plugin-sdk v1.9.1
github.com/integrations/terraform-provider-github/v4 v4.26.1
github.com/integrations/terraform-provider-github/v4 v4.27.1
github.com/pulumi/pulumi-terraform-bridge/v3 v3.21.0
github.com/pulumi/pulumi/sdk/v3 v3.30.0
)
Expand Down Expand Up @@ -56,7 +56,7 @@ require (
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/go-github/v45 v45.1.0 // indirect
github.com/google/go-github/v45 v45.2.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/google/wire v0.5.0 // indirect
Expand Down Expand Up @@ -128,7 +128,7 @@ require (
github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/shurcooL/githubv4 v0.0.0-20220106005112-0707a5a90543 // indirect
github.com/shurcooL/githubv4 v0.0.0-20220520033151-0b4e3294ff00 // indirect
github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cobra v1.4.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github/v45 v45.1.0 h1:SbUjHMRiCe9cHfu6Me4idWxLQEV8ZW9DLPz69zopyWo=
github.com/google/go-github/v45 v45.1.0/go.mod h1:FObaZJEDSTa/WGCzZ2Z3eoCDXWJKMenWWTrd8jrta28=
github.com/google/go-github/v45 v45.2.0 h1:5oRLszbrkvxDDqBCNj2hjDZMKmvexaZ1xw/FCD+K3FI=
github.com/google/go-github/v45 v45.2.0/go.mod h1:FObaZJEDSTa/WGCzZ2Z3eoCDXWJKMenWWTrd8jrta28=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
Expand Down Expand Up @@ -571,8 +571,8 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/integrations/terraform-provider-github/v4 v4.26.1 h1:8ewBT6xQGiDVlzZCDVB9g/IPJVm2z4tW9gCmJnQHwOM=
github.com/integrations/terraform-provider-github/v4 v4.26.1/go.mod h1:PR+DOleJ7DpNssXiypAb9cIBjP1QLskNzZymq0E4OC0=
github.com/integrations/terraform-provider-github/v4 v4.27.1 h1:1O6q0qIgYMaoPKprhMvXHjx+GiXXFG+D4gAbkBM3PHs=
github.com/integrations/terraform-provider-github/v4 v4.27.1/go.mod h1:DwH4vyaULLlSRJKK5k80rpcV9JFvQUmtJ57z28XlLF4=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
Expand Down Expand Up @@ -826,8 +826,8 @@ github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX
github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc=
github.com/shirou/gopsutil/v3 v3.22.3/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM=
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
github.com/shurcooL/githubv4 v0.0.0-20220106005112-0707a5a90543 h1:TLml5yQBxKTGrjQQUt+fMcJNNIUyNH0wDeCVGyaLF+s=
github.com/shurcooL/githubv4 v0.0.0-20220106005112-0707a5a90543/go.mod h1:hAF0iLZy4td2EX+/8Tw+4nodhlMrwN3HupfaXj3zkGo=
github.com/shurcooL/githubv4 v0.0.0-20220520033151-0b4e3294ff00 h1:fiFvD4lT0aWjuuAb64LlZ/67v87m+Kc9Qsu5cMFNK0w=
github.com/shurcooL/githubv4 v0.0.0-20220520033151-0b4e3294ff00/go.mod h1:hAF0iLZy4td2EX+/8Tw+4nodhlMrwN3HupfaXj3zkGo=
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 h1:B1PEwpArrNp4dkQrfxh/abbBAOZBVp0ds+fBEOUOqOc=
Expand Down
18 changes: 18 additions & 0 deletions sdk/dotnet/BranchProtection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ public partial class BranchProtection : Pulumi.CustomResource
[Output("allowsForcePushes")]
public Output<bool?> AllowsForcePushes { get; private set; } = null!;

/// <summary>
/// Boolean, setting this to `true` to block creating the branch.
/// </summary>
[Output("blocksCreations")]
public Output<bool?> BlocksCreations { get; private set; } = null!;

/// <summary>
/// Boolean, setting this to `true` enforces status checks for repository administrators.
/// </summary>
Expand Down Expand Up @@ -218,6 +224,12 @@ public sealed class BranchProtectionArgs : Pulumi.ResourceArgs
[Input("allowsForcePushes")]
public Input<bool>? AllowsForcePushes { get; set; }

/// <summary>
/// Boolean, setting this to `true` to block creating the branch.
/// </summary>
[Input("blocksCreations")]
public Input<bool>? BlocksCreations { get; set; }

/// <summary>
/// Boolean, setting this to `true` enforces status checks for repository administrators.
/// </summary>
Expand Down Expand Up @@ -309,6 +321,12 @@ public sealed class BranchProtectionState : Pulumi.ResourceArgs
[Input("allowsForcePushes")]
public Input<bool>? AllowsForcePushes { get; set; }

/// <summary>
/// Boolean, setting this to `true` to block creating the branch.
/// </summary>
[Input("blocksCreations")]
public Input<bool>? BlocksCreations { get; set; }

/// <summary>
/// Boolean, setting this to `true` enforces status checks for repository administrators.
/// </summary>
Expand Down
16 changes: 16 additions & 0 deletions sdk/dotnet/GetRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ public sealed class GetRepositoryArgs : Pulumi.InvokeArgs
[Input("name")]
public string? Name { get; set; }

/// <summary>
/// . If true, the `branches` attributes will be populated only with protected branches. Default: `false`.
/// </summary>
[Input("onlyProtectedBranches")]
public bool? OnlyProtectedBranches { get; set; }

public GetRepositoryArgs()
{
}
Expand Down Expand Up @@ -128,6 +134,12 @@ public sealed class GetRepositoryInvokeArgs : Pulumi.InvokeArgs
[Input("name")]
public Input<string>? Name { get; set; }

/// <summary>
/// . If true, the `branches` attributes will be populated only with protected branches. Default: `false`.
/// </summary>
[Input("onlyProtectedBranches")]
public Input<bool>? OnlyProtectedBranches { get; set; }

public GetRepositoryInvokeArgs()
{
}
Expand Down Expand Up @@ -214,6 +226,7 @@ public sealed class GetRepositoryResult
/// GraphQL global node id for use with v4 API
/// </summary>
public readonly string NodeId;
public readonly bool? OnlyProtectedBranches;
/// <summary>
/// The repository's GitHub Pages configuration.
/// </summary>
Expand Down Expand Up @@ -285,6 +298,8 @@ public sealed class GetRepositoryResult

string nodeId,

bool? onlyProtectedBranches,

ImmutableArray<Outputs.GetRepositoryPageResult> pages,

bool @private,
Expand Down Expand Up @@ -319,6 +334,7 @@ public sealed class GetRepositoryResult
Id = id;
Name = name;
NodeId = nodeId;
OnlyProtectedBranches = onlyProtectedBranches;
Pages = pages;
Private = @private;
RepoId = repoId;
Expand Down
10 changes: 10 additions & 0 deletions sdk/go/github/branchProtection.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion sdk/go/github/getRepository.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions sdk/nodejs/branchProtection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ export class BranchProtection extends pulumi.CustomResource {
* Boolean, setting this to `true` to allow force pushes on the branch.
*/
public readonly allowsForcePushes!: pulumi.Output<boolean | undefined>;
/**
* Boolean, setting this to `true` to block creating the branch.
*/
public readonly blocksCreations!: pulumi.Output<boolean | undefined>;
/**
* Boolean, setting this to `true` enforces status checks for repository administrators.
*/
Expand Down Expand Up @@ -146,6 +150,7 @@ export class BranchProtection extends pulumi.CustomResource {
const state = argsOrState as BranchProtectionState | undefined;
resourceInputs["allowsDeletions"] = state ? state.allowsDeletions : undefined;
resourceInputs["allowsForcePushes"] = state ? state.allowsForcePushes : undefined;
resourceInputs["blocksCreations"] = state ? state.blocksCreations : undefined;
resourceInputs["enforceAdmins"] = state ? state.enforceAdmins : undefined;
resourceInputs["pattern"] = state ? state.pattern : undefined;
resourceInputs["pushRestrictions"] = state ? state.pushRestrictions : undefined;
Expand All @@ -165,6 +170,7 @@ export class BranchProtection extends pulumi.CustomResource {
}
resourceInputs["allowsDeletions"] = args ? args.allowsDeletions : undefined;
resourceInputs["allowsForcePushes"] = args ? args.allowsForcePushes : undefined;
resourceInputs["blocksCreations"] = args ? args.blocksCreations : undefined;
resourceInputs["enforceAdmins"] = args ? args.enforceAdmins : undefined;
resourceInputs["pattern"] = args ? args.pattern : undefined;
resourceInputs["pushRestrictions"] = args ? args.pushRestrictions : undefined;
Expand Down Expand Up @@ -192,6 +198,10 @@ export interface BranchProtectionState {
* Boolean, setting this to `true` to allow force pushes on the branch.
*/
allowsForcePushes?: pulumi.Input<boolean>;
/**
* Boolean, setting this to `true` to block creating the branch.
*/
blocksCreations?: pulumi.Input<boolean>;
/**
* Boolean, setting this to `true` enforces status checks for repository administrators.
*/
Expand Down Expand Up @@ -242,6 +252,10 @@ export interface BranchProtectionArgs {
* Boolean, setting this to `true` to allow force pushes on the branch.
*/
allowsForcePushes?: pulumi.Input<boolean>;
/**
* Boolean, setting this to `true` to block creating the branch.
*/
blocksCreations?: pulumi.Input<boolean>;
/**
* Boolean, setting this to `true` enforces status checks for repository administrators.
*/
Expand Down
10 changes: 10 additions & 0 deletions sdk/nodejs/getRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function getRepository(args?: GetRepositoryArgs, opts?: pulumi.InvokeOpti
"fullName": args.fullName,
"homepageUrl": args.homepageUrl,
"name": args.name,
"onlyProtectedBranches": args.onlyProtectedBranches,
}, opts);
}

Expand All @@ -54,6 +55,10 @@ export interface GetRepositoryArgs {
* The name of the repository.
*/
name?: string;
/**
* . If true, the `branches` attributes will be populated only with protected branches. Default: `false`.
*/
onlyProtectedBranches?: boolean;
}

/**
Expand Down Expand Up @@ -137,6 +142,7 @@ export interface GetRepositoryResult {
* GraphQL global node id for use with v4 API
*/
readonly nodeId: string;
readonly onlyProtectedBranches?: boolean;
/**
* The repository's GitHub Pages configuration.
*/
Expand Down Expand Up @@ -191,4 +197,8 @@ export interface GetRepositoryOutputArgs {
* The name of the repository.
*/
name?: pulumi.Input<string>;
/**
* . If true, the `branches` attributes will be populated only with protected branches. Default: `false`.
*/
onlyProtectedBranches?: pulumi.Input<boolean>;
}
Loading

0 comments on commit 9d1ce48

Please sign in to comment.