From e2c1ff9517242c1a2a6a17e501dc187d28d93a6e Mon Sep 17 00:00:00 2001 From: "Matthew (Matt) Jeffryes" Date: Wed, 20 Sep 2023 08:55:06 -0700 Subject: [PATCH] Upgrade terraform-provider-github to v5.36.0 (#438) Fixes #439 #430 This PR was generated via `$ upgrade-provider pulumi/pulumi-github --upstream-provider-name terraform-provider-github`. --- - Upgrading terraform-provider-github from 5.34.0 to 5.36.0. - Upgrading pulumi-terraform-bridge from v3.57.0 to v3.59.0. --- .../bridge-metadata.json | 261 + .../cmd/pulumi-resource-github/schema.json | 1062 ++- provider/go.mod | 16 +- provider/go.sum | 31 +- sdk/dotnet/ActionsSecret.cs | 2 +- sdk/dotnet/EnterpriseOrganization.cs | 25 +- .../OrganizationRulesetBypassActorArgs.cs | 38 + .../OrganizationRulesetBypassActorGetArgs.cs | 38 + .../OrganizationRulesetConditionsArgs.cs | 40 + .../OrganizationRulesetConditionsGetArgs.cs | 40 + ...rganizationRulesetConditionsRefNameArgs.cs | 44 + ...nizationRulesetConditionsRefNameGetArgs.cs | 44 + ...tionRulesetConditionsRepositoryNameArgs.cs | 47 + ...nRulesetConditionsRepositoryNameGetArgs.cs | 47 + .../Inputs/OrganizationRulesetRulesArgs.cs | 98 + ...zationRulesetRulesBranchNamePatternArgs.cs | 44 + ...ionRulesetRulesBranchNamePatternGetArgs.cs | 44 + ...ulesetRulesCommitAuthorEmailPatternArgs.cs | 44 + ...setRulesCommitAuthorEmailPatternGetArgs.cs | 44 + ...ionRulesetRulesCommitMessagePatternArgs.cs | 44 + ...RulesetRulesCommitMessagePatternGetArgs.cs | 44 + ...onRulesetRulesCommitterEmailPatternArgs.cs | 44 + ...ulesetRulesCommitterEmailPatternGetArgs.cs | 44 + .../Inputs/OrganizationRulesetRulesGetArgs.cs | 98 + ...OrganizationRulesetRulesPullRequestArgs.cs | 50 + ...anizationRulesetRulesPullRequestGetArgs.cs | 50 + ...ionRulesetRulesRequiredStatusChecksArgs.cs | 38 + ...RulesetRulesRequiredStatusChecksGetArgs.cs | 38 + ...esRequiredStatusChecksRequiredCheckArgs.cs | 32 + ...equiredStatusChecksRequiredCheckGetArgs.cs | 32 + ...anizationRulesetRulesTagNamePatternArgs.cs | 44 + ...zationRulesetRulesTagNamePatternGetArgs.cs | 44 + .../RepositoryRulesetBypassActorArgs.cs | 38 + .../RepositoryRulesetBypassActorGetArgs.cs | 38 + .../Inputs/RepositoryRulesetConditionsArgs.cs | 26 + .../RepositoryRulesetConditionsGetArgs.cs | 26 + .../RepositoryRulesetConditionsRefNameArgs.cs | 44 + ...positoryRulesetConditionsRefNameGetArgs.cs | 44 + .../Inputs/RepositoryRulesetRulesArgs.cs | 110 + ...sitoryRulesetRulesBranchNamePatternArgs.cs | 44 + ...oryRulesetRulesBranchNamePatternGetArgs.cs | 44 + ...ulesetRulesCommitAuthorEmailPatternArgs.cs | 44 + ...setRulesCommitAuthorEmailPatternGetArgs.cs | 44 + ...oryRulesetRulesCommitMessagePatternArgs.cs | 44 + ...RulesetRulesCommitMessagePatternGetArgs.cs | 44 + ...ryRulesetRulesCommitterEmailPatternArgs.cs | 44 + ...ulesetRulesCommitterEmailPatternGetArgs.cs | 44 + .../Inputs/RepositoryRulesetRulesGetArgs.cs | 110 + .../RepositoryRulesetRulesPullRequestArgs.cs | 50 + ...epositoryRulesetRulesPullRequestGetArgs.cs | 50 + ...toryRulesetRulesRequiredDeploymentsArgs.cs | 32 + ...yRulesetRulesRequiredDeploymentsGetArgs.cs | 32 + ...oryRulesetRulesRequiredStatusChecksArgs.cs | 38 + ...RulesetRulesRequiredStatusChecksGetArgs.cs | 38 + ...esRequiredStatusChecksRequiredCheckArgs.cs | 32 + ...equiredStatusChecksRequiredCheckGetArgs.cs | 32 + ...epositoryRulesetRulesTagNamePatternArgs.cs | 44 + ...sitoryRulesetRulesTagNamePatternGetArgs.cs | 44 + sdk/dotnet/OrganizationRuleset.cs | 243 + .../Outputs/OrganizationRulesetBypassActor.cs | 42 + .../Outputs/OrganizationRulesetConditions.cs | 44 + .../OrganizationRulesetConditionsRefName.cs | 35 + ...nizationRulesetConditionsRepositoryName.cs | 39 + .../Outputs/OrganizationRulesetRules.cs | 112 + ...ganizationRulesetRulesBranchNamePattern.cs | 49 + ...ionRulesetRulesCommitAuthorEmailPattern.cs | 49 + ...izationRulesetRulesCommitMessagePattern.cs | 49 + ...zationRulesetRulesCommitterEmailPattern.cs | 49 + .../OrganizationRulesetRulesPullRequest.cs | 56 + ...izationRulesetRulesRequiredStatusChecks.cs | 35 + ...tRulesRequiredStatusChecksRequiredCheck.cs | 35 + .../OrganizationRulesetRulesTagNamePattern.cs | 49 + .../Outputs/RepositoryRulesetBypassActor.cs | 42 + .../Outputs/RepositoryRulesetConditions.cs | 27 + .../RepositoryRulesetConditionsRefName.cs | 35 + sdk/dotnet/Outputs/RepositoryRulesetRules.cs | 126 + ...RepositoryRulesetRulesBranchNamePattern.cs | 49 + ...oryRulesetRulesCommitAuthorEmailPattern.cs | 49 + ...ositoryRulesetRulesCommitMessagePattern.cs | 49 + ...sitoryRulesetRulesCommitterEmailPattern.cs | 49 + .../RepositoryRulesetRulesPullRequest.cs | 56 + ...positoryRulesetRulesRequiredDeployments.cs | 27 + ...ositoryRulesetRulesRequiredStatusChecks.cs | 35 + ...tRulesRequiredStatusChecksRequiredCheck.cs | 35 + .../RepositoryRulesetRulesTagNamePattern.cs | 49 + sdk/dotnet/RepositoryRuleset.cs | 321 + sdk/dotnet/RepositoryTopics.cs | 159 + sdk/go/github/actionsSecret.go | 2 +- sdk/go/github/enterpriseOrganization.go | 24 +- sdk/go/github/init.go | 21 + sdk/go/github/organizationRuleset.go | 382 + sdk/go/github/pulumiTypes.go | 7086 +++++++++++++++-- sdk/go/github/repositoryRuleset.go | 458 ++ sdk/go/github/repositoryTopics.go | 318 + .../java/com/pulumi/github/ActionsSecret.java | 2 +- .../pulumi/github/EnterpriseOrganization.java | 21 +- .../github/EnterpriseOrganizationArgs.java | 37 + .../pulumi/github/OrganizationRuleset.java | 274 + .../github/OrganizationRulesetArgs.java | 285 + .../java/com/pulumi/github/Repository.java | 6 +- .../com/pulumi/github/RepositoryRuleset.java | 291 + .../pulumi/github/RepositoryRulesetArgs.java | 322 + .../com/pulumi/github/RepositoryTopics.java | 145 + .../pulumi/github/RepositoryTopicsArgs.java | 131 + .../inputs/EnterpriseOrganizationState.java | 37 + .../OrganizationRulesetBypassActorArgs.java | 160 + .../OrganizationRulesetConditionsArgs.java | 168 + ...anizationRulesetConditionsRefNameArgs.java | 141 + ...onRulesetConditionsRepositoryNameArgs.java | 161 + .../inputs/OrganizationRulesetRulesArgs.java | 534 ++ ...tionRulesetRulesBranchNamePatternArgs.java | 197 + ...esetRulesCommitAuthorEmailPatternArgs.java | 197 + ...nRulesetRulesCommitMessagePatternArgs.java | 197 + ...RulesetRulesCommitterEmailPatternArgs.java | 197 + ...ganizationRulesetRulesPullRequestArgs.java | 232 + ...nRulesetRulesRequiredStatusChecksArgs.java | 133 + ...RequiredStatusChecksRequiredCheckArgs.java | 122 + ...izationRulesetRulesTagNamePatternArgs.java | 197 + .../inputs/OrganizationRulesetState.java | 394 + .../RepositoryRulesetBypassActorArgs.java | 160 + .../RepositoryRulesetConditionsArgs.java | 82 + ...epositoryRulesetConditionsRefNameArgs.java | 141 + .../inputs/RepositoryRulesetRulesArgs.java | 609 ++ ...toryRulesetRulesBranchNamePatternArgs.java | 197 + ...esetRulesCommitAuthorEmailPatternArgs.java | 197 + ...yRulesetRulesCommitMessagePatternArgs.java | 197 + ...RulesetRulesCommitterEmailPatternArgs.java | 197 + ...RepositoryRulesetRulesPullRequestArgs.java | 232 + ...ryRulesetRulesRequiredDeploymentsArgs.java | 93 + ...yRulesetRulesRequiredStatusChecksArgs.java | 133 + ...RequiredStatusChecksRequiredCheckArgs.java | 122 + ...ositoryRulesetRulesTagNamePatternArgs.java | 197 + .../github/inputs/RepositoryRulesetState.java | 431 + .../github/inputs/RepositoryTopicsState.java | 131 + .../OrganizationRulesetBypassActor.java | 97 + .../OrganizationRulesetConditions.java | 102 + .../OrganizationRulesetConditionsRefName.java | 81 + ...zationRulesetConditionsRepositoryName.java | 96 + .../outputs/OrganizationRulesetRules.java | 303 + ...nizationRulesetRulesBranchNamePattern.java | 117 + ...nRulesetRulesCommitAuthorEmailPattern.java | 117 + ...ationRulesetRulesCommitMessagePattern.java | 117 + ...tionRulesetRulesCommitterEmailPattern.java | 117 + .../OrganizationRulesetRulesPullRequest.java | 137 + ...ationRulesetRulesRequiredStatusChecks.java | 81 + ...ulesRequiredStatusChecksRequiredCheck.java | 77 + ...rganizationRulesetRulesTagNamePattern.java | 117 + .../outputs/RepositoryRulesetBypassActor.java | 97 + .../outputs/RepositoryRulesetConditions.java | 54 + .../RepositoryRulesetConditionsRefName.java | 81 + .../outputs/RepositoryRulesetRules.java | 344 + ...positoryRulesetRulesBranchNamePattern.java | 117 + ...yRulesetRulesCommitAuthorEmailPattern.java | 117 + ...itoryRulesetRulesCommitMessagePattern.java | 117 + ...toryRulesetRulesCommitterEmailPattern.java | 117 + .../RepositoryRulesetRulesPullRequest.java | 137 + ...sitoryRulesetRulesRequiredDeployments.java | 58 + ...itoryRulesetRulesRequiredStatusChecks.java | 81 + ...ulesRequiredStatusChecksRequiredCheck.java | 77 + .../RepositoryRulesetRulesTagNamePattern.java | 117 + sdk/nodejs/actionsSecret.ts | 2 +- sdk/nodejs/enterpriseOrganization.ts | 21 +- sdk/nodejs/index.ts | 24 + sdk/nodejs/organizationRuleset.ts | 205 + sdk/nodejs/repository.ts | 2 +- sdk/nodejs/repositoryRuleset.ts | 254 + sdk/nodejs/repositoryTopics.ts | 128 + sdk/nodejs/tsconfig.json | 3 + sdk/nodejs/types/input.ts | 493 ++ sdk/nodejs/types/output.ts | 493 ++ sdk/python/pulumi_github/__init__.py | 27 + sdk/python/pulumi_github/_inputs.py | 2333 +++++- sdk/python/pulumi_github/actions_secret.py | 4 +- .../pulumi_github/enterprise_organization.py | 61 +- .../pulumi_github/organization_ruleset.py | 489 ++ sdk/python/pulumi_github/outputs.py | 2122 ++++- sdk/python/pulumi_github/repository.py | 2 +- .../pulumi_github/repository_ruleset.py | 604 ++ sdk/python/pulumi_github/repository_topics.py | 236 + 179 files changed, 31073 insertions(+), 1279 deletions(-) create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetBypassActorArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetBypassActorGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetConditionsArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetConditionsGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetConditionsRefNameArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetConditionsRefNameGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetConditionsRepositoryNameArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetConditionsRepositoryNameGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesBranchNamePatternArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesBranchNamePatternGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesCommitAuthorEmailPatternArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesCommitAuthorEmailPatternGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesCommitMessagePatternArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesCommitMessagePatternGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesCommitterEmailPatternArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesCommitterEmailPatternGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesPullRequestArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesPullRequestGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckGetArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesTagNamePatternArgs.cs create mode 100644 sdk/dotnet/Inputs/OrganizationRulesetRulesTagNamePatternGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetBypassActorArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetBypassActorGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetConditionsArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetConditionsGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetConditionsRefNameArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetConditionsRefNameGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesBranchNamePatternArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesBranchNamePatternGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesCommitAuthorEmailPatternArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesCommitAuthorEmailPatternGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesCommitMessagePatternArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesCommitMessagePatternGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesCommitterEmailPatternArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesCommitterEmailPatternGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesPullRequestArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesPullRequestGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredDeploymentsArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredDeploymentsGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckGetArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesTagNamePatternArgs.cs create mode 100644 sdk/dotnet/Inputs/RepositoryRulesetRulesTagNamePatternGetArgs.cs create mode 100644 sdk/dotnet/OrganizationRuleset.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetBypassActor.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetConditions.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetConditionsRefName.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetConditionsRepositoryName.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetRules.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetRulesBranchNamePattern.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetRulesCommitAuthorEmailPattern.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetRulesCommitMessagePattern.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetRulesCommitterEmailPattern.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetRulesPullRequest.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetRulesRequiredStatusChecks.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheck.cs create mode 100644 sdk/dotnet/Outputs/OrganizationRulesetRulesTagNamePattern.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetBypassActor.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetConditions.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetConditionsRefName.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetRules.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetRulesBranchNamePattern.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetRulesCommitAuthorEmailPattern.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetRulesCommitMessagePattern.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetRulesCommitterEmailPattern.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetRulesPullRequest.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredDeployments.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecks.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheck.cs create mode 100644 sdk/dotnet/Outputs/RepositoryRulesetRulesTagNamePattern.cs create mode 100644 sdk/dotnet/RepositoryRuleset.cs create mode 100644 sdk/dotnet/RepositoryTopics.cs create mode 100644 sdk/go/github/organizationRuleset.go create mode 100644 sdk/go/github/repositoryRuleset.go create mode 100644 sdk/go/github/repositoryTopics.go create mode 100644 sdk/java/src/main/java/com/pulumi/github/OrganizationRuleset.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/OrganizationRulesetArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/RepositoryRuleset.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/RepositoryRulesetArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/RepositoryTopics.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/RepositoryTopicsArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetBypassActorArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsRefNameArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsRepositoryNameArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesBranchNamePatternArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitAuthorEmailPatternArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitMessagePatternArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitterEmailPatternArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesPullRequestArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesRequiredStatusChecksArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesTagNamePatternArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetState.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetBypassActorArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetConditionsArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetConditionsRefNameArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesBranchNamePatternArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitAuthorEmailPatternArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitMessagePatternArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitterEmailPatternArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesPullRequestArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredDeploymentsArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesTagNamePatternArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetState.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryTopicsState.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetBypassActor.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditions.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditionsRefName.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditionsRepositoryName.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRules.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesBranchNamePattern.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitAuthorEmailPattern.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitMessagePattern.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitterEmailPattern.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesPullRequest.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesRequiredStatusChecks.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheck.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesTagNamePattern.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetBypassActor.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetConditions.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetConditionsRefName.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRules.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesBranchNamePattern.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitAuthorEmailPattern.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitMessagePattern.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitterEmailPattern.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesPullRequest.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredDeployments.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecks.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheck.java create mode 100644 sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesTagNamePattern.java create mode 100644 sdk/nodejs/organizationRuleset.ts create mode 100644 sdk/nodejs/repositoryRuleset.ts create mode 100644 sdk/nodejs/repositoryTopics.ts create mode 100644 sdk/python/pulumi_github/organization_ruleset.py create mode 100644 sdk/python/pulumi_github/repository_ruleset.py create mode 100644 sdk/python/pulumi_github/repository_topics.py diff --git a/provider/cmd/pulumi-resource-github/bridge-metadata.json b/provider/cmd/pulumi-resource-github/bridge-metadata.json index 385a4a71..5e97aa2d 100644 --- a/provider/cmd/pulumi-resource-github/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-github/bridge-metadata.json @@ -309,6 +309,85 @@ "github_organization_project": { "current": "github:index/organizationProject:OrganizationProject" }, + "github_organization_ruleset": { + "current": "github:index/organizationRuleset:OrganizationRuleset", + "fields": { + "bypass_actors": { + "maxItemsOne": false + }, + "conditions": { + "maxItemsOne": true, + "elem": { + "fields": { + "ref_name": { + "maxItemsOne": true, + "elem": { + "fields": { + "exclude": { + "maxItemsOne": false + }, + "include": { + "maxItemsOne": false + } + } + } + }, + "repository_id": { + "maxItemsOne": true + }, + "repository_name": { + "maxItemsOne": true, + "elem": { + "fields": { + "exclude": { + "maxItemsOne": false + }, + "inlcude": { + "maxItemsOne": false + } + } + } + } + } + } + }, + "rules": { + "maxItemsOne": true, + "elem": { + "fields": { + "branch_name_pattern": { + "maxItemsOne": true + }, + "commit_author_email_pattern": { + "maxItemsOne": true + }, + "commit_message_pattern": { + "maxItemsOne": true + }, + "committer_email_pattern": { + "maxItemsOne": true + }, + "pull_request": { + "maxItemsOne": true + }, + "required_status_checks": { + "maxItemsOne": true, + "elem": { + "fields": { + "required_check": { + "maxItemsOne": false + } + } + } + }, + "tag_name_pattern": { + "maxItemsOne": true + } + } + } + } + } + }, "github_organization_security_manager": { "current": "github:index/organizationSecurityManager:OrganizationSecurityManager" }, @@ -439,9 +518,90 @@ } } }, + "github_repository_ruleset": { + "current": "github:index/repositoryRuleset:RepositoryRuleset", + "fields": { + "bypass_actors": { + "maxItemsOne": false + }, + "conditions": { + "maxItemsOne": true, + "elem": { + "fields": { + "ref_name": { + "maxItemsOne": true, + "elem": { + "fields": { + "exclude": { + "maxItemsOne": false + }, + "include": { + "maxItemsOne": false + } + } + } + } + } + } + }, + "rules": { + "maxItemsOne": true, + "elem": { + "fields": { + "branch_name_pattern": { + "maxItemsOne": true + }, + "commit_author_email_pattern": { + "maxItemsOne": true + }, + "commit_message_pattern": { + "maxItemsOne": true + }, + "committer_email_pattern": { + "maxItemsOne": true + }, + "pull_request": { + "maxItemsOne": true + }, + "required_deployments": { + "maxItemsOne": true, + "elem": { + "fields": { + "required_deployment_environments": { + "maxItemsOne": false + } + } + } + }, + "required_status_checks": { + "maxItemsOne": true, + "elem": { + "fields": { + "required_check": { + "maxItemsOne": false + } + } + } + }, + "tag_name_pattern": { + "maxItemsOne": true + } + } + } + } + } + }, "github_repository_tag_protection": { "current": "github:index/repositoryTagProtection:RepositoryTagProtection" }, + "github_repository_topics": { + "current": "github:index/repositoryTopics:RepositoryTopics", + "fields": { + "topics": { + "maxItemsOne": false + } + } + }, "github_repository_webhook": { "current": "github:index/repositoryWebhook:RepositoryWebhook", "fields": { @@ -1060,6 +1220,7 @@ "github:index/organizationBlock:OrganizationBlock": "github_organization_block", "github:index/organizationCustomRole:OrganizationCustomRole": "github_organization_custom_role", "github:index/organizationProject:OrganizationProject": "github_organization_project", + "github:index/organizationRuleset:OrganizationRuleset": "github_organization_ruleset", "github:index/organizationSecurityManager:OrganizationSecurityManager": "github_organization_security_manager", "github:index/organizationSettings:OrganizationSettings": "github_organization_settings", "github:index/organizationWebhook:OrganizationWebhook": "github_organization_webhook", @@ -1079,7 +1240,9 @@ "github:index/repositoryMilestone:RepositoryMilestone": "github_repository_milestone", "github:index/repositoryProject:RepositoryProject": "github_repository_project", "github:index/repositoryPullRequest:RepositoryPullRequest": "github_repository_pull_request", + "github:index/repositoryRuleset:RepositoryRuleset": "github_repository_ruleset", "github:index/repositoryTagProtection:RepositoryTagProtection": "github_repository_tag_protection", + "github:index/repositoryTopics:RepositoryTopics": "github_repository_topics", "github:index/repositoryWebhook:RepositoryWebhook": "github_repository_webhook", "github:index/team:Team": "github_team", "github:index/teamMembers:TeamMembers": "github_team_members", @@ -1193,6 +1356,50 @@ "github:index/BranchProtectionV3RequiredStatusChecks:BranchProtectionV3RequiredStatusChecks": { "includeAdmins": "include_admins" }, + "github:index/OrganizationRulesetBypassActor:OrganizationRulesetBypassActor": { + "actorId": "actor_id", + "actorType": "actor_type", + "bypassMode": "bypass_mode" + }, + "github:index/OrganizationRulesetConditions:OrganizationRulesetConditions": { + "refName": "ref_name", + "repositoryId": "repository_id", + "repositoryName": "repository_name" + }, + "github:index/OrganizationRulesetConditionsRefName:OrganizationRulesetConditionsRefName": { + "excludes": "exclude", + "includes": "include" + }, + "github:index/OrganizationRulesetConditionsRepositoryName:OrganizationRulesetConditionsRepositoryName": { + "excludes": "exclude", + "inlcudes": "inlcude" + }, + "github:index/OrganizationRulesetRules:OrganizationRulesetRules": { + "branchNamePattern": "branch_name_pattern", + "commitAuthorEmailPattern": "commit_author_email_pattern", + "commitMessagePattern": "commit_message_pattern", + "committerEmailPattern": "committer_email_pattern", + "nonFastForward": "non_fast_forward", + "pullRequest": "pull_request", + "requiredLinearHistory": "required_linear_history", + "requiredSignatures": "required_signatures", + "requiredStatusChecks": "required_status_checks", + "tagNamePattern": "tag_name_pattern" + }, + "github:index/OrganizationRulesetRulesPullRequest:OrganizationRulesetRulesPullRequest": { + "dismissStaleReviewsOnPush": "dismiss_stale_reviews_on_push", + "requireCodeOwnerReview": "require_code_owner_review", + "requireLastPushApproval": "require_last_push_approval", + "requiredApprovingReviewCount": "required_approving_review_count", + "requiredReviewThreadResolution": "required_review_thread_resolution" + }, + "github:index/OrganizationRulesetRulesRequiredStatusChecks:OrganizationRulesetRulesRequiredStatusChecks": { + "requiredChecks": "required_check", + "strictRequiredStatusChecksPolicy": "strict_required_status_checks_policy" + }, + "github:index/OrganizationRulesetRulesRequiredStatusChecksRequiredCheck:OrganizationRulesetRulesRequiredStatusChecksRequiredCheck": { + "integrationId": "integration_id" + }, "github:index/OrganizationWebhookConfiguration:OrganizationWebhookConfiguration": { "contentType": "content_type", "insecureSsl": "insecure_ssl" @@ -1213,6 +1420,49 @@ "custom404": "custom_404", "htmlUrl": "html_url" }, + "github:index/RepositoryRulesetBypassActor:RepositoryRulesetBypassActor": { + "actorId": "actor_id", + "actorType": "actor_type", + "bypassMode": "bypass_mode" + }, + "github:index/RepositoryRulesetConditions:RepositoryRulesetConditions": { + "refName": "ref_name" + }, + "github:index/RepositoryRulesetConditionsRefName:RepositoryRulesetConditionsRefName": { + "excludes": "exclude", + "includes": "include" + }, + "github:index/RepositoryRulesetRules:RepositoryRulesetRules": { + "branchNamePattern": "branch_name_pattern", + "commitAuthorEmailPattern": "commit_author_email_pattern", + "commitMessagePattern": "commit_message_pattern", + "committerEmailPattern": "committer_email_pattern", + "nonFastForward": "non_fast_forward", + "pullRequest": "pull_request", + "requiredDeployments": "required_deployments", + "requiredLinearHistory": "required_linear_history", + "requiredSignatures": "required_signatures", + "requiredStatusChecks": "required_status_checks", + "tagNamePattern": "tag_name_pattern", + "updateAllowsFetchAndMerge": "update_allows_fetch_and_merge" + }, + "github:index/RepositoryRulesetRulesPullRequest:RepositoryRulesetRulesPullRequest": { + "dismissStaleReviewsOnPush": "dismiss_stale_reviews_on_push", + "requireCodeOwnerReview": "require_code_owner_review", + "requireLastPushApproval": "require_last_push_approval", + "requiredApprovingReviewCount": "required_approving_review_count", + "requiredReviewThreadResolution": "required_review_thread_resolution" + }, + "github:index/RepositoryRulesetRulesRequiredDeployments:RepositoryRulesetRulesRequiredDeployments": { + "requiredDeploymentEnvironments": "required_deployment_environments" + }, + "github:index/RepositoryRulesetRulesRequiredStatusChecks:RepositoryRulesetRulesRequiredStatusChecks": { + "requiredChecks": "required_check", + "strictRequiredStatusChecksPolicy": "strict_required_status_checks_policy" + }, + "github:index/RepositoryRulesetRulesRequiredStatusChecksRequiredCheck:RepositoryRulesetRulesRequiredStatusChecksRequiredCheck": { + "integrationId": "integration_id" + }, "github:index/RepositorySecurityAndAnalysis:RepositorySecurityAndAnalysis": { "advancedSecurity": "advanced_security", "secretScanning": "secret_scanning", @@ -1390,6 +1640,7 @@ "github:index/enterpriseOrganization:EnterpriseOrganization": { "adminLogins": "admin_logins", "billingEmail": "billing_email", + "displayName": "display_name", "enterpriseId": "enterprise_id" }, "github:index/getActionsEnvironmentSecrets:getActionsEnvironmentSecrets": { @@ -1764,6 +2015,11 @@ "github:index/organizationCustomRole:OrganizationCustomRole": { "baseRole": "base_role" }, + "github:index/organizationRuleset:OrganizationRuleset": { + "bypassActors": "bypass_actors", + "nodeId": "node_id", + "rulesetId": "ruleset_id" + }, "github:index/organizationSecurityManager:OrganizationSecurityManager": { "teamSlug": "team_slug" }, @@ -1889,6 +2145,11 @@ "openedBy": "opened_by", "updatedAt": "updated_at" }, + "github:index/repositoryRuleset:RepositoryRuleset": { + "bypassActors": "bypass_actors", + "nodeId": "node_id", + "rulesetId": "ruleset_id" + }, "github:index/repositoryTagProtection:RepositoryTagProtection": { "tagProtectionId": "tag_protection_id" }, diff --git a/provider/cmd/pulumi-resource-github/schema.json b/provider/cmd/pulumi-resource-github/schema.json index fe38a56a..47652bdd 100644 --- a/provider/cmd/pulumi-resource-github/schema.json +++ b/provider/cmd/pulumi-resource-github/schema.json @@ -354,6 +354,338 @@ }, "type": "object" }, + "github:index/OrganizationRulesetBypassActor:OrganizationRulesetBypassActor": { + "properties": { + "actorId": { + "type": "integer", + "description": "(Number) The ID of the actor that can bypass a ruleset\n" + }, + "actorType": { + "type": "string", + "description": "The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`.\n" + }, + "bypassMode": { + "type": "string", + "description": "(String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`.\n" + } + }, + "type": "object", + "required": [ + "actorId", + "actorType" + ] + }, + "github:index/OrganizationRulesetConditions:OrganizationRulesetConditions": { + "properties": { + "refName": { + "$ref": "#/types/github:index/OrganizationRulesetConditionsRefName:OrganizationRulesetConditionsRefName", + "description": "(Block List, Min: 1, Max: 1) (see below for nested schema)\n" + }, + "repositoryId": { + "type": "integer", + "description": "The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`.\n" + }, + "repositoryName": { + "$ref": "#/types/github:index/OrganizationRulesetConditionsRepositoryName:OrganizationRulesetConditionsRepositoryName", + "description": "Conflicts with `repository_id`. (see below for nested schema)\n\nOne of `repository_id` and `repository_name` must be set for the rule to target any repositories.\n" + } + }, + "type": "object", + "required": [ + "refName" + ] + }, + "github:index/OrganizationRulesetConditionsRefName:OrganizationRulesetConditionsRefName": { + "properties": { + "excludes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "(List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\n" + }, + "includes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "(List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.\n" + } + }, + "type": "object", + "required": [ + "excludes", + "includes" + ] + }, + "github:index/OrganizationRulesetConditionsRepositoryName:OrganizationRulesetConditionsRepositoryName": { + "properties": { + "excludes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "(List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\n" + }, + "inlcudes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "(List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories.\n" + }, + "protected": { + "type": "boolean" + } + }, + "type": "object", + "required": [ + "excludes", + "inlcudes" + ] + }, + "github:index/OrganizationRulesetRules:OrganizationRulesetRules": { + "properties": { + "branchNamePattern": { + "$ref": "#/types/github:index/OrganizationRulesetRulesBranchNamePattern:OrganizationRulesetRulesBranchNamePattern", + "description": "(Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema)\n" + }, + "commitAuthorEmailPattern": { + "$ref": "#/types/github:index/OrganizationRulesetRulesCommitAuthorEmailPattern:OrganizationRulesetRulesCommitAuthorEmailPattern", + "description": "(Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)\n" + }, + "commitMessagePattern": { + "$ref": "#/types/github:index/OrganizationRulesetRulesCommitMessagePattern:OrganizationRulesetRulesCommitMessagePattern", + "description": "(Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)\n" + }, + "committerEmailPattern": { + "$ref": "#/types/github:index/OrganizationRulesetRulesCommitterEmailPattern:OrganizationRulesetRulesCommitterEmailPattern", + "description": "(Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)\n" + }, + "creation": { + "type": "boolean", + "description": "(Boolean) Only allow users with bypass permission to create matching refs.\n" + }, + "deletion": { + "type": "boolean", + "description": "(Boolean) Only allow users with bypass permissions to delete matching refs.\n" + }, + "nonFastForward": { + "type": "boolean", + "description": "(Boolean) Prevent users with push access from force pushing to branches.\n" + }, + "pullRequest": { + "$ref": "#/types/github:index/OrganizationRulesetRulesPullRequest:OrganizationRulesetRulesPullRequest", + "description": "(Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema)\n" + }, + "requiredLinearHistory": { + "type": "boolean", + "description": "(Boolean) Prevent merge commits from being pushed to matching branches.\n" + }, + "requiredSignatures": { + "type": "boolean", + "description": "(Boolean) Commits pushed to matching branches must have verified signatures.\n" + }, + "requiredStatusChecks": { + "$ref": "#/types/github:index/OrganizationRulesetRulesRequiredStatusChecks:OrganizationRulesetRulesRequiredStatusChecks", + "description": "(Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema)\n" + }, + "tagNamePattern": { + "$ref": "#/types/github:index/OrganizationRulesetRulesTagNamePattern:OrganizationRulesetRulesTagNamePattern", + "description": "(Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema)\n" + }, + "update": { + "type": "boolean", + "description": "(Boolean) Only allow users with bypass permission to update matching refs.\n" + } + }, + "type": "object" + }, + "github:index/OrganizationRulesetRulesBranchNamePattern:OrganizationRulesetRulesBranchNamePattern": { + "properties": { + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "negate": { + "type": "boolean", + "description": "(Boolean) If true, the rule will fail if the pattern matches.\n" + }, + "operator": { + "type": "string", + "description": "(String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.\n" + }, + "pattern": { + "type": "string", + "description": "(String) The pattern to match with.\n" + } + }, + "type": "object", + "required": [ + "operator", + "pattern" + ] + }, + "github:index/OrganizationRulesetRulesCommitAuthorEmailPattern:OrganizationRulesetRulesCommitAuthorEmailPattern": { + "properties": { + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "negate": { + "type": "boolean", + "description": "(Boolean) If true, the rule will fail if the pattern matches.\n" + }, + "operator": { + "type": "string", + "description": "(String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.\n" + }, + "pattern": { + "type": "string", + "description": "(String) The pattern to match with.\n" + } + }, + "type": "object", + "required": [ + "operator", + "pattern" + ] + }, + "github:index/OrganizationRulesetRulesCommitMessagePattern:OrganizationRulesetRulesCommitMessagePattern": { + "properties": { + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "negate": { + "type": "boolean", + "description": "(Boolean) If true, the rule will fail if the pattern matches.\n" + }, + "operator": { + "type": "string", + "description": "(String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.\n" + }, + "pattern": { + "type": "string", + "description": "(String) The pattern to match with.\n" + } + }, + "type": "object", + "required": [ + "operator", + "pattern" + ] + }, + "github:index/OrganizationRulesetRulesCommitterEmailPattern:OrganizationRulesetRulesCommitterEmailPattern": { + "properties": { + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "negate": { + "type": "boolean", + "description": "(Boolean) If true, the rule will fail if the pattern matches.\n" + }, + "operator": { + "type": "string", + "description": "(String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.\n" + }, + "pattern": { + "type": "string", + "description": "(String) The pattern to match with.\n" + } + }, + "type": "object", + "required": [ + "operator", + "pattern" + ] + }, + "github:index/OrganizationRulesetRulesPullRequest:OrganizationRulesetRulesPullRequest": { + "properties": { + "dismissStaleReviewsOnPush": { + "type": "boolean", + "description": "(Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`.\n" + }, + "requireCodeOwnerReview": { + "type": "boolean", + "description": "(Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`.\n" + }, + "requireLastPushApproval": { + "type": "boolean", + "description": "(Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`.\n" + }, + "requiredApprovingReviewCount": { + "type": "integer", + "description": "(Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`.\n" + }, + "requiredReviewThreadResolution": { + "type": "boolean", + "description": "(Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`.\n" + } + }, + "type": "object" + }, + "github:index/OrganizationRulesetRulesRequiredStatusChecks:OrganizationRulesetRulesRequiredStatusChecks": { + "properties": { + "requiredChecks": { + "type": "array", + "items": { + "$ref": "#/types/github:index/OrganizationRulesetRulesRequiredStatusChecksRequiredCheck:OrganizationRulesetRulesRequiredStatusChecksRequiredCheck" + }, + "description": "(Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema)\n" + }, + "strictRequiredStatusChecksPolicy": { + "type": "boolean", + "description": "(Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`.\n" + } + }, + "type": "object", + "required": [ + "requiredChecks" + ] + }, + "github:index/OrganizationRulesetRulesRequiredStatusChecksRequiredCheck:OrganizationRulesetRulesRequiredStatusChecksRequiredCheck": { + "properties": { + "context": { + "type": "string", + "description": "(String) The status check context name that must be present on the commit.\n" + }, + "integrationId": { + "type": "integer", + "description": "(Number) The optional integration ID that this status check must originate from.\n" + } + }, + "type": "object", + "required": [ + "context" + ] + }, + "github:index/OrganizationRulesetRulesTagNamePattern:OrganizationRulesetRulesTagNamePattern": { + "properties": { + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "negate": { + "type": "boolean", + "description": "(Boolean) If true, the rule will fail if the pattern matches.\n" + }, + "operator": { + "type": "string", + "description": "(String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.\n" + }, + "pattern": { + "type": "string", + "description": "(String) The pattern to match with.\n" + } + }, + "type": "object", + "required": [ + "operator", + "pattern" + ] + }, "github:index/OrganizationWebhookConfiguration:OrganizationWebhookConfiguration": { "properties": { "contentType": { @@ -479,52 +811,373 @@ "type": "string", "description": "The custom domain for the repository. This can only be set after the repository has been created.\n" }, - "custom404": { + "custom404": { + "type": "boolean", + "description": "Whether the rendered GitHub Pages site has a custom 404 page.\n" + }, + "htmlUrl": { + "type": "string", + "description": "The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`.\n" + }, + "source": { + "$ref": "#/types/github:index/RepositoryPagesSource:RepositoryPagesSource", + "description": "The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details.\n" + }, + "status": { + "type": "string", + "description": "Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`.\n" + }, + "url": { + "type": "string" + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "custom404", + "htmlUrl", + "status", + "url" + ] + } + } + }, + "github:index/RepositoryPagesSource:RepositoryPagesSource": { + "properties": { + "branch": { + "type": "string", + "description": "The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`.\n" + }, + "path": { + "type": "string", + "description": "The repository directory from which the site publishes (Default: `/`).\n" + } + }, + "type": "object", + "required": [ + "branch" + ] + }, + "github:index/RepositoryRulesetBypassActor:RepositoryRulesetBypassActor": { + "properties": { + "actorId": { + "type": "integer", + "description": "(Number) The ID of the actor that can bypass a ruleset\n" + }, + "actorType": { + "type": "string", + "description": "The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`.\n" + }, + "bypassMode": { + "type": "string", + "description": "(String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`.\n" + } + }, + "type": "object", + "required": [ + "actorId", + "actorType" + ] + }, + "github:index/RepositoryRulesetConditions:RepositoryRulesetConditions": { + "properties": { + "refName": { + "$ref": "#/types/github:index/RepositoryRulesetConditionsRefName:RepositoryRulesetConditionsRefName", + "description": "(Block List, Min: 1, Max: 1) (see below for nested schema)\n" + } + }, + "type": "object", + "required": [ + "refName" + ] + }, + "github:index/RepositoryRulesetConditionsRefName:RepositoryRulesetConditionsRefName": { + "properties": { + "excludes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "(List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\n" + }, + "includes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "(List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches.\n" + } + }, + "type": "object", + "required": [ + "excludes", + "includes" + ] + }, + "github:index/RepositoryRulesetRules:RepositoryRulesetRules": { + "properties": { + "branchNamePattern": { + "$ref": "#/types/github:index/RepositoryRulesetRulesBranchNamePattern:RepositoryRulesetRulesBranchNamePattern", + "description": "(Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema)\n" + }, + "commitAuthorEmailPattern": { + "$ref": "#/types/github:index/RepositoryRulesetRulesCommitAuthorEmailPattern:RepositoryRulesetRulesCommitAuthorEmailPattern", + "description": "(Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)\n" + }, + "commitMessagePattern": { + "$ref": "#/types/github:index/RepositoryRulesetRulesCommitMessagePattern:RepositoryRulesetRulesCommitMessagePattern", + "description": "(Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)\n" + }, + "committerEmailPattern": { + "$ref": "#/types/github:index/RepositoryRulesetRulesCommitterEmailPattern:RepositoryRulesetRulesCommitterEmailPattern", + "description": "(Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)\n" + }, + "creation": { + "type": "boolean", + "description": "(Boolean) Only allow users with bypass permission to create matching refs.\n" + }, + "deletion": { + "type": "boolean", + "description": "(Boolean) Only allow users with bypass permissions to delete matching refs.\n" + }, + "nonFastForward": { + "type": "boolean", + "description": "(Boolean) Prevent users with push access from force pushing to branches.\n" + }, + "pullRequest": { + "$ref": "#/types/github:index/RepositoryRulesetRulesPullRequest:RepositoryRulesetRulesPullRequest", + "description": "(Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema)\n" + }, + "requiredDeployments": { + "$ref": "#/types/github:index/RepositoryRulesetRulesRequiredDeployments:RepositoryRulesetRulesRequiredDeployments", + "description": "(Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema)\n" + }, + "requiredLinearHistory": { + "type": "boolean", + "description": "(Boolean) Prevent merge commits from being pushed to matching branches.\n" + }, + "requiredSignatures": { + "type": "boolean", + "description": "(Boolean) Commits pushed to matching branches must have verified signatures.\n" + }, + "requiredStatusChecks": { + "$ref": "#/types/github:index/RepositoryRulesetRulesRequiredStatusChecks:RepositoryRulesetRulesRequiredStatusChecks", + "description": "(Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema)\n" + }, + "tagNamePattern": { + "$ref": "#/types/github:index/RepositoryRulesetRulesTagNamePattern:RepositoryRulesetRulesTagNamePattern", + "description": "(Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema)\n" + }, + "update": { + "type": "boolean", + "description": "(Boolean) Only allow users with bypass permission to update matching refs.\n" + }, + "updateAllowsFetchAndMerge": { + "type": "boolean", + "description": "(Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter.\n" + } + }, + "type": "object" + }, + "github:index/RepositoryRulesetRulesBranchNamePattern:RepositoryRulesetRulesBranchNamePattern": { + "properties": { + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "negate": { + "type": "boolean", + "description": "(Boolean) If true, the rule will fail if the pattern matches.\n" + }, + "operator": { + "type": "string", + "description": "(String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.\n" + }, + "pattern": { + "type": "string", + "description": "(String) The pattern to match with.\n" + } + }, + "type": "object", + "required": [ + "operator", + "pattern" + ] + }, + "github:index/RepositoryRulesetRulesCommitAuthorEmailPattern:RepositoryRulesetRulesCommitAuthorEmailPattern": { + "properties": { + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "negate": { + "type": "boolean", + "description": "(Boolean) If true, the rule will fail if the pattern matches.\n" + }, + "operator": { + "type": "string", + "description": "(String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.\n" + }, + "pattern": { + "type": "string", + "description": "(String) The pattern to match with.\n" + } + }, + "type": "object", + "required": [ + "operator", + "pattern" + ] + }, + "github:index/RepositoryRulesetRulesCommitMessagePattern:RepositoryRulesetRulesCommitMessagePattern": { + "properties": { + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "negate": { + "type": "boolean", + "description": "(Boolean) If true, the rule will fail if the pattern matches.\n" + }, + "operator": { + "type": "string", + "description": "(String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.\n" + }, + "pattern": { + "type": "string", + "description": "(String) The pattern to match with.\n" + } + }, + "type": "object", + "required": [ + "operator", + "pattern" + ] + }, + "github:index/RepositoryRulesetRulesCommitterEmailPattern:RepositoryRulesetRulesCommitterEmailPattern": { + "properties": { + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "negate": { + "type": "boolean", + "description": "(Boolean) If true, the rule will fail if the pattern matches.\n" + }, + "operator": { + "type": "string", + "description": "(String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.\n" + }, + "pattern": { + "type": "string", + "description": "(String) The pattern to match with.\n" + } + }, + "type": "object", + "required": [ + "operator", + "pattern" + ] + }, + "github:index/RepositoryRulesetRulesPullRequest:RepositoryRulesetRulesPullRequest": { + "properties": { + "dismissStaleReviewsOnPush": { + "type": "boolean", + "description": "(Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`.\n" + }, + "requireCodeOwnerReview": { + "type": "boolean", + "description": "(Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`.\n" + }, + "requireLastPushApproval": { + "type": "boolean", + "description": "(Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`.\n" + }, + "requiredApprovingReviewCount": { + "type": "integer", + "description": "(Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`.\n" + }, + "requiredReviewThreadResolution": { + "type": "boolean", + "description": "(Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`.\n" + } + }, + "type": "object" + }, + "github:index/RepositoryRulesetRulesRequiredDeployments:RepositoryRulesetRulesRequiredDeployments": { + "properties": { + "requiredDeploymentEnvironments": { + "type": "array", + "items": { + "type": "string" + }, + "description": "(List of String) The environments that must be successfully deployed to before branches can be merged.\n" + } + }, + "type": "object", + "required": [ + "requiredDeploymentEnvironments" + ] + }, + "github:index/RepositoryRulesetRulesRequiredStatusChecks:RepositoryRulesetRulesRequiredStatusChecks": { + "properties": { + "requiredChecks": { + "type": "array", + "items": { + "$ref": "#/types/github:index/RepositoryRulesetRulesRequiredStatusChecksRequiredCheck:RepositoryRulesetRulesRequiredStatusChecksRequiredCheck" + }, + "description": "(Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema)\n" + }, + "strictRequiredStatusChecksPolicy": { "type": "boolean", - "description": "Whether the rendered GitHub Pages site has a custom 404 page.\n" - }, - "htmlUrl": { - "type": "string", - "description": "The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`.\n" - }, - "source": { - "$ref": "#/types/github:index/RepositoryPagesSource:RepositoryPagesSource", - "description": "The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details.\n" - }, - "status": { + "description": "(Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`.\n" + } + }, + "type": "object", + "required": [ + "requiredChecks" + ] + }, + "github:index/RepositoryRulesetRulesRequiredStatusChecksRequiredCheck:RepositoryRulesetRulesRequiredStatusChecksRequiredCheck": { + "properties": { + "context": { "type": "string", - "description": "Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`.\n" + "description": "(String) The status check context name that must be present on the commit.\n" }, - "url": { - "type": "string" + "integrationId": { + "type": "integer", + "description": "(Number) The optional integration ID that this status check must originate from.\n" } }, "type": "object", - "language": { - "nodejs": { - "requiredOutputs": [ - "custom404", - "htmlUrl", - "status", - "url" - ] - } - } + "required": [ + "context" + ] }, - "github:index/RepositoryPagesSource:RepositoryPagesSource": { + "github:index/RepositoryRulesetRulesTagNamePattern:RepositoryRulesetRulesTagNamePattern": { "properties": { - "branch": { + "name": { "type": "string", - "description": "The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`.\n" + "description": "(String) The name of the ruleset.\n" }, - "path": { + "negate": { + "type": "boolean", + "description": "(Boolean) If true, the rule will fail if the pattern matches.\n" + }, + "operator": { "type": "string", - "description": "The repository directory from which the site publishes (Default: `/`).\n" + "description": "(String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.\n" + }, + "pattern": { + "type": "string", + "description": "(String) The pattern to match with.\n" } }, "type": "object", "required": [ - "branch" + "operator", + "pattern" ] }, "github:index/RepositorySecurityAndAnalysis:RepositorySecurityAndAnalysis": { @@ -2896,7 +3549,7 @@ } }, "github:index/actionsSecret:ActionsSecret": { - "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst examplePublicKey = github.getActionsPublicKey({\n repository: \"example_repository\",\n});\nconst exampleSecretActionsSecret = new github.ActionsSecret(\"exampleSecretActionsSecret\", {\n repository: \"example_repository\",\n secretName: \"example_secret_name\",\n plaintextValue: _var.some_secret_string,\n});\nconst exampleSecretIndex_actionsSecretActionsSecret = new github.ActionsSecret(\"exampleSecretIndex/actionsSecretActionsSecret\", {\n repository: \"example_repository\",\n secretName: \"example_secret_name\",\n encryptedValue: _var.some_encrypted_secret_string,\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample_public_key = github.get_actions_public_key(repository=\"example_repository\")\nexample_secret_actions_secret = github.ActionsSecret(\"exampleSecretActionsSecret\",\n repository=\"example_repository\",\n secret_name=\"example_secret_name\",\n plaintext_value=var[\"some_secret_string\"])\nexample_secret_index_actions_secret_actions_secret = github.ActionsSecret(\"exampleSecretIndex/actionsSecretActionsSecret\",\n repository=\"example_repository\",\n secret_name=\"example_secret_name\",\n encrypted_value=var[\"some_encrypted_secret_string\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplePublicKey = Github.GetActionsPublicKey.Invoke(new()\n {\n Repository = \"example_repository\",\n });\n\n var exampleSecretActionsSecret = new Github.ActionsSecret(\"exampleSecretActionsSecret\", new()\n {\n Repository = \"example_repository\",\n SecretName = \"example_secret_name\",\n PlaintextValue = @var.Some_secret_string,\n });\n\n var exampleSecretIndex_actionsSecretActionsSecret = new Github.ActionsSecret(\"exampleSecretIndex/actionsSecretActionsSecret\", new()\n {\n Repository = \"example_repository\",\n SecretName = \"example_secret_name\",\n EncryptedValue = @var.Some_encrypted_secret_string,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := github.GetActionsPublicKey(ctx, \u0026github.GetActionsPublicKeyArgs{\n\t\t\tRepository: \"example_repository\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewActionsSecret(ctx, \"exampleSecretActionsSecret\", \u0026github.ActionsSecretArgs{\n\t\t\tRepository: pulumi.String(\"example_repository\"),\n\t\t\tSecretName: pulumi.String(\"example_secret_name\"),\n\t\t\tPlaintextValue: pulumi.Any(_var.Some_secret_string),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewActionsSecret(ctx, \"exampleSecretIndex/actionsSecretActionsSecret\", \u0026github.ActionsSecretArgs{\n\t\t\tRepository: pulumi.String(\"example_repository\"),\n\t\t\tSecretName: pulumi.String(\"example_secret_name\"),\n\t\t\tEncryptedValue: pulumi.Any(_var.Some_encrypted_secret_string),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.github.GithubFunctions;\nimport com.pulumi.github.inputs.GetActionsPublicKeyArgs;\nimport com.pulumi.github.ActionsSecret;\nimport com.pulumi.github.ActionsSecretArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var examplePublicKey = GithubFunctions.getActionsPublicKey(GetActionsPublicKeyArgs.builder()\n .repository(\"example_repository\")\n .build());\n\n var exampleSecretActionsSecret = new ActionsSecret(\"exampleSecretActionsSecret\", ActionsSecretArgs.builder() \n .repository(\"example_repository\")\n .secretName(\"example_secret_name\")\n .plaintextValue(var_.some_secret_string())\n .build());\n\n var exampleSecretIndex_actionsSecretActionsSecret = new ActionsSecret(\"exampleSecretIndex/actionsSecretActionsSecret\", ActionsSecretArgs.builder() \n .repository(\"example_repository\")\n .secretName(\"example_secret_name\")\n .encryptedValue(var_.some_encrypted_secret_string())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleSecretActionsSecret:\n type: github:ActionsSecret\n properties:\n repository: example_repository\n secretName: example_secret_name\n plaintextValue: ${var.some_secret_string}\n exampleSecretIndex/actionsSecretActionsSecret:\n type: github:ActionsSecret\n properties:\n repository: example_repository\n secretName: example_secret_name\n encryptedValue: ${var.some_encrypted_secret_string}\nvariables:\n examplePublicKey:\n fn::invoke:\n Function: github:getActionsPublicKey\n Arguments:\n repository: example_repository\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nThis resource can be imported using an ID made up of the `repository` and `secret_name`:\n\n```sh\n $ pulumi import github:index/actionsSecret:ActionsSecret example_secret \u003crepository\u003e/\u003csecret_name\u003e\n```\n NOTEthe implementation is limited in that it won't fetch the value of the `plaintext_value` or `encrypted_value` fields when importing. You may need to ignore changes for these as a workaround.\n\n", + "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst examplePublicKey = github.getActionsPublicKey({\n repository: \"example_repository\",\n});\nconst exampleSecretActionsSecret = new github.ActionsSecret(\"exampleSecretActionsSecret\", {\n repository: \"example_repository\",\n secretName: \"example_secret_name\",\n plaintextValue: _var.some_secret_string,\n});\nconst exampleSecretIndex_actionsSecretActionsSecret = new github.ActionsSecret(\"exampleSecretIndex/actionsSecretActionsSecret\", {\n repository: \"example_repository\",\n secretName: \"example_secret_name\",\n encryptedValue: _var.some_encrypted_secret_string,\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample_public_key = github.get_actions_public_key(repository=\"example_repository\")\nexample_secret_actions_secret = github.ActionsSecret(\"exampleSecretActionsSecret\",\n repository=\"example_repository\",\n secret_name=\"example_secret_name\",\n plaintext_value=var[\"some_secret_string\"])\nexample_secret_index_actions_secret_actions_secret = github.ActionsSecret(\"exampleSecretIndex/actionsSecretActionsSecret\",\n repository=\"example_repository\",\n secret_name=\"example_secret_name\",\n encrypted_value=var[\"some_encrypted_secret_string\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplePublicKey = Github.GetActionsPublicKey.Invoke(new()\n {\n Repository = \"example_repository\",\n });\n\n var exampleSecretActionsSecret = new Github.ActionsSecret(\"exampleSecretActionsSecret\", new()\n {\n Repository = \"example_repository\",\n SecretName = \"example_secret_name\",\n PlaintextValue = @var.Some_secret_string,\n });\n\n var exampleSecretIndex_actionsSecretActionsSecret = new Github.ActionsSecret(\"exampleSecretIndex/actionsSecretActionsSecret\", new()\n {\n Repository = \"example_repository\",\n SecretName = \"example_secret_name\",\n EncryptedValue = @var.Some_encrypted_secret_string,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := github.GetActionsPublicKey(ctx, \u0026github.GetActionsPublicKeyArgs{\n\t\t\tRepository: \"example_repository\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewActionsSecret(ctx, \"exampleSecretActionsSecret\", \u0026github.ActionsSecretArgs{\n\t\t\tRepository: pulumi.String(\"example_repository\"),\n\t\t\tSecretName: pulumi.String(\"example_secret_name\"),\n\t\t\tPlaintextValue: pulumi.Any(_var.Some_secret_string),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewActionsSecret(ctx, \"exampleSecretIndex/actionsSecretActionsSecret\", \u0026github.ActionsSecretArgs{\n\t\t\tRepository: pulumi.String(\"example_repository\"),\n\t\t\tSecretName: pulumi.String(\"example_secret_name\"),\n\t\t\tEncryptedValue: pulumi.Any(_var.Some_encrypted_secret_string),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.github.GithubFunctions;\nimport com.pulumi.github.inputs.GetActionsPublicKeyArgs;\nimport com.pulumi.github.ActionsSecret;\nimport com.pulumi.github.ActionsSecretArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var examplePublicKey = GithubFunctions.getActionsPublicKey(GetActionsPublicKeyArgs.builder()\n .repository(\"example_repository\")\n .build());\n\n var exampleSecretActionsSecret = new ActionsSecret(\"exampleSecretActionsSecret\", ActionsSecretArgs.builder() \n .repository(\"example_repository\")\n .secretName(\"example_secret_name\")\n .plaintextValue(var_.some_secret_string())\n .build());\n\n var exampleSecretIndex_actionsSecretActionsSecret = new ActionsSecret(\"exampleSecretIndex/actionsSecretActionsSecret\", ActionsSecretArgs.builder() \n .repository(\"example_repository\")\n .secretName(\"example_secret_name\")\n .encryptedValue(var_.some_encrypted_secret_string())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleSecretActionsSecret:\n type: github:ActionsSecret\n properties:\n repository: example_repository\n secretName: example_secret_name\n plaintextValue: ${var.some_secret_string}\n exampleSecretIndex/actionsSecretActionsSecret:\n type: github:ActionsSecret\n properties:\n repository: example_repository\n secretName: example_secret_name\n encryptedValue: ${var.some_encrypted_secret_string}\nvariables:\n examplePublicKey:\n fn::invoke:\n Function: github:getActionsPublicKey\n Arguments:\n repository: example_repository\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nThis resource can be imported using an ID made up of the `repository` and `secret_name`:\n\n```sh\n $ pulumi import github:index/actionsSecret:ActionsSecret example_secret repository/secret_name\n```\n NOTEthe implementation is limited in that it won't fetch the value of the `plaintext_value` or `encrypted_value` fields when importing. You may need to ignore changes for these as a workaround.\n\n", "properties": { "createdAt": { "type": "string", @@ -4435,7 +5088,7 @@ } }, "github:index/enterpriseOrganization:EnterpriseOrganization": { - "description": "This resource allows you to create and manage a GitHub enterprise organization.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst org = new github.EnterpriseOrganization(\"org\", {\n enterpriseId: data.github_enterprise.enterprise.id,\n description: \"Organization created with terraform\",\n billingEmail: \"jon@winteriscoming.com\",\n adminLogins: [\"jon-snow\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\norg = github.EnterpriseOrganization(\"org\",\n enterprise_id=data[\"github_enterprise\"][\"enterprise\"][\"id\"],\n description=\"Organization created with terraform\",\n billing_email=\"jon@winteriscoming.com\",\n admin_logins=[\"jon-snow\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = new Github.EnterpriseOrganization(\"org\", new()\n {\n EnterpriseId = data.Github_enterprise.Enterprise.Id,\n Description = \"Organization created with terraform\",\n BillingEmail = \"jon@winteriscoming.com\",\n AdminLogins = new[]\n {\n \"jon-snow\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := github.NewEnterpriseOrganization(ctx, \"org\", \u0026github.EnterpriseOrganizationArgs{\n\t\t\tEnterpriseId: pulumi.Any(data.Github_enterprise.Enterprise.Id),\n\t\t\tDescription: pulumi.String(\"Organization created with terraform\"),\n\t\t\tBillingEmail: pulumi.String(\"jon@winteriscoming.com\"),\n\t\t\tAdminLogins: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"jon-snow\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.github.EnterpriseOrganization;\nimport com.pulumi.github.EnterpriseOrganizationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var org = new EnterpriseOrganization(\"org\", EnterpriseOrganizationArgs.builder() \n .enterpriseId(data.github_enterprise().enterprise().id())\n .description(\"Organization created with terraform\")\n .billingEmail(\"jon@winteriscoming.com\")\n .adminLogins(\"jon-snow\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n org:\n type: github:EnterpriseOrganization\n properties:\n enterpriseId: ${data.github_enterprise.enterprise.id}\n description: Organization created with terraform\n billingEmail: jon@winteriscoming.com\n adminLogins:\n - jon-snow\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nSupport for importing organizations is not currently supported. ", + "description": "This resource allows you to create and manage a GitHub enterprise organization.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst org = new github.EnterpriseOrganization(\"org\", {\n enterpriseId: data.github_enterprise.enterprise.id,\n displayName: \"Some Awesome Org\",\n description: \"Organization created with terraform\",\n billingEmail: \"jon@winteriscoming.com\",\n adminLogins: [\"jon-snow\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\norg = github.EnterpriseOrganization(\"org\",\n enterprise_id=data[\"github_enterprise\"][\"enterprise\"][\"id\"],\n display_name=\"Some Awesome Org\",\n description=\"Organization created with terraform\",\n billing_email=\"jon@winteriscoming.com\",\n admin_logins=[\"jon-snow\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = new Github.EnterpriseOrganization(\"org\", new()\n {\n EnterpriseId = data.Github_enterprise.Enterprise.Id,\n DisplayName = \"Some Awesome Org\",\n Description = \"Organization created with terraform\",\n BillingEmail = \"jon@winteriscoming.com\",\n AdminLogins = new[]\n {\n \"jon-snow\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := github.NewEnterpriseOrganization(ctx, \"org\", \u0026github.EnterpriseOrganizationArgs{\n\t\t\tEnterpriseId: pulumi.Any(data.Github_enterprise.Enterprise.Id),\n\t\t\tDisplayName: pulumi.String(\"Some Awesome Org\"),\n\t\t\tDescription: pulumi.String(\"Organization created with terraform\"),\n\t\t\tBillingEmail: pulumi.String(\"jon@winteriscoming.com\"),\n\t\t\tAdminLogins: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"jon-snow\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.github.EnterpriseOrganization;\nimport com.pulumi.github.EnterpriseOrganizationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var org = new EnterpriseOrganization(\"org\", EnterpriseOrganizationArgs.builder() \n .enterpriseId(data.github_enterprise().enterprise().id())\n .displayName(\"Some Awesome Org\")\n .description(\"Organization created with terraform\")\n .billingEmail(\"jon@winteriscoming.com\")\n .adminLogins(\"jon-snow\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n org:\n type: github:EnterpriseOrganization\n properties:\n enterpriseId: ${data.github_enterprise.enterprise.id}\n displayName: Some Awesome Org\n description: Organization created with terraform\n billingEmail: jon@winteriscoming.com\n adminLogins:\n - jon-snow\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nGitHub Enterprise Organization can be imported using the `slug` of the enterprise, combined with the `orgname` of the organization, separated by a `/` character.\n\n```sh\n $ pulumi import github:index/enterpriseOrganization:EnterpriseOrganization org enterp/some-awesome-org\n```\n ", "properties": { "adminLogins": { "type": "array", @@ -4452,6 +5105,10 @@ "type": "string", "description": "The description of the organization.\n" }, + "displayName": { + "type": "string", + "description": "The display name of the organization.\n" + }, "enterpriseId": { "type": "string", "description": "The ID of the enterprise.\n" @@ -4483,6 +5140,10 @@ "type": "string", "description": "The description of the organization.\n" }, + "displayName": { + "type": "string", + "description": "The display name of the organization.\n" + }, "enterpriseId": { "type": "string", "description": "The ID of the enterprise.\n", @@ -4517,6 +5178,10 @@ "type": "string", "description": "The description of the organization.\n" }, + "displayName": { + "type": "string", + "description": "The display name of the organization.\n" + }, "enterpriseId": { "type": "string", "description": "The ID of the enterprise.\n", @@ -4996,6 +5661,138 @@ "type": "object" } }, + "github:index/organizationRuleset:OrganizationRuleset": { + "description": "Creates a GitHub organization ruleset.\n\nThis resource allows you to create and manage rulesets on the organization level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.github.OrganizationRuleset;\nimport com.pulumi.github.OrganizationRulesetArgs;\nimport com.pulumi.github.inputs.OrganizationRulesetBypassActorArgs;\nimport com.pulumi.github.inputs.OrganizationRulesetConditionsArgs;\nimport com.pulumi.github.inputs.OrganizationRulesetConditionsRefNameArgs;\nimport com.pulumi.github.inputs.OrganizationRulesetRulesArgs;\nimport com.pulumi.github.inputs.OrganizationRulesetRulesBranchNamePatternArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new OrganizationRuleset(\"example\", OrganizationRulesetArgs.builder() \n .bypassActors(OrganizationRulesetBypassActorArgs.builder()\n .actorId(13473)\n .actorType(\"Integration\")\n .bypassMode(\"always\")\n .build())\n .conditions(OrganizationRulesetConditionsArgs.builder()\n .refName(OrganizationRulesetConditionsRefNameArgs.builder()\n .exclude()\n .include(\"~ALL\")\n .build())\n .build())\n .enforcement(\"active\")\n .rules(OrganizationRulesetRulesArgs.builder()\n .branchNamePattern(OrganizationRulesetRulesBranchNamePatternArgs.builder()\n .name(\"example\")\n .negate(false)\n .operator(\"starts_with\")\n .pattern(\"ex\")\n .build())\n .creation(true)\n .deletion(true)\n .requiredLinearHistory(true)\n .requiredSignatures(true)\n .update(true)\n .build())\n .target(\"branch\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: github:OrganizationRuleset\n properties:\n bypassActors:\n - actorId: 13473\n actorType: Integration\n bypassMode: always\n conditions:\n refName:\n exclude: []\n include:\n - ~ALL\n enforcement: active\n rules:\n branchNamePattern:\n name: example\n negate: false\n operator: starts_with\n pattern: ex\n creation: true\n deletion: true\n requiredLinearHistory: true\n requiredSignatures: true\n update: true\n target: branch\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nGitHub Organization Rulesets can be imported using the GitHub ruleset ID e.g.\n\n```sh\n $ pulumi import github:index/organizationRuleset:OrganizationRuleset example 12345`\n```\n\n ", + "properties": { + "bypassActors": { + "type": "array", + "items": { + "$ref": "#/types/github:index/OrganizationRulesetBypassActor:OrganizationRulesetBypassActor" + }, + "description": "(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)\n" + }, + "conditions": { + "$ref": "#/types/github:index/OrganizationRulesetConditions:OrganizationRulesetConditions", + "description": "(Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema)\n" + }, + "enforcement": { + "type": "string", + "description": "(String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.\n" + }, + "etag": { + "type": "string", + "description": "(String)\n" + }, + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "nodeId": { + "type": "string", + "description": "(String) GraphQL global node id for use with v4 API.\n" + }, + "rules": { + "$ref": "#/types/github:index/OrganizationRulesetRules:OrganizationRulesetRules", + "description": "(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)\n" + }, + "rulesetId": { + "type": "integer", + "description": "(Number) GitHub ID for the ruleset.\n" + }, + "target": { + "type": "string", + "description": "(String) Possible values are `branch` and `tag`.\n" + } + }, + "required": [ + "enforcement", + "etag", + "name", + "nodeId", + "rules", + "rulesetId", + "target" + ], + "inputProperties": { + "bypassActors": { + "type": "array", + "items": { + "$ref": "#/types/github:index/OrganizationRulesetBypassActor:OrganizationRulesetBypassActor" + }, + "description": "(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)\n" + }, + "conditions": { + "$ref": "#/types/github:index/OrganizationRulesetConditions:OrganizationRulesetConditions", + "description": "(Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema)\n" + }, + "enforcement": { + "type": "string", + "description": "(String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.\n" + }, + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "rules": { + "$ref": "#/types/github:index/OrganizationRulesetRules:OrganizationRulesetRules", + "description": "(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)\n" + }, + "target": { + "type": "string", + "description": "(String) Possible values are `branch` and `tag`.\n" + } + }, + "requiredInputs": [ + "enforcement", + "rules", + "target" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering OrganizationRuleset resources.\n", + "properties": { + "bypassActors": { + "type": "array", + "items": { + "$ref": "#/types/github:index/OrganizationRulesetBypassActor:OrganizationRulesetBypassActor" + }, + "description": "(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)\n" + }, + "conditions": { + "$ref": "#/types/github:index/OrganizationRulesetConditions:OrganizationRulesetConditions", + "description": "(Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema)\n" + }, + "enforcement": { + "type": "string", + "description": "(String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.\n" + }, + "etag": { + "type": "string", + "description": "(String)\n" + }, + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "nodeId": { + "type": "string", + "description": "(String) GraphQL global node id for use with v4 API.\n" + }, + "rules": { + "$ref": "#/types/github:index/OrganizationRulesetRules:OrganizationRulesetRules", + "description": "(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)\n" + }, + "rulesetId": { + "type": "integer", + "description": "(Number) GitHub ID for the ruleset.\n" + }, + "target": { + "type": "string", + "description": "(String) Possible values are `branch` and `tag`.\n" + } + }, + "type": "object" + } + }, "github:index/organizationSecurityManager:OrganizationSecurityManager": { "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst someTeamTeam = new github.Team(\"someTeamTeam\", {description: \"Some cool team\"});\nconst someTeamOrganizationSecurityManager = new github.OrganizationSecurityManager(\"someTeamOrganizationSecurityManager\", {teamSlug: someTeamTeam.slug});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nsome_team_team = github.Team(\"someTeamTeam\", description=\"Some cool team\")\nsome_team_organization_security_manager = github.OrganizationSecurityManager(\"someTeamOrganizationSecurityManager\", team_slug=some_team_team.slug)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var someTeamTeam = new Github.Team(\"someTeamTeam\", new()\n {\n Description = \"Some cool team\",\n });\n\n var someTeamOrganizationSecurityManager = new Github.OrganizationSecurityManager(\"someTeamOrganizationSecurityManager\", new()\n {\n TeamSlug = someTeamTeam.Slug,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsomeTeamTeam, err := github.NewTeam(ctx, \"someTeamTeam\", \u0026github.TeamArgs{\n\t\t\tDescription: pulumi.String(\"Some cool team\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewOrganizationSecurityManager(ctx, \"someTeamOrganizationSecurityManager\", \u0026github.OrganizationSecurityManagerArgs{\n\t\t\tTeamSlug: someTeamTeam.Slug,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.github.Team;\nimport com.pulumi.github.TeamArgs;\nimport com.pulumi.github.OrganizationSecurityManager;\nimport com.pulumi.github.OrganizationSecurityManagerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var someTeamTeam = new Team(\"someTeamTeam\", TeamArgs.builder() \n .description(\"Some cool team\")\n .build());\n\n var someTeamOrganizationSecurityManager = new OrganizationSecurityManager(\"someTeamOrganizationSecurityManager\", OrganizationSecurityManagerArgs.builder() \n .teamSlug(someTeamTeam.slug())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n someTeamTeam:\n type: github:Team\n properties:\n description: Some cool team\n someTeamOrganizationSecurityManager:\n type: github:OrganizationSecurityManager\n properties:\n teamSlug: ${someTeamTeam.slug}\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nGitHub Security Manager Teams can be imported using the GitHub team ID e.g.\n\n```sh\n $ pulumi import github:index/organizationSecurityManager:OrganizationSecurityManager core 1234567\n```\n ", "properties": { @@ -5928,6 +6725,7 @@ "securityAndAnalysis", "sshCloneUrl", "svnUrl", + "topics", "visibility" ], "inputProperties": { @@ -7408,6 +8206,150 @@ "type": "object" } }, + "github:index/repositoryRuleset:RepositoryRuleset": { + "description": "Creates a GitHub repository ruleset.\n\nThis resource allows you to create and manage rulesets on the repository level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst exampleRepository = new github.Repository(\"exampleRepository\", {description: \"Example repository\"});\nconst exampleRepositoryRuleset = new github.RepositoryRuleset(\"exampleRepositoryRuleset\", {\n repository: exampleRepository.name,\n target: \"branch\",\n enforcement: \"active\",\n conditions: {\n refName: {\n includes: [\"~ALL\"],\n excludes: [],\n },\n },\n bypassActors: [{\n actorId: 13473,\n actorType: \"Integration\",\n bypassMode: \"always\",\n }],\n rules: {\n creation: true,\n update: true,\n deletion: true,\n requiredLinearHistory: true,\n requiredSignatures: true,\n requiredDeployments: {\n requiredDeploymentEnvironments: [\"test\"],\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample_repository = github.Repository(\"exampleRepository\", description=\"Example repository\")\nexample_repository_ruleset = github.RepositoryRuleset(\"exampleRepositoryRuleset\",\n repository=example_repository.name,\n target=\"branch\",\n enforcement=\"active\",\n conditions=github.RepositoryRulesetConditionsArgs(\n ref_name=github.RepositoryRulesetConditionsRefNameArgs(\n includes=[\"~ALL\"],\n excludes=[],\n ),\n ),\n bypass_actors=[github.RepositoryRulesetBypassActorArgs(\n actor_id=13473,\n actor_type=\"Integration\",\n bypass_mode=\"always\",\n )],\n rules=github.RepositoryRulesetRulesArgs(\n creation=True,\n update=True,\n deletion=True,\n required_linear_history=True,\n required_signatures=True,\n required_deployments=github.RepositoryRulesetRulesRequiredDeploymentsArgs(\n required_deployment_environments=[\"test\"],\n ),\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleRepository = new Github.Repository(\"exampleRepository\", new()\n {\n Description = \"Example repository\",\n });\n\n var exampleRepositoryRuleset = new Github.RepositoryRuleset(\"exampleRepositoryRuleset\", new()\n {\n Repository = exampleRepository.Name,\n Target = \"branch\",\n Enforcement = \"active\",\n Conditions = new Github.Inputs.RepositoryRulesetConditionsArgs\n {\n RefName = new Github.Inputs.RepositoryRulesetConditionsRefNameArgs\n {\n Includes = new[]\n {\n \"~ALL\",\n },\n Excludes = new[] {},\n },\n },\n BypassActors = new[]\n {\n new Github.Inputs.RepositoryRulesetBypassActorArgs\n {\n ActorId = 13473,\n ActorType = \"Integration\",\n BypassMode = \"always\",\n },\n },\n Rules = new Github.Inputs.RepositoryRulesetRulesArgs\n {\n Creation = true,\n Update = true,\n Deletion = true,\n RequiredLinearHistory = true,\n RequiredSignatures = true,\n RequiredDeployments = new Github.Inputs.RepositoryRulesetRulesRequiredDeploymentsArgs\n {\n RequiredDeploymentEnvironments = new[]\n {\n \"test\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleRepository, err := github.NewRepository(ctx, \"exampleRepository\", \u0026github.RepositoryArgs{\n\t\t\tDescription: pulumi.String(\"Example repository\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewRepositoryRuleset(ctx, \"exampleRepositoryRuleset\", \u0026github.RepositoryRulesetArgs{\n\t\t\tRepository: exampleRepository.Name,\n\t\t\tTarget: pulumi.String(\"branch\"),\n\t\t\tEnforcement: pulumi.String(\"active\"),\n\t\t\tConditions: \u0026github.RepositoryRulesetConditionsArgs{\n\t\t\t\tRefName: \u0026github.RepositoryRulesetConditionsRefNameArgs{\n\t\t\t\t\tIncludes: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"~ALL\"),\n\t\t\t\t\t},\n\t\t\t\t\tExcludes: pulumi.StringArray{},\n\t\t\t\t},\n\t\t\t},\n\t\t\tBypassActors: github.RepositoryRulesetBypassActorArray{\n\t\t\t\t\u0026github.RepositoryRulesetBypassActorArgs{\n\t\t\t\t\tActorId: pulumi.Int(13473),\n\t\t\t\t\tActorType: pulumi.String(\"Integration\"),\n\t\t\t\t\tBypassMode: pulumi.String(\"always\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tRules: \u0026github.RepositoryRulesetRulesArgs{\n\t\t\t\tCreation: pulumi.Bool(true),\n\t\t\t\tUpdate: pulumi.Bool(true),\n\t\t\t\tDeletion: pulumi.Bool(true),\n\t\t\t\tRequiredLinearHistory: pulumi.Bool(true),\n\t\t\t\tRequiredSignatures: pulumi.Bool(true),\n\t\t\t\tRequiredDeployments: \u0026github.RepositoryRulesetRulesRequiredDeploymentsArgs{\n\t\t\t\t\tRequiredDeploymentEnvironments: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"test\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.github.Repository;\nimport com.pulumi.github.RepositoryArgs;\nimport com.pulumi.github.RepositoryRuleset;\nimport com.pulumi.github.RepositoryRulesetArgs;\nimport com.pulumi.github.inputs.RepositoryRulesetConditionsArgs;\nimport com.pulumi.github.inputs.RepositoryRulesetConditionsRefNameArgs;\nimport com.pulumi.github.inputs.RepositoryRulesetBypassActorArgs;\nimport com.pulumi.github.inputs.RepositoryRulesetRulesArgs;\nimport com.pulumi.github.inputs.RepositoryRulesetRulesRequiredDeploymentsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleRepository = new Repository(\"exampleRepository\", RepositoryArgs.builder() \n .description(\"Example repository\")\n .build());\n\n var exampleRepositoryRuleset = new RepositoryRuleset(\"exampleRepositoryRuleset\", RepositoryRulesetArgs.builder() \n .repository(exampleRepository.name())\n .target(\"branch\")\n .enforcement(\"active\")\n .conditions(RepositoryRulesetConditionsArgs.builder()\n .refName(RepositoryRulesetConditionsRefNameArgs.builder()\n .includes(\"~ALL\")\n .excludes()\n .build())\n .build())\n .bypassActors(RepositoryRulesetBypassActorArgs.builder()\n .actorId(13473)\n .actorType(\"Integration\")\n .bypassMode(\"always\")\n .build())\n .rules(RepositoryRulesetRulesArgs.builder()\n .creation(true)\n .update(true)\n .deletion(true)\n .requiredLinearHistory(true)\n .requiredSignatures(true)\n .requiredDeployments(RepositoryRulesetRulesRequiredDeploymentsArgs.builder()\n .requiredDeploymentEnvironments(\"test\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleRepository:\n type: github:Repository\n properties:\n description: Example repository\n exampleRepositoryRuleset:\n type: github:RepositoryRuleset\n properties:\n repository: ${exampleRepository.name}\n target: branch\n enforcement: active\n conditions:\n refName:\n includes:\n - ~ALL\n excludes: []\n bypassActors:\n - actorId: 13473\n actorType: Integration\n bypassMode: always\n rules:\n creation: true\n update: true\n deletion: true\n requiredLinearHistory: true\n requiredSignatures: true\n requiredDeployments:\n requiredDeploymentEnvironments:\n - test\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nGitHub Repository Rulesets can be imported using the GitHub repository name and ruleset ID e.g.\n\n```sh\n $ pulumi import github:index/repositoryRuleset:RepositoryRuleset example example:12345`\n```\n\n ", + "properties": { + "bypassActors": { + "type": "array", + "items": { + "$ref": "#/types/github:index/RepositoryRulesetBypassActor:RepositoryRulesetBypassActor" + }, + "description": "(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)\n" + }, + "conditions": { + "$ref": "#/types/github:index/RepositoryRulesetConditions:RepositoryRulesetConditions", + "description": "(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)\n" + }, + "enforcement": { + "type": "string", + "description": "(String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.\n" + }, + "etag": { + "type": "string", + "description": "(String)\n" + }, + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "nodeId": { + "type": "string", + "description": "(String) GraphQL global node id for use with v4 API.\n" + }, + "repository": { + "type": "string", + "description": "(String) Name of the repository to apply rulset to.\n" + }, + "rules": { + "$ref": "#/types/github:index/RepositoryRulesetRules:RepositoryRulesetRules", + "description": "(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)\n" + }, + "rulesetId": { + "type": "integer", + "description": "(Number) GitHub ID for the ruleset.\n" + }, + "target": { + "type": "string", + "description": "(String) Possible values are `branch` and `tag`.\n" + } + }, + "required": [ + "enforcement", + "etag", + "name", + "nodeId", + "rules", + "rulesetId", + "target" + ], + "inputProperties": { + "bypassActors": { + "type": "array", + "items": { + "$ref": "#/types/github:index/RepositoryRulesetBypassActor:RepositoryRulesetBypassActor" + }, + "description": "(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)\n" + }, + "conditions": { + "$ref": "#/types/github:index/RepositoryRulesetConditions:RepositoryRulesetConditions", + "description": "(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)\n" + }, + "enforcement": { + "type": "string", + "description": "(String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.\n" + }, + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "repository": { + "type": "string", + "description": "(String) Name of the repository to apply rulset to.\n" + }, + "rules": { + "$ref": "#/types/github:index/RepositoryRulesetRules:RepositoryRulesetRules", + "description": "(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)\n" + }, + "target": { + "type": "string", + "description": "(String) Possible values are `branch` and `tag`.\n" + } + }, + "requiredInputs": [ + "enforcement", + "rules", + "target" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering RepositoryRuleset resources.\n", + "properties": { + "bypassActors": { + "type": "array", + "items": { + "$ref": "#/types/github:index/RepositoryRulesetBypassActor:RepositoryRulesetBypassActor" + }, + "description": "(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)\n" + }, + "conditions": { + "$ref": "#/types/github:index/RepositoryRulesetConditions:RepositoryRulesetConditions", + "description": "(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)\n" + }, + "enforcement": { + "type": "string", + "description": "(String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.\n" + }, + "etag": { + "type": "string", + "description": "(String)\n" + }, + "name": { + "type": "string", + "description": "(String) The name of the ruleset.\n" + }, + "nodeId": { + "type": "string", + "description": "(String) GraphQL global node id for use with v4 API.\n" + }, + "repository": { + "type": "string", + "description": "(String) Name of the repository to apply rulset to.\n" + }, + "rules": { + "$ref": "#/types/github:index/RepositoryRulesetRules:RepositoryRulesetRules", + "description": "(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)\n" + }, + "rulesetId": { + "type": "integer", + "description": "(Number) GitHub ID for the ruleset.\n" + }, + "target": { + "type": "string", + "description": "(String) Possible values are `branch` and `tag`.\n" + } + }, + "type": "object" + } + }, "github:index/repositoryTagProtection:RepositoryTagProtection": { "description": "This resource allows you to create and manage a repository tag protection for repositories within your GitHub organization or personal account.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst example = new github.RepositoryTagProtection(\"example\", {\n pattern: \"v*\",\n repository: \"example-repository\",\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample = github.RepositoryTagProtection(\"example\",\n pattern=\"v*\",\n repository=\"example-repository\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Github.RepositoryTagProtection(\"example\", new()\n {\n Pattern = \"v*\",\n Repository = \"example-repository\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := github.NewRepositoryTagProtection(ctx, \"example\", \u0026github.RepositoryTagProtectionArgs{\n\t\t\tPattern: pulumi.String(\"v*\"),\n\t\t\tRepository: pulumi.String(\"example-repository\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.github.RepositoryTagProtection;\nimport com.pulumi.github.RepositoryTagProtectionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new RepositoryTagProtection(\"example\", RepositoryTagProtectionArgs.builder() \n .pattern(\"v*\")\n .repository(\"example-repository\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: github:RepositoryTagProtection\n properties:\n pattern: v*\n repository: example-repository\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nRepository tag protections can be imported using the `name` of the repository, combined with the `id` of the tag protection, separated by a `/` character. The `id` of the tag protection can be found using the [GitHub API](https://docs.github.com/en/rest/repos/tags#list-tag-protection-states-for-a-repository).\n\nImporting uses the name of the repository, as well as the ID of the tag protection, e.g.\n\n```sh\n $ pulumi import github:index/repositoryTagProtection:RepositoryTagProtection terraform my-repo/31077\n```\n ", "properties": { @@ -7466,6 +8408,60 @@ "type": "object" } }, + "github:index/repositoryTopics:RepositoryTopics": { + "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst testRepository = github.getRepository({\n name: \"test\",\n});\nconst testRepositoryTopics = new github.RepositoryTopics(\"testRepositoryTopics\", {\n repository: github_repository.test.name,\n topics: [\n \"topic-1\",\n \"topic-2\",\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\ntest_repository = github.get_repository(name=\"test\")\ntest_repository_topics = github.RepositoryTopics(\"testRepositoryTopics\",\n repository=github_repository[\"test\"][\"name\"],\n topics=[\n \"topic-1\",\n \"topic-2\",\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var testRepository = Github.GetRepository.Invoke(new()\n {\n Name = \"test\",\n });\n\n var testRepositoryTopics = new Github.RepositoryTopics(\"testRepositoryTopics\", new()\n {\n Repository = github_repository.Test.Name,\n Topics = new[]\n {\n \"topic-1\",\n \"topic-2\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := github.LookupRepository(ctx, \u0026github.LookupRepositoryArgs{\n\t\t\tName: pulumi.StringRef(\"test\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewRepositoryTopics(ctx, \"testRepositoryTopics\", \u0026github.RepositoryTopicsArgs{\n\t\t\tRepository: pulumi.Any(github_repository.Test.Name),\n\t\t\tTopics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"topic-1\"),\n\t\t\t\tpulumi.String(\"topic-2\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.github.GithubFunctions;\nimport com.pulumi.github.inputs.GetRepositoryArgs;\nimport com.pulumi.github.RepositoryTopics;\nimport com.pulumi.github.RepositoryTopicsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var testRepository = GithubFunctions.getRepository(GetRepositoryArgs.builder()\n .name(\"test\")\n .build());\n\n var testRepositoryTopics = new RepositoryTopics(\"testRepositoryTopics\", RepositoryTopicsArgs.builder() \n .repository(github_repository.test().name())\n .topics( \n \"topic-1\",\n \"topic-2\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testRepositoryTopics:\n type: github:RepositoryTopics\n properties:\n repository: ${github_repository.test.name}\n topics:\n - topic-1\n - topic-2\nvariables:\n testRepository:\n fn::invoke:\n Function: github:getRepository\n Arguments:\n name: test\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nRepository topics can be imported using the `name` of the repository.\n\n```sh\n $ pulumi import github:index/repositoryTopics:RepositoryTopics terraform terraform\n```\n ", + "properties": { + "repository": { + "type": "string", + "description": "The repository name.\n" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of topics to add to the repository.\n" + } + }, + "required": [ + "repository", + "topics" + ], + "inputProperties": { + "repository": { + "type": "string", + "description": "The repository name.\n" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of topics to add to the repository.\n" + } + }, + "requiredInputs": [ + "repository", + "topics" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering RepositoryTopics resources.\n", + "properties": { + "repository": { + "type": "string", + "description": "The repository name.\n" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of topics to add to the repository.\n" + } + }, + "type": "object" + } + }, "github:index/repositoryWebhook:RepositoryWebhook": { "description": "This resource allows you to create and manage webhooks for repositories within your\nGitHub organization or personal account.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst repo = new github.Repository(\"repo\", {\n description: \"Terraform acceptance tests\",\n homepageUrl: \"http://example.com/\",\n visibility: \"public\",\n});\nconst foo = new github.RepositoryWebhook(\"foo\", {\n repository: repo.name,\n configuration: {\n url: \"https://google.de/\",\n contentType: \"form\",\n insecureSsl: false,\n },\n active: false,\n events: [\"issues\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nrepo = github.Repository(\"repo\",\n description=\"Terraform acceptance tests\",\n homepage_url=\"http://example.com/\",\n visibility=\"public\")\nfoo = github.RepositoryWebhook(\"foo\",\n repository=repo.name,\n configuration=github.RepositoryWebhookConfigurationArgs(\n url=\"https://google.de/\",\n content_type=\"form\",\n insecure_ssl=False,\n ),\n active=False,\n events=[\"issues\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var repo = new Github.Repository(\"repo\", new()\n {\n Description = \"Terraform acceptance tests\",\n HomepageUrl = \"http://example.com/\",\n Visibility = \"public\",\n });\n\n var foo = new Github.RepositoryWebhook(\"foo\", new()\n {\n Repository = repo.Name,\n Configuration = new Github.Inputs.RepositoryWebhookConfigurationArgs\n {\n Url = \"https://google.de/\",\n ContentType = \"form\",\n InsecureSsl = false,\n },\n Active = false,\n Events = new[]\n {\n \"issues\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\trepo, err := github.NewRepository(ctx, \"repo\", \u0026github.RepositoryArgs{\n\t\t\tDescription: pulumi.String(\"Terraform acceptance tests\"),\n\t\t\tHomepageUrl: pulumi.String(\"http://example.com/\"),\n\t\t\tVisibility: pulumi.String(\"public\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewRepositoryWebhook(ctx, \"foo\", \u0026github.RepositoryWebhookArgs{\n\t\t\tRepository: repo.Name,\n\t\t\tConfiguration: \u0026github.RepositoryWebhookConfigurationArgs{\n\t\t\t\tUrl: pulumi.String(\"https://google.de/\"),\n\t\t\t\tContentType: pulumi.String(\"form\"),\n\t\t\t\tInsecureSsl: pulumi.Bool(false),\n\t\t\t},\n\t\t\tActive: pulumi.Bool(false),\n\t\t\tEvents: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"issues\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.github.Repository;\nimport com.pulumi.github.RepositoryArgs;\nimport com.pulumi.github.RepositoryWebhook;\nimport com.pulumi.github.RepositoryWebhookArgs;\nimport com.pulumi.github.inputs.RepositoryWebhookConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var repo = new Repository(\"repo\", RepositoryArgs.builder() \n .description(\"Terraform acceptance tests\")\n .homepageUrl(\"http://example.com/\")\n .visibility(\"public\")\n .build());\n\n var foo = new RepositoryWebhook(\"foo\", RepositoryWebhookArgs.builder() \n .repository(repo.name())\n .configuration(RepositoryWebhookConfigurationArgs.builder()\n .url(\"https://google.de/\")\n .contentType(\"form\")\n .insecureSsl(false)\n .build())\n .active(false)\n .events(\"issues\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n repo:\n type: github:Repository\n properties:\n description: Terraform acceptance tests\n homepageUrl: http://example.com/\n visibility: public\n foo:\n type: github:RepositoryWebhook\n properties:\n repository: ${repo.name}\n configuration:\n url: https://google.de/\n contentType: form\n insecureSsl: false\n active: false\n events:\n - issues\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nRepository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. The `id` of the webhook can be found in the URL of the webhook. For example`\"https://github.com/foo-org/foo-repo/settings/hooks/14711452\"`.\n\nImporting uses the name of the repository, as well as the ID of the webhook, e.g.\n\n```sh\n $ pulumi import github:index/repositoryWebhook:RepositoryWebhook terraform terraform/11235813\n```\n If secret is populated in the webhook's configuration, the value will be imported as \"********\".\n\n", "properties": { diff --git a/provider/go.mod b/provider/go.mod index 9134c8a8..1ab6929f 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/hashicorp/terraform-plugin-sdk v1.17.2 - github.com/integrations/terraform-provider-github/v5 v5.34.0 + github.com/integrations/terraform-provider-github/v5 v5.36.0 github.com/pulumi/pulumi-terraform-bridge/v3 v3.59.0 github.com/pulumi/pulumi/sdk/v3 v3.81.0 ) @@ -96,7 +96,7 @@ require ( github.com/google/go-querystring v1.1.0 // indirect github.com/google/s2a-go v0.1.4 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/google/wire v0.5.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect github.com/googleapis/gax-go/v2 v2.11.0 // indirect @@ -206,14 +206,14 @@ require ( go.uber.org/atomic v1.10.0 // indirect gocloud.dev v0.29.0 // indirect gocloud.dev/secrets/hashivault v0.29.0 // indirect - golang.org/x/crypto v0.12.0 // indirect + golang.org/x/crypto v0.13.0 // indirect golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.14.0 // indirect - golang.org/x/oauth2 v0.11.0 // indirect + golang.org/x/net v0.15.0 // indirect + golang.org/x/oauth2 v0.12.0 // indirect golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/term v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.9.3 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect diff --git a/provider/go.sum b/provider/go.sum index 6ac3a46c..e538baf4 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1287,8 +1287,9 @@ github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8= github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -1521,8 +1522,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/integrations/terraform-provider-github/v5 v5.34.0 h1:lcEKu3ajzw9zSNG18J2LgvAGxHZCdhOHIX5ip0S9xyY= -github.com/integrations/terraform-provider-github/v5 v5.34.0/go.mod h1:UBYSGjePOkj+FIQgsBbqESX4ZRo0P4WPm9DpOlt6YL4= +github.com/integrations/terraform-provider-github/v5 v5.36.0 h1:OP5e6Vp9RMlNkXfWRtPp7wm22H8htRDJc4D6HOIgaXo= +github.com/integrations/terraform-provider-github/v5 v5.36.0/go.mod h1:a3bYGoX30go6nhnHHBOt0Xi9AHedGFo5TB9fen9uvPM= github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= github.com/ionos-cloud/sdk-go/v6 v6.1.3/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= @@ -2409,8 +2410,8 @@ golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4 golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2558,8 +2559,8 @@ golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2592,8 +2593,8 @@ golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= -golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= -golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2772,8 +2773,8 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2787,8 +2788,8 @@ golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2804,8 +2805,8 @@ golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/sdk/dotnet/ActionsSecret.cs b/sdk/dotnet/ActionsSecret.cs index 72df5e95..82f21d8c 100644 --- a/sdk/dotnet/ActionsSecret.cs +++ b/sdk/dotnet/ActionsSecret.cs @@ -47,7 +47,7 @@ namespace Pulumi.Github /// This resource can be imported using an ID made up of the `repository` and `secret_name`: /// /// ```sh - /// $ pulumi import github:index/actionsSecret:ActionsSecret example_secret <repository>/<secret_name> + /// $ pulumi import github:index/actionsSecret:ActionsSecret example_secret repository/secret_name /// ``` /// NOTEthe implementation is limited in that it won't fetch the value of the `plaintext_value` or `encrypted_value` fields when importing. You may need to ignore changes for these as a workaround. /// diff --git a/sdk/dotnet/EnterpriseOrganization.cs b/sdk/dotnet/EnterpriseOrganization.cs index 1aa7df5b..a119da79 100644 --- a/sdk/dotnet/EnterpriseOrganization.cs +++ b/sdk/dotnet/EnterpriseOrganization.cs @@ -25,6 +25,7 @@ namespace Pulumi.Github /// var org = new Github.EnterpriseOrganization("org", new() /// { /// EnterpriseId = data.Github_enterprise.Enterprise.Id, + /// DisplayName = "Some Awesome Org", /// Description = "Organization created with terraform", /// BillingEmail = "jon@winteriscoming.com", /// AdminLogins = new[] @@ -38,7 +39,11 @@ namespace Pulumi.Github /// /// ## Import /// - /// Support for importing organizations is not currently supported. + /// GitHub Enterprise Organization can be imported using the `slug` of the enterprise, combined with the `orgname` of the organization, separated by a `/` character. + /// + /// ```sh + /// $ pulumi import github:index/enterpriseOrganization:EnterpriseOrganization org enterp/some-awesome-org + /// ``` /// [GithubResourceType("github:index/enterpriseOrganization:EnterpriseOrganization")] public partial class EnterpriseOrganization : global::Pulumi.CustomResource @@ -61,6 +66,12 @@ public partial class EnterpriseOrganization : global::Pulumi.CustomResource [Output("description")] public Output Description { get; private set; } = null!; + /// + /// The display name of the organization. + /// + [Output("displayName")] + public Output DisplayName { get; private set; } = null!; + /// /// The ID of the enterprise. /// @@ -143,6 +154,12 @@ public InputList AdminLogins [Input("description")] public Input? Description { get; set; } + /// + /// The display name of the organization. + /// + [Input("displayName")] + public Input? DisplayName { get; set; } + /// /// The ID of the enterprise. /// @@ -187,6 +204,12 @@ public InputList AdminLogins [Input("description")] public Input? Description { get; set; } + /// + /// The display name of the organization. + /// + [Input("displayName")] + public Input? DisplayName { get; set; } + /// /// The ID of the enterprise. /// diff --git a/sdk/dotnet/Inputs/OrganizationRulesetBypassActorArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetBypassActorArgs.cs new file mode 100644 index 00000000..4e9d0465 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetBypassActorArgs.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetBypassActorArgs : global::Pulumi.ResourceArgs + { + /// + /// (Number) The ID of the actor that can bypass a ruleset + /// + [Input("actorId", required: true)] + public Input ActorId { get; set; } = null!; + + /// + /// The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + /// + [Input("actorType", required: true)] + public Input ActorType { get; set; } = null!; + + /// + /// (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + /// + [Input("bypassMode")] + public Input? BypassMode { get; set; } + + public OrganizationRulesetBypassActorArgs() + { + } + public static new OrganizationRulesetBypassActorArgs Empty => new OrganizationRulesetBypassActorArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetBypassActorGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetBypassActorGetArgs.cs new file mode 100644 index 00000000..c8cfc94b --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetBypassActorGetArgs.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetBypassActorGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (Number) The ID of the actor that can bypass a ruleset + /// + [Input("actorId", required: true)] + public Input ActorId { get; set; } = null!; + + /// + /// The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + /// + [Input("actorType", required: true)] + public Input ActorType { get; set; } = null!; + + /// + /// (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + /// + [Input("bypassMode")] + public Input? BypassMode { get; set; } + + public OrganizationRulesetBypassActorGetArgs() + { + } + public static new OrganizationRulesetBypassActorGetArgs Empty => new OrganizationRulesetBypassActorGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetConditionsArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetConditionsArgs.cs new file mode 100644 index 00000000..da10066a --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetConditionsArgs.cs @@ -0,0 +1,40 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetConditionsArgs : global::Pulumi.ResourceArgs + { + /// + /// (Block List, Min: 1, Max: 1) (see below for nested schema) + /// + [Input("refName", required: true)] + public Input RefName { get; set; } = null!; + + /// + /// The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + /// + [Input("repositoryId")] + public Input? RepositoryId { get; set; } + + /// + /// Conflicts with `repository_id`. (see below for nested schema) + /// + /// One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + /// + [Input("repositoryName")] + public Input? RepositoryName { get; set; } + + public OrganizationRulesetConditionsArgs() + { + } + public static new OrganizationRulesetConditionsArgs Empty => new OrganizationRulesetConditionsArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetConditionsGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetConditionsGetArgs.cs new file mode 100644 index 00000000..bae85364 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetConditionsGetArgs.cs @@ -0,0 +1,40 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetConditionsGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (Block List, Min: 1, Max: 1) (see below for nested schema) + /// + [Input("refName", required: true)] + public Input RefName { get; set; } = null!; + + /// + /// The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + /// + [Input("repositoryId")] + public Input? RepositoryId { get; set; } + + /// + /// Conflicts with `repository_id`. (see below for nested schema) + /// + /// One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + /// + [Input("repositoryName")] + public Input? RepositoryName { get; set; } + + public OrganizationRulesetConditionsGetArgs() + { + } + public static new OrganizationRulesetConditionsGetArgs Empty => new OrganizationRulesetConditionsGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetConditionsRefNameArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetConditionsRefNameArgs.cs new file mode 100644 index 00000000..f5bdda72 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetConditionsRefNameArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetConditionsRefNameArgs : global::Pulumi.ResourceArgs + { + [Input("excludes", required: true)] + private InputList? _excludes; + + /// + /// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + /// + public InputList Excludes + { + get => _excludes ?? (_excludes = new InputList()); + set => _excludes = value; + } + + [Input("includes", required: true)] + private InputList? _includes; + + /// + /// (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + /// + public InputList Includes + { + get => _includes ?? (_includes = new InputList()); + set => _includes = value; + } + + public OrganizationRulesetConditionsRefNameArgs() + { + } + public static new OrganizationRulesetConditionsRefNameArgs Empty => new OrganizationRulesetConditionsRefNameArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetConditionsRefNameGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetConditionsRefNameGetArgs.cs new file mode 100644 index 00000000..9b6b752f --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetConditionsRefNameGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetConditionsRefNameGetArgs : global::Pulumi.ResourceArgs + { + [Input("excludes", required: true)] + private InputList? _excludes; + + /// + /// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + /// + public InputList Excludes + { + get => _excludes ?? (_excludes = new InputList()); + set => _excludes = value; + } + + [Input("includes", required: true)] + private InputList? _includes; + + /// + /// (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + /// + public InputList Includes + { + get => _includes ?? (_includes = new InputList()); + set => _includes = value; + } + + public OrganizationRulesetConditionsRefNameGetArgs() + { + } + public static new OrganizationRulesetConditionsRefNameGetArgs Empty => new OrganizationRulesetConditionsRefNameGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetConditionsRepositoryNameArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetConditionsRepositoryNameArgs.cs new file mode 100644 index 00000000..d9db3268 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetConditionsRepositoryNameArgs.cs @@ -0,0 +1,47 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetConditionsRepositoryNameArgs : global::Pulumi.ResourceArgs + { + [Input("excludes", required: true)] + private InputList? _excludes; + + /// + /// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + /// + public InputList Excludes + { + get => _excludes ?? (_excludes = new InputList()); + set => _excludes = value; + } + + [Input("inlcudes", required: true)] + private InputList? _inlcudes; + + /// + /// (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + /// + public InputList Inlcudes + { + get => _inlcudes ?? (_inlcudes = new InputList()); + set => _inlcudes = value; + } + + [Input("protected")] + public Input? Protected { get; set; } + + public OrganizationRulesetConditionsRepositoryNameArgs() + { + } + public static new OrganizationRulesetConditionsRepositoryNameArgs Empty => new OrganizationRulesetConditionsRepositoryNameArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetConditionsRepositoryNameGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetConditionsRepositoryNameGetArgs.cs new file mode 100644 index 00000000..05b2709a --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetConditionsRepositoryNameGetArgs.cs @@ -0,0 +1,47 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetConditionsRepositoryNameGetArgs : global::Pulumi.ResourceArgs + { + [Input("excludes", required: true)] + private InputList? _excludes; + + /// + /// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + /// + public InputList Excludes + { + get => _excludes ?? (_excludes = new InputList()); + set => _excludes = value; + } + + [Input("inlcudes", required: true)] + private InputList? _inlcudes; + + /// + /// (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + /// + public InputList Inlcudes + { + get => _inlcudes ?? (_inlcudes = new InputList()); + set => _inlcudes = value; + } + + [Input("protected")] + public Input? Protected { get; set; } + + public OrganizationRulesetConditionsRepositoryNameGetArgs() + { + } + public static new OrganizationRulesetConditionsRepositoryNameGetArgs Empty => new OrganizationRulesetConditionsRepositoryNameGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesArgs.cs new file mode 100644 index 00000000..538f9675 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesArgs.cs @@ -0,0 +1,98 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesArgs : global::Pulumi.ResourceArgs + { + /// + /// (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + /// + [Input("branchNamePattern")] + public Input? BranchNamePattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("commitAuthorEmailPattern")] + public Input? CommitAuthorEmailPattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("commitMessagePattern")] + public Input? CommitMessagePattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("committerEmailPattern")] + public Input? CommitterEmailPattern { get; set; } + + /// + /// (Boolean) Only allow users with bypass permission to create matching refs. + /// + [Input("creation")] + public Input? Creation { get; set; } + + /// + /// (Boolean) Only allow users with bypass permissions to delete matching refs. + /// + [Input("deletion")] + public Input? Deletion { get; set; } + + /// + /// (Boolean) Prevent users with push access from force pushing to branches. + /// + [Input("nonFastForward")] + public Input? NonFastForward { get; set; } + + /// + /// (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + /// + [Input("pullRequest")] + public Input? PullRequest { get; set; } + + /// + /// (Boolean) Prevent merge commits from being pushed to matching branches. + /// + [Input("requiredLinearHistory")] + public Input? RequiredLinearHistory { get; set; } + + /// + /// (Boolean) Commits pushed to matching branches must have verified signatures. + /// + [Input("requiredSignatures")] + public Input? RequiredSignatures { get; set; } + + /// + /// (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + /// + [Input("requiredStatusChecks")] + public Input? RequiredStatusChecks { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + /// + [Input("tagNamePattern")] + public Input? TagNamePattern { get; set; } + + /// + /// (Boolean) Only allow users with bypass permission to update matching refs. + /// + [Input("update")] + public Input? Update { get; set; } + + public OrganizationRulesetRulesArgs() + { + } + public static new OrganizationRulesetRulesArgs Empty => new OrganizationRulesetRulesArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesBranchNamePatternArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesBranchNamePatternArgs.cs new file mode 100644 index 00000000..ecce6a5b --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesBranchNamePatternArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesBranchNamePatternArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public OrganizationRulesetRulesBranchNamePatternArgs() + { + } + public static new OrganizationRulesetRulesBranchNamePatternArgs Empty => new OrganizationRulesetRulesBranchNamePatternArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesBranchNamePatternGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesBranchNamePatternGetArgs.cs new file mode 100644 index 00000000..6d1a5cca --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesBranchNamePatternGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesBranchNamePatternGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public OrganizationRulesetRulesBranchNamePatternGetArgs() + { + } + public static new OrganizationRulesetRulesBranchNamePatternGetArgs Empty => new OrganizationRulesetRulesBranchNamePatternGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitAuthorEmailPatternArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitAuthorEmailPatternArgs.cs new file mode 100644 index 00000000..03df6b6d --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitAuthorEmailPatternArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesCommitAuthorEmailPatternArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public OrganizationRulesetRulesCommitAuthorEmailPatternArgs() + { + } + public static new OrganizationRulesetRulesCommitAuthorEmailPatternArgs Empty => new OrganizationRulesetRulesCommitAuthorEmailPatternArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitAuthorEmailPatternGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitAuthorEmailPatternGetArgs.cs new file mode 100644 index 00000000..f46cc140 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitAuthorEmailPatternGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesCommitAuthorEmailPatternGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public OrganizationRulesetRulesCommitAuthorEmailPatternGetArgs() + { + } + public static new OrganizationRulesetRulesCommitAuthorEmailPatternGetArgs Empty => new OrganizationRulesetRulesCommitAuthorEmailPatternGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitMessagePatternArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitMessagePatternArgs.cs new file mode 100644 index 00000000..5183f8d9 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitMessagePatternArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesCommitMessagePatternArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public OrganizationRulesetRulesCommitMessagePatternArgs() + { + } + public static new OrganizationRulesetRulesCommitMessagePatternArgs Empty => new OrganizationRulesetRulesCommitMessagePatternArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitMessagePatternGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitMessagePatternGetArgs.cs new file mode 100644 index 00000000..04814731 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitMessagePatternGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesCommitMessagePatternGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public OrganizationRulesetRulesCommitMessagePatternGetArgs() + { + } + public static new OrganizationRulesetRulesCommitMessagePatternGetArgs Empty => new OrganizationRulesetRulesCommitMessagePatternGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitterEmailPatternArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitterEmailPatternArgs.cs new file mode 100644 index 00000000..b275efb1 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitterEmailPatternArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesCommitterEmailPatternArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public OrganizationRulesetRulesCommitterEmailPatternArgs() + { + } + public static new OrganizationRulesetRulesCommitterEmailPatternArgs Empty => new OrganizationRulesetRulesCommitterEmailPatternArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitterEmailPatternGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitterEmailPatternGetArgs.cs new file mode 100644 index 00000000..f8705672 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesCommitterEmailPatternGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesCommitterEmailPatternGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public OrganizationRulesetRulesCommitterEmailPatternGetArgs() + { + } + public static new OrganizationRulesetRulesCommitterEmailPatternGetArgs Empty => new OrganizationRulesetRulesCommitterEmailPatternGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesGetArgs.cs new file mode 100644 index 00000000..e5145c9f --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesGetArgs.cs @@ -0,0 +1,98 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + /// + [Input("branchNamePattern")] + public Input? BranchNamePattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("commitAuthorEmailPattern")] + public Input? CommitAuthorEmailPattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("commitMessagePattern")] + public Input? CommitMessagePattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("committerEmailPattern")] + public Input? CommitterEmailPattern { get; set; } + + /// + /// (Boolean) Only allow users with bypass permission to create matching refs. + /// + [Input("creation")] + public Input? Creation { get; set; } + + /// + /// (Boolean) Only allow users with bypass permissions to delete matching refs. + /// + [Input("deletion")] + public Input? Deletion { get; set; } + + /// + /// (Boolean) Prevent users with push access from force pushing to branches. + /// + [Input("nonFastForward")] + public Input? NonFastForward { get; set; } + + /// + /// (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + /// + [Input("pullRequest")] + public Input? PullRequest { get; set; } + + /// + /// (Boolean) Prevent merge commits from being pushed to matching branches. + /// + [Input("requiredLinearHistory")] + public Input? RequiredLinearHistory { get; set; } + + /// + /// (Boolean) Commits pushed to matching branches must have verified signatures. + /// + [Input("requiredSignatures")] + public Input? RequiredSignatures { get; set; } + + /// + /// (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + /// + [Input("requiredStatusChecks")] + public Input? RequiredStatusChecks { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + /// + [Input("tagNamePattern")] + public Input? TagNamePattern { get; set; } + + /// + /// (Boolean) Only allow users with bypass permission to update matching refs. + /// + [Input("update")] + public Input? Update { get; set; } + + public OrganizationRulesetRulesGetArgs() + { + } + public static new OrganizationRulesetRulesGetArgs Empty => new OrganizationRulesetRulesGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesPullRequestArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesPullRequestArgs.cs new file mode 100644 index 00000000..5152cb39 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesPullRequestArgs.cs @@ -0,0 +1,50 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesPullRequestArgs : global::Pulumi.ResourceArgs + { + /// + /// (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + /// + [Input("dismissStaleReviewsOnPush")] + public Input? DismissStaleReviewsOnPush { get; set; } + + /// + /// (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + /// + [Input("requireCodeOwnerReview")] + public Input? RequireCodeOwnerReview { get; set; } + + /// + /// (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + /// + [Input("requireLastPushApproval")] + public Input? RequireLastPushApproval { get; set; } + + /// + /// (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + /// + [Input("requiredApprovingReviewCount")] + public Input? RequiredApprovingReviewCount { get; set; } + + /// + /// (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + /// + [Input("requiredReviewThreadResolution")] + public Input? RequiredReviewThreadResolution { get; set; } + + public OrganizationRulesetRulesPullRequestArgs() + { + } + public static new OrganizationRulesetRulesPullRequestArgs Empty => new OrganizationRulesetRulesPullRequestArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesPullRequestGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesPullRequestGetArgs.cs new file mode 100644 index 00000000..3e6e1771 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesPullRequestGetArgs.cs @@ -0,0 +1,50 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesPullRequestGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + /// + [Input("dismissStaleReviewsOnPush")] + public Input? DismissStaleReviewsOnPush { get; set; } + + /// + /// (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + /// + [Input("requireCodeOwnerReview")] + public Input? RequireCodeOwnerReview { get; set; } + + /// + /// (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + /// + [Input("requireLastPushApproval")] + public Input? RequireLastPushApproval { get; set; } + + /// + /// (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + /// + [Input("requiredApprovingReviewCount")] + public Input? RequiredApprovingReviewCount { get; set; } + + /// + /// (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + /// + [Input("requiredReviewThreadResolution")] + public Input? RequiredReviewThreadResolution { get; set; } + + public OrganizationRulesetRulesPullRequestGetArgs() + { + } + public static new OrganizationRulesetRulesPullRequestGetArgs Empty => new OrganizationRulesetRulesPullRequestGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksArgs.cs new file mode 100644 index 00000000..f20a27d2 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksArgs.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesRequiredStatusChecksArgs : global::Pulumi.ResourceArgs + { + [Input("requiredChecks", required: true)] + private InputList? _requiredChecks; + + /// + /// (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + /// + public InputList RequiredChecks + { + get => _requiredChecks ?? (_requiredChecks = new InputList()); + set => _requiredChecks = value; + } + + /// + /// (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + /// + [Input("strictRequiredStatusChecksPolicy")] + public Input? StrictRequiredStatusChecksPolicy { get; set; } + + public OrganizationRulesetRulesRequiredStatusChecksArgs() + { + } + public static new OrganizationRulesetRulesRequiredStatusChecksArgs Empty => new OrganizationRulesetRulesRequiredStatusChecksArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksGetArgs.cs new file mode 100644 index 00000000..880398b3 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksGetArgs.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesRequiredStatusChecksGetArgs : global::Pulumi.ResourceArgs + { + [Input("requiredChecks", required: true)] + private InputList? _requiredChecks; + + /// + /// (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + /// + public InputList RequiredChecks + { + get => _requiredChecks ?? (_requiredChecks = new InputList()); + set => _requiredChecks = value; + } + + /// + /// (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + /// + [Input("strictRequiredStatusChecksPolicy")] + public Input? StrictRequiredStatusChecksPolicy { get; set; } + + public OrganizationRulesetRulesRequiredStatusChecksGetArgs() + { + } + public static new OrganizationRulesetRulesRequiredStatusChecksGetArgs Empty => new OrganizationRulesetRulesRequiredStatusChecksGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs.cs new file mode 100644 index 00000000..cce055fa --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs.cs @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The status check context name that must be present on the commit. + /// + [Input("context", required: true)] + public Input Context { get; set; } = null!; + + /// + /// (Number) The optional integration ID that this status check must originate from. + /// + [Input("integrationId")] + public Input? IntegrationId { get; set; } + + public OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs() + { + } + public static new OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs Empty => new OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckGetArgs.cs new file mode 100644 index 00000000..f3850823 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckGetArgs.cs @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesRequiredStatusChecksRequiredCheckGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The status check context name that must be present on the commit. + /// + [Input("context", required: true)] + public Input Context { get; set; } = null!; + + /// + /// (Number) The optional integration ID that this status check must originate from. + /// + [Input("integrationId")] + public Input? IntegrationId { get; set; } + + public OrganizationRulesetRulesRequiredStatusChecksRequiredCheckGetArgs() + { + } + public static new OrganizationRulesetRulesRequiredStatusChecksRequiredCheckGetArgs Empty => new OrganizationRulesetRulesRequiredStatusChecksRequiredCheckGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesTagNamePatternArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesTagNamePatternArgs.cs new file mode 100644 index 00000000..601ed7a3 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesTagNamePatternArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesTagNamePatternArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public OrganizationRulesetRulesTagNamePatternArgs() + { + } + public static new OrganizationRulesetRulesTagNamePatternArgs Empty => new OrganizationRulesetRulesTagNamePatternArgs(); + } +} diff --git a/sdk/dotnet/Inputs/OrganizationRulesetRulesTagNamePatternGetArgs.cs b/sdk/dotnet/Inputs/OrganizationRulesetRulesTagNamePatternGetArgs.cs new file mode 100644 index 00000000..ca3fda55 --- /dev/null +++ b/sdk/dotnet/Inputs/OrganizationRulesetRulesTagNamePatternGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class OrganizationRulesetRulesTagNamePatternGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public OrganizationRulesetRulesTagNamePatternGetArgs() + { + } + public static new OrganizationRulesetRulesTagNamePatternGetArgs Empty => new OrganizationRulesetRulesTagNamePatternGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetBypassActorArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetBypassActorArgs.cs new file mode 100644 index 00000000..e43a43c2 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetBypassActorArgs.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetBypassActorArgs : global::Pulumi.ResourceArgs + { + /// + /// (Number) The ID of the actor that can bypass a ruleset + /// + [Input("actorId", required: true)] + public Input ActorId { get; set; } = null!; + + /// + /// The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + /// + [Input("actorType", required: true)] + public Input ActorType { get; set; } = null!; + + /// + /// (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + /// + [Input("bypassMode")] + public Input? BypassMode { get; set; } + + public RepositoryRulesetBypassActorArgs() + { + } + public static new RepositoryRulesetBypassActorArgs Empty => new RepositoryRulesetBypassActorArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetBypassActorGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetBypassActorGetArgs.cs new file mode 100644 index 00000000..2f5b4c2e --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetBypassActorGetArgs.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetBypassActorGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (Number) The ID of the actor that can bypass a ruleset + /// + [Input("actorId", required: true)] + public Input ActorId { get; set; } = null!; + + /// + /// The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + /// + [Input("actorType", required: true)] + public Input ActorType { get; set; } = null!; + + /// + /// (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + /// + [Input("bypassMode")] + public Input? BypassMode { get; set; } + + public RepositoryRulesetBypassActorGetArgs() + { + } + public static new RepositoryRulesetBypassActorGetArgs Empty => new RepositoryRulesetBypassActorGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetConditionsArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetConditionsArgs.cs new file mode 100644 index 00000000..d4c0feaf --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetConditionsArgs.cs @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetConditionsArgs : global::Pulumi.ResourceArgs + { + /// + /// (Block List, Min: 1, Max: 1) (see below for nested schema) + /// + [Input("refName", required: true)] + public Input RefName { get; set; } = null!; + + public RepositoryRulesetConditionsArgs() + { + } + public static new RepositoryRulesetConditionsArgs Empty => new RepositoryRulesetConditionsArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetConditionsGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetConditionsGetArgs.cs new file mode 100644 index 00000000..9d162b4e --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetConditionsGetArgs.cs @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetConditionsGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (Block List, Min: 1, Max: 1) (see below for nested schema) + /// + [Input("refName", required: true)] + public Input RefName { get; set; } = null!; + + public RepositoryRulesetConditionsGetArgs() + { + } + public static new RepositoryRulesetConditionsGetArgs Empty => new RepositoryRulesetConditionsGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetConditionsRefNameArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetConditionsRefNameArgs.cs new file mode 100644 index 00000000..8d1170fd --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetConditionsRefNameArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetConditionsRefNameArgs : global::Pulumi.ResourceArgs + { + [Input("excludes", required: true)] + private InputList? _excludes; + + /// + /// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + /// + public InputList Excludes + { + get => _excludes ?? (_excludes = new InputList()); + set => _excludes = value; + } + + [Input("includes", required: true)] + private InputList? _includes; + + /// + /// (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + /// + public InputList Includes + { + get => _includes ?? (_includes = new InputList()); + set => _includes = value; + } + + public RepositoryRulesetConditionsRefNameArgs() + { + } + public static new RepositoryRulesetConditionsRefNameArgs Empty => new RepositoryRulesetConditionsRefNameArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetConditionsRefNameGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetConditionsRefNameGetArgs.cs new file mode 100644 index 00000000..a63371c5 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetConditionsRefNameGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetConditionsRefNameGetArgs : global::Pulumi.ResourceArgs + { + [Input("excludes", required: true)] + private InputList? _excludes; + + /// + /// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + /// + public InputList Excludes + { + get => _excludes ?? (_excludes = new InputList()); + set => _excludes = value; + } + + [Input("includes", required: true)] + private InputList? _includes; + + /// + /// (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + /// + public InputList Includes + { + get => _includes ?? (_includes = new InputList()); + set => _includes = value; + } + + public RepositoryRulesetConditionsRefNameGetArgs() + { + } + public static new RepositoryRulesetConditionsRefNameGetArgs Empty => new RepositoryRulesetConditionsRefNameGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesArgs.cs new file mode 100644 index 00000000..417c150f --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesArgs.cs @@ -0,0 +1,110 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesArgs : global::Pulumi.ResourceArgs + { + /// + /// (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + /// + [Input("branchNamePattern")] + public Input? BranchNamePattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("commitAuthorEmailPattern")] + public Input? CommitAuthorEmailPattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("commitMessagePattern")] + public Input? CommitMessagePattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("committerEmailPattern")] + public Input? CommitterEmailPattern { get; set; } + + /// + /// (Boolean) Only allow users with bypass permission to create matching refs. + /// + [Input("creation")] + public Input? Creation { get; set; } + + /// + /// (Boolean) Only allow users with bypass permissions to delete matching refs. + /// + [Input("deletion")] + public Input? Deletion { get; set; } + + /// + /// (Boolean) Prevent users with push access from force pushing to branches. + /// + [Input("nonFastForward")] + public Input? NonFastForward { get; set; } + + /// + /// (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + /// + [Input("pullRequest")] + public Input? PullRequest { get; set; } + + /// + /// (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + /// + [Input("requiredDeployments")] + public Input? RequiredDeployments { get; set; } + + /// + /// (Boolean) Prevent merge commits from being pushed to matching branches. + /// + [Input("requiredLinearHistory")] + public Input? RequiredLinearHistory { get; set; } + + /// + /// (Boolean) Commits pushed to matching branches must have verified signatures. + /// + [Input("requiredSignatures")] + public Input? RequiredSignatures { get; set; } + + /// + /// (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + /// + [Input("requiredStatusChecks")] + public Input? RequiredStatusChecks { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + /// + [Input("tagNamePattern")] + public Input? TagNamePattern { get; set; } + + /// + /// (Boolean) Only allow users with bypass permission to update matching refs. + /// + [Input("update")] + public Input? Update { get; set; } + + /// + /// (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + /// + [Input("updateAllowsFetchAndMerge")] + public Input? UpdateAllowsFetchAndMerge { get; set; } + + public RepositoryRulesetRulesArgs() + { + } + public static new RepositoryRulesetRulesArgs Empty => new RepositoryRulesetRulesArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesBranchNamePatternArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesBranchNamePatternArgs.cs new file mode 100644 index 00000000..383d8365 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesBranchNamePatternArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesBranchNamePatternArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public RepositoryRulesetRulesBranchNamePatternArgs() + { + } + public static new RepositoryRulesetRulesBranchNamePatternArgs Empty => new RepositoryRulesetRulesBranchNamePatternArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesBranchNamePatternGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesBranchNamePatternGetArgs.cs new file mode 100644 index 00000000..a7cebdfd --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesBranchNamePatternGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesBranchNamePatternGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public RepositoryRulesetRulesBranchNamePatternGetArgs() + { + } + public static new RepositoryRulesetRulesBranchNamePatternGetArgs Empty => new RepositoryRulesetRulesBranchNamePatternGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitAuthorEmailPatternArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitAuthorEmailPatternArgs.cs new file mode 100644 index 00000000..3364621b --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitAuthorEmailPatternArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesCommitAuthorEmailPatternArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public RepositoryRulesetRulesCommitAuthorEmailPatternArgs() + { + } + public static new RepositoryRulesetRulesCommitAuthorEmailPatternArgs Empty => new RepositoryRulesetRulesCommitAuthorEmailPatternArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitAuthorEmailPatternGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitAuthorEmailPatternGetArgs.cs new file mode 100644 index 00000000..8f6a64b6 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitAuthorEmailPatternGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesCommitAuthorEmailPatternGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public RepositoryRulesetRulesCommitAuthorEmailPatternGetArgs() + { + } + public static new RepositoryRulesetRulesCommitAuthorEmailPatternGetArgs Empty => new RepositoryRulesetRulesCommitAuthorEmailPatternGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitMessagePatternArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitMessagePatternArgs.cs new file mode 100644 index 00000000..a30b10ce --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitMessagePatternArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesCommitMessagePatternArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public RepositoryRulesetRulesCommitMessagePatternArgs() + { + } + public static new RepositoryRulesetRulesCommitMessagePatternArgs Empty => new RepositoryRulesetRulesCommitMessagePatternArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitMessagePatternGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitMessagePatternGetArgs.cs new file mode 100644 index 00000000..ad8b0c66 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitMessagePatternGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesCommitMessagePatternGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public RepositoryRulesetRulesCommitMessagePatternGetArgs() + { + } + public static new RepositoryRulesetRulesCommitMessagePatternGetArgs Empty => new RepositoryRulesetRulesCommitMessagePatternGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitterEmailPatternArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitterEmailPatternArgs.cs new file mode 100644 index 00000000..35ab0ca7 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitterEmailPatternArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesCommitterEmailPatternArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public RepositoryRulesetRulesCommitterEmailPatternArgs() + { + } + public static new RepositoryRulesetRulesCommitterEmailPatternArgs Empty => new RepositoryRulesetRulesCommitterEmailPatternArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitterEmailPatternGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitterEmailPatternGetArgs.cs new file mode 100644 index 00000000..63eea320 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesCommitterEmailPatternGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesCommitterEmailPatternGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public RepositoryRulesetRulesCommitterEmailPatternGetArgs() + { + } + public static new RepositoryRulesetRulesCommitterEmailPatternGetArgs Empty => new RepositoryRulesetRulesCommitterEmailPatternGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesGetArgs.cs new file mode 100644 index 00000000..2951adc1 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesGetArgs.cs @@ -0,0 +1,110 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + /// + [Input("branchNamePattern")] + public Input? BranchNamePattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("commitAuthorEmailPattern")] + public Input? CommitAuthorEmailPattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("commitMessagePattern")] + public Input? CommitMessagePattern { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + [Input("committerEmailPattern")] + public Input? CommitterEmailPattern { get; set; } + + /// + /// (Boolean) Only allow users with bypass permission to create matching refs. + /// + [Input("creation")] + public Input? Creation { get; set; } + + /// + /// (Boolean) Only allow users with bypass permissions to delete matching refs. + /// + [Input("deletion")] + public Input? Deletion { get; set; } + + /// + /// (Boolean) Prevent users with push access from force pushing to branches. + /// + [Input("nonFastForward")] + public Input? NonFastForward { get; set; } + + /// + /// (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + /// + [Input("pullRequest")] + public Input? PullRequest { get; set; } + + /// + /// (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + /// + [Input("requiredDeployments")] + public Input? RequiredDeployments { get; set; } + + /// + /// (Boolean) Prevent merge commits from being pushed to matching branches. + /// + [Input("requiredLinearHistory")] + public Input? RequiredLinearHistory { get; set; } + + /// + /// (Boolean) Commits pushed to matching branches must have verified signatures. + /// + [Input("requiredSignatures")] + public Input? RequiredSignatures { get; set; } + + /// + /// (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + /// + [Input("requiredStatusChecks")] + public Input? RequiredStatusChecks { get; set; } + + /// + /// (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + /// + [Input("tagNamePattern")] + public Input? TagNamePattern { get; set; } + + /// + /// (Boolean) Only allow users with bypass permission to update matching refs. + /// + [Input("update")] + public Input? Update { get; set; } + + /// + /// (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + /// + [Input("updateAllowsFetchAndMerge")] + public Input? UpdateAllowsFetchAndMerge { get; set; } + + public RepositoryRulesetRulesGetArgs() + { + } + public static new RepositoryRulesetRulesGetArgs Empty => new RepositoryRulesetRulesGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesPullRequestArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesPullRequestArgs.cs new file mode 100644 index 00000000..dc9809be --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesPullRequestArgs.cs @@ -0,0 +1,50 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesPullRequestArgs : global::Pulumi.ResourceArgs + { + /// + /// (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + /// + [Input("dismissStaleReviewsOnPush")] + public Input? DismissStaleReviewsOnPush { get; set; } + + /// + /// (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + /// + [Input("requireCodeOwnerReview")] + public Input? RequireCodeOwnerReview { get; set; } + + /// + /// (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + /// + [Input("requireLastPushApproval")] + public Input? RequireLastPushApproval { get; set; } + + /// + /// (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + /// + [Input("requiredApprovingReviewCount")] + public Input? RequiredApprovingReviewCount { get; set; } + + /// + /// (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + /// + [Input("requiredReviewThreadResolution")] + public Input? RequiredReviewThreadResolution { get; set; } + + public RepositoryRulesetRulesPullRequestArgs() + { + } + public static new RepositoryRulesetRulesPullRequestArgs Empty => new RepositoryRulesetRulesPullRequestArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesPullRequestGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesPullRequestGetArgs.cs new file mode 100644 index 00000000..3fd38ce8 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesPullRequestGetArgs.cs @@ -0,0 +1,50 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesPullRequestGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + /// + [Input("dismissStaleReviewsOnPush")] + public Input? DismissStaleReviewsOnPush { get; set; } + + /// + /// (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + /// + [Input("requireCodeOwnerReview")] + public Input? RequireCodeOwnerReview { get; set; } + + /// + /// (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + /// + [Input("requireLastPushApproval")] + public Input? RequireLastPushApproval { get; set; } + + /// + /// (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + /// + [Input("requiredApprovingReviewCount")] + public Input? RequiredApprovingReviewCount { get; set; } + + /// + /// (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + /// + [Input("requiredReviewThreadResolution")] + public Input? RequiredReviewThreadResolution { get; set; } + + public RepositoryRulesetRulesPullRequestGetArgs() + { + } + public static new RepositoryRulesetRulesPullRequestGetArgs Empty => new RepositoryRulesetRulesPullRequestGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredDeploymentsArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredDeploymentsArgs.cs new file mode 100644 index 00000000..e1a1ca07 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredDeploymentsArgs.cs @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesRequiredDeploymentsArgs : global::Pulumi.ResourceArgs + { + [Input("requiredDeploymentEnvironments", required: true)] + private InputList? _requiredDeploymentEnvironments; + + /// + /// (List of String) The environments that must be successfully deployed to before branches can be merged. + /// + public InputList RequiredDeploymentEnvironments + { + get => _requiredDeploymentEnvironments ?? (_requiredDeploymentEnvironments = new InputList()); + set => _requiredDeploymentEnvironments = value; + } + + public RepositoryRulesetRulesRequiredDeploymentsArgs() + { + } + public static new RepositoryRulesetRulesRequiredDeploymentsArgs Empty => new RepositoryRulesetRulesRequiredDeploymentsArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredDeploymentsGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredDeploymentsGetArgs.cs new file mode 100644 index 00000000..05e56b5a --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredDeploymentsGetArgs.cs @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesRequiredDeploymentsGetArgs : global::Pulumi.ResourceArgs + { + [Input("requiredDeploymentEnvironments", required: true)] + private InputList? _requiredDeploymentEnvironments; + + /// + /// (List of String) The environments that must be successfully deployed to before branches can be merged. + /// + public InputList RequiredDeploymentEnvironments + { + get => _requiredDeploymentEnvironments ?? (_requiredDeploymentEnvironments = new InputList()); + set => _requiredDeploymentEnvironments = value; + } + + public RepositoryRulesetRulesRequiredDeploymentsGetArgs() + { + } + public static new RepositoryRulesetRulesRequiredDeploymentsGetArgs Empty => new RepositoryRulesetRulesRequiredDeploymentsGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.cs new file mode 100644 index 00000000..db080f4c --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesRequiredStatusChecksArgs : global::Pulumi.ResourceArgs + { + [Input("requiredChecks", required: true)] + private InputList? _requiredChecks; + + /// + /// (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + /// + public InputList RequiredChecks + { + get => _requiredChecks ?? (_requiredChecks = new InputList()); + set => _requiredChecks = value; + } + + /// + /// (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + /// + [Input("strictRequiredStatusChecksPolicy")] + public Input? StrictRequiredStatusChecksPolicy { get; set; } + + public RepositoryRulesetRulesRequiredStatusChecksArgs() + { + } + public static new RepositoryRulesetRulesRequiredStatusChecksArgs Empty => new RepositoryRulesetRulesRequiredStatusChecksArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksGetArgs.cs new file mode 100644 index 00000000..87a6f61f --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksGetArgs.cs @@ -0,0 +1,38 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesRequiredStatusChecksGetArgs : global::Pulumi.ResourceArgs + { + [Input("requiredChecks", required: true)] + private InputList? _requiredChecks; + + /// + /// (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + /// + public InputList RequiredChecks + { + get => _requiredChecks ?? (_requiredChecks = new InputList()); + set => _requiredChecks = value; + } + + /// + /// (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + /// + [Input("strictRequiredStatusChecksPolicy")] + public Input? StrictRequiredStatusChecksPolicy { get; set; } + + public RepositoryRulesetRulesRequiredStatusChecksGetArgs() + { + } + public static new RepositoryRulesetRulesRequiredStatusChecksGetArgs Empty => new RepositoryRulesetRulesRequiredStatusChecksGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs.cs new file mode 100644 index 00000000..1c36ac17 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs.cs @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The status check context name that must be present on the commit. + /// + [Input("context", required: true)] + public Input Context { get; set; } = null!; + + /// + /// (Number) The optional integration ID that this status check must originate from. + /// + [Input("integrationId")] + public Input? IntegrationId { get; set; } + + public RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs() + { + } + public static new RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs Empty => new RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckGetArgs.cs new file mode 100644 index 00000000..5debec21 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckGetArgs.cs @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesRequiredStatusChecksRequiredCheckGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The status check context name that must be present on the commit. + /// + [Input("context", required: true)] + public Input Context { get; set; } = null!; + + /// + /// (Number) The optional integration ID that this status check must originate from. + /// + [Input("integrationId")] + public Input? IntegrationId { get; set; } + + public RepositoryRulesetRulesRequiredStatusChecksRequiredCheckGetArgs() + { + } + public static new RepositoryRulesetRulesRequiredStatusChecksRequiredCheckGetArgs Empty => new RepositoryRulesetRulesRequiredStatusChecksRequiredCheckGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesTagNamePatternArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesTagNamePatternArgs.cs new file mode 100644 index 00000000..93665a63 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesTagNamePatternArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesTagNamePatternArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public RepositoryRulesetRulesTagNamePatternArgs() + { + } + public static new RepositoryRulesetRulesTagNamePatternArgs Empty => new RepositoryRulesetRulesTagNamePatternArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RepositoryRulesetRulesTagNamePatternGetArgs.cs b/sdk/dotnet/Inputs/RepositoryRulesetRulesTagNamePatternGetArgs.cs new file mode 100644 index 00000000..b71b0f92 --- /dev/null +++ b/sdk/dotnet/Inputs/RepositoryRulesetRulesTagNamePatternGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Inputs +{ + + public sealed class RepositoryRulesetRulesTagNamePatternGetArgs : global::Pulumi.ResourceArgs + { + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + [Input("negate")] + public Input? Negate { get; set; } + + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + [Input("operator", required: true)] + public Input Operator { get; set; } = null!; + + /// + /// (String) The pattern to match with. + /// + [Input("pattern", required: true)] + public Input Pattern { get; set; } = null!; + + public RepositoryRulesetRulesTagNamePatternGetArgs() + { + } + public static new RepositoryRulesetRulesTagNamePatternGetArgs Empty => new RepositoryRulesetRulesTagNamePatternGetArgs(); + } +} diff --git a/sdk/dotnet/OrganizationRuleset.cs b/sdk/dotnet/OrganizationRuleset.cs new file mode 100644 index 00000000..f16e46c5 --- /dev/null +++ b/sdk/dotnet/OrganizationRuleset.cs @@ -0,0 +1,243 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github +{ + /// + /// Creates a GitHub organization ruleset. + /// + /// This resource allows you to create and manage rulesets on the organization level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + /// + /// ## Import + /// + /// GitHub Organization Rulesets can be imported using the GitHub ruleset ID e.g. + /// + /// ```sh + /// $ pulumi import github:index/organizationRuleset:OrganizationRuleset example 12345` + /// ``` + /// + [GithubResourceType("github:index/organizationRuleset:OrganizationRuleset")] + public partial class OrganizationRuleset : global::Pulumi.CustomResource + { + /// + /// (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + /// + [Output("bypassActors")] + public Output> BypassActors { get; private set; } = null!; + + /// + /// (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + /// + [Output("conditions")] + public Output Conditions { get; private set; } = null!; + + /// + /// (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + /// + [Output("enforcement")] + public Output Enforcement { get; private set; } = null!; + + /// + /// (String) + /// + [Output("etag")] + public Output Etag { get; private set; } = null!; + + /// + /// (String) The name of the ruleset. + /// + [Output("name")] + public Output Name { get; private set; } = null!; + + /// + /// (String) GraphQL global node id for use with v4 API. + /// + [Output("nodeId")] + public Output NodeId { get; private set; } = null!; + + /// + /// (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + /// + [Output("rules")] + public Output Rules { get; private set; } = null!; + + /// + /// (Number) GitHub ID for the ruleset. + /// + [Output("rulesetId")] + public Output RulesetId { get; private set; } = null!; + + /// + /// (String) Possible values are `branch` and `tag`. + /// + [Output("target")] + public Output Target { get; private set; } = null!; + + + /// + /// Create a OrganizationRuleset resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public OrganizationRuleset(string name, OrganizationRulesetArgs args, CustomResourceOptions? options = null) + : base("github:index/organizationRuleset:OrganizationRuleset", name, args ?? new OrganizationRulesetArgs(), MakeResourceOptions(options, "")) + { + } + + private OrganizationRuleset(string name, Input id, OrganizationRulesetState? state = null, CustomResourceOptions? options = null) + : base("github:index/organizationRuleset:OrganizationRuleset", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing OrganizationRuleset resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static OrganizationRuleset Get(string name, Input id, OrganizationRulesetState? state = null, CustomResourceOptions? options = null) + { + return new OrganizationRuleset(name, id, state, options); + } + } + + public sealed class OrganizationRulesetArgs : global::Pulumi.ResourceArgs + { + [Input("bypassActors")] + private InputList? _bypassActors; + + /// + /// (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + /// + public InputList BypassActors + { + get => _bypassActors ?? (_bypassActors = new InputList()); + set => _bypassActors = value; + } + + /// + /// (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + /// + [Input("conditions")] + public Input? Conditions { get; set; } + + /// + /// (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + /// + [Input("enforcement", required: true)] + public Input Enforcement { get; set; } = null!; + + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + /// + [Input("rules", required: true)] + public Input Rules { get; set; } = null!; + + /// + /// (String) Possible values are `branch` and `tag`. + /// + [Input("target", required: true)] + public Input Target { get; set; } = null!; + + public OrganizationRulesetArgs() + { + } + public static new OrganizationRulesetArgs Empty => new OrganizationRulesetArgs(); + } + + public sealed class OrganizationRulesetState : global::Pulumi.ResourceArgs + { + [Input("bypassActors")] + private InputList? _bypassActors; + + /// + /// (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + /// + public InputList BypassActors + { + get => _bypassActors ?? (_bypassActors = new InputList()); + set => _bypassActors = value; + } + + /// + /// (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + /// + [Input("conditions")] + public Input? Conditions { get; set; } + + /// + /// (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + /// + [Input("enforcement")] + public Input? Enforcement { get; set; } + + /// + /// (String) + /// + [Input("etag")] + public Input? Etag { get; set; } + + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (String) GraphQL global node id for use with v4 API. + /// + [Input("nodeId")] + public Input? NodeId { get; set; } + + /// + /// (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + /// + [Input("rules")] + public Input? Rules { get; set; } + + /// + /// (Number) GitHub ID for the ruleset. + /// + [Input("rulesetId")] + public Input? RulesetId { get; set; } + + /// + /// (String) Possible values are `branch` and `tag`. + /// + [Input("target")] + public Input? Target { get; set; } + + public OrganizationRulesetState() + { + } + public static new OrganizationRulesetState Empty => new OrganizationRulesetState(); + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetBypassActor.cs b/sdk/dotnet/Outputs/OrganizationRulesetBypassActor.cs new file mode 100644 index 00000000..e0493e98 --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetBypassActor.cs @@ -0,0 +1,42 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetBypassActor + { + /// + /// (Number) The ID of the actor that can bypass a ruleset + /// + public readonly int ActorId; + /// + /// The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + /// + public readonly string ActorType; + /// + /// (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + /// + public readonly string? BypassMode; + + [OutputConstructor] + private OrganizationRulesetBypassActor( + int actorId, + + string actorType, + + string? bypassMode) + { + ActorId = actorId; + ActorType = actorType; + BypassMode = bypassMode; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetConditions.cs b/sdk/dotnet/Outputs/OrganizationRulesetConditions.cs new file mode 100644 index 00000000..f122e2ea --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetConditions.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetConditions + { + /// + /// (Block List, Min: 1, Max: 1) (see below for nested schema) + /// + public readonly Outputs.OrganizationRulesetConditionsRefName RefName; + /// + /// The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + /// + public readonly int? RepositoryId; + /// + /// Conflicts with `repository_id`. (see below for nested schema) + /// + /// One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + /// + public readonly Outputs.OrganizationRulesetConditionsRepositoryName? RepositoryName; + + [OutputConstructor] + private OrganizationRulesetConditions( + Outputs.OrganizationRulesetConditionsRefName refName, + + int? repositoryId, + + Outputs.OrganizationRulesetConditionsRepositoryName? repositoryName) + { + RefName = refName; + RepositoryId = repositoryId; + RepositoryName = repositoryName; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetConditionsRefName.cs b/sdk/dotnet/Outputs/OrganizationRulesetConditionsRefName.cs new file mode 100644 index 00000000..5b785235 --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetConditionsRefName.cs @@ -0,0 +1,35 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetConditionsRefName + { + /// + /// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + /// + public readonly ImmutableArray Excludes; + /// + /// (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + /// + public readonly ImmutableArray Includes; + + [OutputConstructor] + private OrganizationRulesetConditionsRefName( + ImmutableArray excludes, + + ImmutableArray includes) + { + Excludes = excludes; + Includes = includes; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetConditionsRepositoryName.cs b/sdk/dotnet/Outputs/OrganizationRulesetConditionsRepositoryName.cs new file mode 100644 index 00000000..b308bd57 --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetConditionsRepositoryName.cs @@ -0,0 +1,39 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetConditionsRepositoryName + { + /// + /// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + /// + public readonly ImmutableArray Excludes; + /// + /// (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + /// + public readonly ImmutableArray Inlcudes; + public readonly bool? Protected; + + [OutputConstructor] + private OrganizationRulesetConditionsRepositoryName( + ImmutableArray excludes, + + ImmutableArray inlcudes, + + bool? @protected) + { + Excludes = excludes; + Inlcudes = inlcudes; + Protected = @protected; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetRules.cs b/sdk/dotnet/Outputs/OrganizationRulesetRules.cs new file mode 100644 index 00000000..fe1f5aa6 --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetRules.cs @@ -0,0 +1,112 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetRules + { + /// + /// (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + /// + public readonly Outputs.OrganizationRulesetRulesBranchNamePattern? BranchNamePattern; + /// + /// (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + public readonly Outputs.OrganizationRulesetRulesCommitAuthorEmailPattern? CommitAuthorEmailPattern; + /// + /// (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + public readonly Outputs.OrganizationRulesetRulesCommitMessagePattern? CommitMessagePattern; + /// + /// (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + public readonly Outputs.OrganizationRulesetRulesCommitterEmailPattern? CommitterEmailPattern; + /// + /// (Boolean) Only allow users with bypass permission to create matching refs. + /// + public readonly bool? Creation; + /// + /// (Boolean) Only allow users with bypass permissions to delete matching refs. + /// + public readonly bool? Deletion; + /// + /// (Boolean) Prevent users with push access from force pushing to branches. + /// + public readonly bool? NonFastForward; + /// + /// (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + /// + public readonly Outputs.OrganizationRulesetRulesPullRequest? PullRequest; + /// + /// (Boolean) Prevent merge commits from being pushed to matching branches. + /// + public readonly bool? RequiredLinearHistory; + /// + /// (Boolean) Commits pushed to matching branches must have verified signatures. + /// + public readonly bool? RequiredSignatures; + /// + /// (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + /// + public readonly Outputs.OrganizationRulesetRulesRequiredStatusChecks? RequiredStatusChecks; + /// + /// (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + /// + public readonly Outputs.OrganizationRulesetRulesTagNamePattern? TagNamePattern; + /// + /// (Boolean) Only allow users with bypass permission to update matching refs. + /// + public readonly bool? Update; + + [OutputConstructor] + private OrganizationRulesetRules( + Outputs.OrganizationRulesetRulesBranchNamePattern? branchNamePattern, + + Outputs.OrganizationRulesetRulesCommitAuthorEmailPattern? commitAuthorEmailPattern, + + Outputs.OrganizationRulesetRulesCommitMessagePattern? commitMessagePattern, + + Outputs.OrganizationRulesetRulesCommitterEmailPattern? committerEmailPattern, + + bool? creation, + + bool? deletion, + + bool? nonFastForward, + + Outputs.OrganizationRulesetRulesPullRequest? pullRequest, + + bool? requiredLinearHistory, + + bool? requiredSignatures, + + Outputs.OrganizationRulesetRulesRequiredStatusChecks? requiredStatusChecks, + + Outputs.OrganizationRulesetRulesTagNamePattern? tagNamePattern, + + bool? update) + { + BranchNamePattern = branchNamePattern; + CommitAuthorEmailPattern = commitAuthorEmailPattern; + CommitMessagePattern = commitMessagePattern; + CommitterEmailPattern = committerEmailPattern; + Creation = creation; + Deletion = deletion; + NonFastForward = nonFastForward; + PullRequest = pullRequest; + RequiredLinearHistory = requiredLinearHistory; + RequiredSignatures = requiredSignatures; + RequiredStatusChecks = requiredStatusChecks; + TagNamePattern = tagNamePattern; + Update = update; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetRulesBranchNamePattern.cs b/sdk/dotnet/Outputs/OrganizationRulesetRulesBranchNamePattern.cs new file mode 100644 index 00000000..089202d8 --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetRulesBranchNamePattern.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetRulesBranchNamePattern + { + /// + /// (String) The name of the ruleset. + /// + public readonly string? Name; + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + public readonly bool? Negate; + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + public readonly string Operator; + /// + /// (String) The pattern to match with. + /// + public readonly string Pattern; + + [OutputConstructor] + private OrganizationRulesetRulesBranchNamePattern( + string? name, + + bool? negate, + + string @operator, + + string pattern) + { + Name = name; + Negate = negate; + Operator = @operator; + Pattern = pattern; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetRulesCommitAuthorEmailPattern.cs b/sdk/dotnet/Outputs/OrganizationRulesetRulesCommitAuthorEmailPattern.cs new file mode 100644 index 00000000..fb94b457 --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetRulesCommitAuthorEmailPattern.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetRulesCommitAuthorEmailPattern + { + /// + /// (String) The name of the ruleset. + /// + public readonly string? Name; + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + public readonly bool? Negate; + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + public readonly string Operator; + /// + /// (String) The pattern to match with. + /// + public readonly string Pattern; + + [OutputConstructor] + private OrganizationRulesetRulesCommitAuthorEmailPattern( + string? name, + + bool? negate, + + string @operator, + + string pattern) + { + Name = name; + Negate = negate; + Operator = @operator; + Pattern = pattern; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetRulesCommitMessagePattern.cs b/sdk/dotnet/Outputs/OrganizationRulesetRulesCommitMessagePattern.cs new file mode 100644 index 00000000..4e55737c --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetRulesCommitMessagePattern.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetRulesCommitMessagePattern + { + /// + /// (String) The name of the ruleset. + /// + public readonly string? Name; + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + public readonly bool? Negate; + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + public readonly string Operator; + /// + /// (String) The pattern to match with. + /// + public readonly string Pattern; + + [OutputConstructor] + private OrganizationRulesetRulesCommitMessagePattern( + string? name, + + bool? negate, + + string @operator, + + string pattern) + { + Name = name; + Negate = negate; + Operator = @operator; + Pattern = pattern; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetRulesCommitterEmailPattern.cs b/sdk/dotnet/Outputs/OrganizationRulesetRulesCommitterEmailPattern.cs new file mode 100644 index 00000000..1d5f688d --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetRulesCommitterEmailPattern.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetRulesCommitterEmailPattern + { + /// + /// (String) The name of the ruleset. + /// + public readonly string? Name; + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + public readonly bool? Negate; + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + public readonly string Operator; + /// + /// (String) The pattern to match with. + /// + public readonly string Pattern; + + [OutputConstructor] + private OrganizationRulesetRulesCommitterEmailPattern( + string? name, + + bool? negate, + + string @operator, + + string pattern) + { + Name = name; + Negate = negate; + Operator = @operator; + Pattern = pattern; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetRulesPullRequest.cs b/sdk/dotnet/Outputs/OrganizationRulesetRulesPullRequest.cs new file mode 100644 index 00000000..570753cb --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetRulesPullRequest.cs @@ -0,0 +1,56 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetRulesPullRequest + { + /// + /// (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + /// + public readonly bool? DismissStaleReviewsOnPush; + /// + /// (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + /// + public readonly bool? RequireCodeOwnerReview; + /// + /// (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + /// + public readonly bool? RequireLastPushApproval; + /// + /// (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + /// + public readonly int? RequiredApprovingReviewCount; + /// + /// (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + /// + public readonly bool? RequiredReviewThreadResolution; + + [OutputConstructor] + private OrganizationRulesetRulesPullRequest( + bool? dismissStaleReviewsOnPush, + + bool? requireCodeOwnerReview, + + bool? requireLastPushApproval, + + int? requiredApprovingReviewCount, + + bool? requiredReviewThreadResolution) + { + DismissStaleReviewsOnPush = dismissStaleReviewsOnPush; + RequireCodeOwnerReview = requireCodeOwnerReview; + RequireLastPushApproval = requireLastPushApproval; + RequiredApprovingReviewCount = requiredApprovingReviewCount; + RequiredReviewThreadResolution = requiredReviewThreadResolution; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetRulesRequiredStatusChecks.cs b/sdk/dotnet/Outputs/OrganizationRulesetRulesRequiredStatusChecks.cs new file mode 100644 index 00000000..8d78385d --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetRulesRequiredStatusChecks.cs @@ -0,0 +1,35 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetRulesRequiredStatusChecks + { + /// + /// (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + /// + public readonly ImmutableArray RequiredChecks; + /// + /// (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + /// + public readonly bool? StrictRequiredStatusChecksPolicy; + + [OutputConstructor] + private OrganizationRulesetRulesRequiredStatusChecks( + ImmutableArray requiredChecks, + + bool? strictRequiredStatusChecksPolicy) + { + RequiredChecks = requiredChecks; + StrictRequiredStatusChecksPolicy = strictRequiredStatusChecksPolicy; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheck.cs b/sdk/dotnet/Outputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheck.cs new file mode 100644 index 00000000..f4d4f395 --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheck.cs @@ -0,0 +1,35 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetRulesRequiredStatusChecksRequiredCheck + { + /// + /// (String) The status check context name that must be present on the commit. + /// + public readonly string Context; + /// + /// (Number) The optional integration ID that this status check must originate from. + /// + public readonly int? IntegrationId; + + [OutputConstructor] + private OrganizationRulesetRulesRequiredStatusChecksRequiredCheck( + string context, + + int? integrationId) + { + Context = context; + IntegrationId = integrationId; + } + } +} diff --git a/sdk/dotnet/Outputs/OrganizationRulesetRulesTagNamePattern.cs b/sdk/dotnet/Outputs/OrganizationRulesetRulesTagNamePattern.cs new file mode 100644 index 00000000..2b67cdc8 --- /dev/null +++ b/sdk/dotnet/Outputs/OrganizationRulesetRulesTagNamePattern.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class OrganizationRulesetRulesTagNamePattern + { + /// + /// (String) The name of the ruleset. + /// + public readonly string? Name; + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + public readonly bool? Negate; + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + public readonly string Operator; + /// + /// (String) The pattern to match with. + /// + public readonly string Pattern; + + [OutputConstructor] + private OrganizationRulesetRulesTagNamePattern( + string? name, + + bool? negate, + + string @operator, + + string pattern) + { + Name = name; + Negate = negate; + Operator = @operator; + Pattern = pattern; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetBypassActor.cs b/sdk/dotnet/Outputs/RepositoryRulesetBypassActor.cs new file mode 100644 index 00000000..ecd8dd51 --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetBypassActor.cs @@ -0,0 +1,42 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetBypassActor + { + /// + /// (Number) The ID of the actor that can bypass a ruleset + /// + public readonly int ActorId; + /// + /// The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + /// + public readonly string ActorType; + /// + /// (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + /// + public readonly string? BypassMode; + + [OutputConstructor] + private RepositoryRulesetBypassActor( + int actorId, + + string actorType, + + string? bypassMode) + { + ActorId = actorId; + ActorType = actorType; + BypassMode = bypassMode; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetConditions.cs b/sdk/dotnet/Outputs/RepositoryRulesetConditions.cs new file mode 100644 index 00000000..a0ad1789 --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetConditions.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetConditions + { + /// + /// (Block List, Min: 1, Max: 1) (see below for nested schema) + /// + public readonly Outputs.RepositoryRulesetConditionsRefName RefName; + + [OutputConstructor] + private RepositoryRulesetConditions(Outputs.RepositoryRulesetConditionsRefName refName) + { + RefName = refName; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetConditionsRefName.cs b/sdk/dotnet/Outputs/RepositoryRulesetConditionsRefName.cs new file mode 100644 index 00000000..2cd55602 --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetConditionsRefName.cs @@ -0,0 +1,35 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetConditionsRefName + { + /// + /// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + /// + public readonly ImmutableArray Excludes; + /// + /// (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + /// + public readonly ImmutableArray Includes; + + [OutputConstructor] + private RepositoryRulesetConditionsRefName( + ImmutableArray excludes, + + ImmutableArray includes) + { + Excludes = excludes; + Includes = includes; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetRules.cs b/sdk/dotnet/Outputs/RepositoryRulesetRules.cs new file mode 100644 index 00000000..63fd6270 --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetRules.cs @@ -0,0 +1,126 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetRules + { + /// + /// (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + /// + public readonly Outputs.RepositoryRulesetRulesBranchNamePattern? BranchNamePattern; + /// + /// (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + public readonly Outputs.RepositoryRulesetRulesCommitAuthorEmailPattern? CommitAuthorEmailPattern; + /// + /// (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + public readonly Outputs.RepositoryRulesetRulesCommitMessagePattern? CommitMessagePattern; + /// + /// (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + /// + public readonly Outputs.RepositoryRulesetRulesCommitterEmailPattern? CommitterEmailPattern; + /// + /// (Boolean) Only allow users with bypass permission to create matching refs. + /// + public readonly bool? Creation; + /// + /// (Boolean) Only allow users with bypass permissions to delete matching refs. + /// + public readonly bool? Deletion; + /// + /// (Boolean) Prevent users with push access from force pushing to branches. + /// + public readonly bool? NonFastForward; + /// + /// (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + /// + public readonly Outputs.RepositoryRulesetRulesPullRequest? PullRequest; + /// + /// (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + /// + public readonly Outputs.RepositoryRulesetRulesRequiredDeployments? RequiredDeployments; + /// + /// (Boolean) Prevent merge commits from being pushed to matching branches. + /// + public readonly bool? RequiredLinearHistory; + /// + /// (Boolean) Commits pushed to matching branches must have verified signatures. + /// + public readonly bool? RequiredSignatures; + /// + /// (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + /// + public readonly Outputs.RepositoryRulesetRulesRequiredStatusChecks? RequiredStatusChecks; + /// + /// (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + /// + public readonly Outputs.RepositoryRulesetRulesTagNamePattern? TagNamePattern; + /// + /// (Boolean) Only allow users with bypass permission to update matching refs. + /// + public readonly bool? Update; + /// + /// (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + /// + public readonly bool? UpdateAllowsFetchAndMerge; + + [OutputConstructor] + private RepositoryRulesetRules( + Outputs.RepositoryRulesetRulesBranchNamePattern? branchNamePattern, + + Outputs.RepositoryRulesetRulesCommitAuthorEmailPattern? commitAuthorEmailPattern, + + Outputs.RepositoryRulesetRulesCommitMessagePattern? commitMessagePattern, + + Outputs.RepositoryRulesetRulesCommitterEmailPattern? committerEmailPattern, + + bool? creation, + + bool? deletion, + + bool? nonFastForward, + + Outputs.RepositoryRulesetRulesPullRequest? pullRequest, + + Outputs.RepositoryRulesetRulesRequiredDeployments? requiredDeployments, + + bool? requiredLinearHistory, + + bool? requiredSignatures, + + Outputs.RepositoryRulesetRulesRequiredStatusChecks? requiredStatusChecks, + + Outputs.RepositoryRulesetRulesTagNamePattern? tagNamePattern, + + bool? update, + + bool? updateAllowsFetchAndMerge) + { + BranchNamePattern = branchNamePattern; + CommitAuthorEmailPattern = commitAuthorEmailPattern; + CommitMessagePattern = commitMessagePattern; + CommitterEmailPattern = committerEmailPattern; + Creation = creation; + Deletion = deletion; + NonFastForward = nonFastForward; + PullRequest = pullRequest; + RequiredDeployments = requiredDeployments; + RequiredLinearHistory = requiredLinearHistory; + RequiredSignatures = requiredSignatures; + RequiredStatusChecks = requiredStatusChecks; + TagNamePattern = tagNamePattern; + Update = update; + UpdateAllowsFetchAndMerge = updateAllowsFetchAndMerge; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetRulesBranchNamePattern.cs b/sdk/dotnet/Outputs/RepositoryRulesetRulesBranchNamePattern.cs new file mode 100644 index 00000000..8e7c4c73 --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetRulesBranchNamePattern.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetRulesBranchNamePattern + { + /// + /// (String) The name of the ruleset. + /// + public readonly string? Name; + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + public readonly bool? Negate; + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + public readonly string Operator; + /// + /// (String) The pattern to match with. + /// + public readonly string Pattern; + + [OutputConstructor] + private RepositoryRulesetRulesBranchNamePattern( + string? name, + + bool? negate, + + string @operator, + + string pattern) + { + Name = name; + Negate = negate; + Operator = @operator; + Pattern = pattern; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetRulesCommitAuthorEmailPattern.cs b/sdk/dotnet/Outputs/RepositoryRulesetRulesCommitAuthorEmailPattern.cs new file mode 100644 index 00000000..e2d6b6c2 --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetRulesCommitAuthorEmailPattern.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetRulesCommitAuthorEmailPattern + { + /// + /// (String) The name of the ruleset. + /// + public readonly string? Name; + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + public readonly bool? Negate; + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + public readonly string Operator; + /// + /// (String) The pattern to match with. + /// + public readonly string Pattern; + + [OutputConstructor] + private RepositoryRulesetRulesCommitAuthorEmailPattern( + string? name, + + bool? negate, + + string @operator, + + string pattern) + { + Name = name; + Negate = negate; + Operator = @operator; + Pattern = pattern; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetRulesCommitMessagePattern.cs b/sdk/dotnet/Outputs/RepositoryRulesetRulesCommitMessagePattern.cs new file mode 100644 index 00000000..8fb1911a --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetRulesCommitMessagePattern.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetRulesCommitMessagePattern + { + /// + /// (String) The name of the ruleset. + /// + public readonly string? Name; + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + public readonly bool? Negate; + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + public readonly string Operator; + /// + /// (String) The pattern to match with. + /// + public readonly string Pattern; + + [OutputConstructor] + private RepositoryRulesetRulesCommitMessagePattern( + string? name, + + bool? negate, + + string @operator, + + string pattern) + { + Name = name; + Negate = negate; + Operator = @operator; + Pattern = pattern; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetRulesCommitterEmailPattern.cs b/sdk/dotnet/Outputs/RepositoryRulesetRulesCommitterEmailPattern.cs new file mode 100644 index 00000000..08389d77 --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetRulesCommitterEmailPattern.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetRulesCommitterEmailPattern + { + /// + /// (String) The name of the ruleset. + /// + public readonly string? Name; + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + public readonly bool? Negate; + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + public readonly string Operator; + /// + /// (String) The pattern to match with. + /// + public readonly string Pattern; + + [OutputConstructor] + private RepositoryRulesetRulesCommitterEmailPattern( + string? name, + + bool? negate, + + string @operator, + + string pattern) + { + Name = name; + Negate = negate; + Operator = @operator; + Pattern = pattern; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetRulesPullRequest.cs b/sdk/dotnet/Outputs/RepositoryRulesetRulesPullRequest.cs new file mode 100644 index 00000000..a47dd52b --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetRulesPullRequest.cs @@ -0,0 +1,56 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetRulesPullRequest + { + /// + /// (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + /// + public readonly bool? DismissStaleReviewsOnPush; + /// + /// (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + /// + public readonly bool? RequireCodeOwnerReview; + /// + /// (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + /// + public readonly bool? RequireLastPushApproval; + /// + /// (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + /// + public readonly int? RequiredApprovingReviewCount; + /// + /// (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + /// + public readonly bool? RequiredReviewThreadResolution; + + [OutputConstructor] + private RepositoryRulesetRulesPullRequest( + bool? dismissStaleReviewsOnPush, + + bool? requireCodeOwnerReview, + + bool? requireLastPushApproval, + + int? requiredApprovingReviewCount, + + bool? requiredReviewThreadResolution) + { + DismissStaleReviewsOnPush = dismissStaleReviewsOnPush; + RequireCodeOwnerReview = requireCodeOwnerReview; + RequireLastPushApproval = requireLastPushApproval; + RequiredApprovingReviewCount = requiredApprovingReviewCount; + RequiredReviewThreadResolution = requiredReviewThreadResolution; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredDeployments.cs b/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredDeployments.cs new file mode 100644 index 00000000..522358a9 --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredDeployments.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetRulesRequiredDeployments + { + /// + /// (List of String) The environments that must be successfully deployed to before branches can be merged. + /// + public readonly ImmutableArray RequiredDeploymentEnvironments; + + [OutputConstructor] + private RepositoryRulesetRulesRequiredDeployments(ImmutableArray requiredDeploymentEnvironments) + { + RequiredDeploymentEnvironments = requiredDeploymentEnvironments; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecks.cs b/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecks.cs new file mode 100644 index 00000000..5a3cd04c --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecks.cs @@ -0,0 +1,35 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetRulesRequiredStatusChecks + { + /// + /// (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + /// + public readonly ImmutableArray RequiredChecks; + /// + /// (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + /// + public readonly bool? StrictRequiredStatusChecksPolicy; + + [OutputConstructor] + private RepositoryRulesetRulesRequiredStatusChecks( + ImmutableArray requiredChecks, + + bool? strictRequiredStatusChecksPolicy) + { + RequiredChecks = requiredChecks; + StrictRequiredStatusChecksPolicy = strictRequiredStatusChecksPolicy; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheck.cs b/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheck.cs new file mode 100644 index 00000000..306387c8 --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheck.cs @@ -0,0 +1,35 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetRulesRequiredStatusChecksRequiredCheck + { + /// + /// (String) The status check context name that must be present on the commit. + /// + public readonly string Context; + /// + /// (Number) The optional integration ID that this status check must originate from. + /// + public readonly int? IntegrationId; + + [OutputConstructor] + private RepositoryRulesetRulesRequiredStatusChecksRequiredCheck( + string context, + + int? integrationId) + { + Context = context; + IntegrationId = integrationId; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryRulesetRulesTagNamePattern.cs b/sdk/dotnet/Outputs/RepositoryRulesetRulesTagNamePattern.cs new file mode 100644 index 00000000..605b2457 --- /dev/null +++ b/sdk/dotnet/Outputs/RepositoryRulesetRulesTagNamePattern.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github.Outputs +{ + + [OutputType] + public sealed class RepositoryRulesetRulesTagNamePattern + { + /// + /// (String) The name of the ruleset. + /// + public readonly string? Name; + /// + /// (Boolean) If true, the rule will fail if the pattern matches. + /// + public readonly bool? Negate; + /// + /// (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + /// + public readonly string Operator; + /// + /// (String) The pattern to match with. + /// + public readonly string Pattern; + + [OutputConstructor] + private RepositoryRulesetRulesTagNamePattern( + string? name, + + bool? negate, + + string @operator, + + string pattern) + { + Name = name; + Negate = negate; + Operator = @operator; + Pattern = pattern; + } + } +} diff --git a/sdk/dotnet/RepositoryRuleset.cs b/sdk/dotnet/RepositoryRuleset.cs new file mode 100644 index 00000000..13c239e6 --- /dev/null +++ b/sdk/dotnet/RepositoryRuleset.cs @@ -0,0 +1,321 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github +{ + /// + /// Creates a GitHub repository ruleset. + /// + /// This resource allows you to create and manage rulesets on the repository level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleRepository = new Github.Repository("exampleRepository", new() + /// { + /// Description = "Example repository", + /// }); + /// + /// var exampleRepositoryRuleset = new Github.RepositoryRuleset("exampleRepositoryRuleset", new() + /// { + /// Repository = exampleRepository.Name, + /// Target = "branch", + /// Enforcement = "active", + /// Conditions = new Github.Inputs.RepositoryRulesetConditionsArgs + /// { + /// RefName = new Github.Inputs.RepositoryRulesetConditionsRefNameArgs + /// { + /// Includes = new[] + /// { + /// "~ALL", + /// }, + /// Excludes = new[] {}, + /// }, + /// }, + /// BypassActors = new[] + /// { + /// new Github.Inputs.RepositoryRulesetBypassActorArgs + /// { + /// ActorId = 13473, + /// ActorType = "Integration", + /// BypassMode = "always", + /// }, + /// }, + /// Rules = new Github.Inputs.RepositoryRulesetRulesArgs + /// { + /// Creation = true, + /// Update = true, + /// Deletion = true, + /// RequiredLinearHistory = true, + /// RequiredSignatures = true, + /// RequiredDeployments = new Github.Inputs.RepositoryRulesetRulesRequiredDeploymentsArgs + /// { + /// RequiredDeploymentEnvironments = new[] + /// { + /// "test", + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// GitHub Repository Rulesets can be imported using the GitHub repository name and ruleset ID e.g. + /// + /// ```sh + /// $ pulumi import github:index/repositoryRuleset:RepositoryRuleset example example:12345` + /// ``` + /// + [GithubResourceType("github:index/repositoryRuleset:RepositoryRuleset")] + public partial class RepositoryRuleset : global::Pulumi.CustomResource + { + /// + /// (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + /// + [Output("bypassActors")] + public Output> BypassActors { get; private set; } = null!; + + /// + /// (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + /// + [Output("conditions")] + public Output Conditions { get; private set; } = null!; + + /// + /// (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + /// + [Output("enforcement")] + public Output Enforcement { get; private set; } = null!; + + /// + /// (String) + /// + [Output("etag")] + public Output Etag { get; private set; } = null!; + + /// + /// (String) The name of the ruleset. + /// + [Output("name")] + public Output Name { get; private set; } = null!; + + /// + /// (String) GraphQL global node id for use with v4 API. + /// + [Output("nodeId")] + public Output NodeId { get; private set; } = null!; + + /// + /// (String) Name of the repository to apply rulset to. + /// + [Output("repository")] + public Output Repository { get; private set; } = null!; + + /// + /// (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + /// + [Output("rules")] + public Output Rules { get; private set; } = null!; + + /// + /// (Number) GitHub ID for the ruleset. + /// + [Output("rulesetId")] + public Output RulesetId { get; private set; } = null!; + + /// + /// (String) Possible values are `branch` and `tag`. + /// + [Output("target")] + public Output Target { get; private set; } = null!; + + + /// + /// Create a RepositoryRuleset resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public RepositoryRuleset(string name, RepositoryRulesetArgs args, CustomResourceOptions? options = null) + : base("github:index/repositoryRuleset:RepositoryRuleset", name, args ?? new RepositoryRulesetArgs(), MakeResourceOptions(options, "")) + { + } + + private RepositoryRuleset(string name, Input id, RepositoryRulesetState? state = null, CustomResourceOptions? options = null) + : base("github:index/repositoryRuleset:RepositoryRuleset", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing RepositoryRuleset resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static RepositoryRuleset Get(string name, Input id, RepositoryRulesetState? state = null, CustomResourceOptions? options = null) + { + return new RepositoryRuleset(name, id, state, options); + } + } + + public sealed class RepositoryRulesetArgs : global::Pulumi.ResourceArgs + { + [Input("bypassActors")] + private InputList? _bypassActors; + + /// + /// (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + /// + public InputList BypassActors + { + get => _bypassActors ?? (_bypassActors = new InputList()); + set => _bypassActors = value; + } + + /// + /// (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + /// + [Input("conditions")] + public Input? Conditions { get; set; } + + /// + /// (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + /// + [Input("enforcement", required: true)] + public Input Enforcement { get; set; } = null!; + + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (String) Name of the repository to apply rulset to. + /// + [Input("repository")] + public Input? Repository { get; set; } + + /// + /// (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + /// + [Input("rules", required: true)] + public Input Rules { get; set; } = null!; + + /// + /// (String) Possible values are `branch` and `tag`. + /// + [Input("target", required: true)] + public Input Target { get; set; } = null!; + + public RepositoryRulesetArgs() + { + } + public static new RepositoryRulesetArgs Empty => new RepositoryRulesetArgs(); + } + + public sealed class RepositoryRulesetState : global::Pulumi.ResourceArgs + { + [Input("bypassActors")] + private InputList? _bypassActors; + + /// + /// (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + /// + public InputList BypassActors + { + get => _bypassActors ?? (_bypassActors = new InputList()); + set => _bypassActors = value; + } + + /// + /// (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + /// + [Input("conditions")] + public Input? Conditions { get; set; } + + /// + /// (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + /// + [Input("enforcement")] + public Input? Enforcement { get; set; } + + /// + /// (String) + /// + [Input("etag")] + public Input? Etag { get; set; } + + /// + /// (String) The name of the ruleset. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// (String) GraphQL global node id for use with v4 API. + /// + [Input("nodeId")] + public Input? NodeId { get; set; } + + /// + /// (String) Name of the repository to apply rulset to. + /// + [Input("repository")] + public Input? Repository { get; set; } + + /// + /// (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + /// + [Input("rules")] + public Input? Rules { get; set; } + + /// + /// (Number) GitHub ID for the ruleset. + /// + [Input("rulesetId")] + public Input? RulesetId { get; set; } + + /// + /// (String) Possible values are `branch` and `tag`. + /// + [Input("target")] + public Input? Target { get; set; } + + public RepositoryRulesetState() + { + } + public static new RepositoryRulesetState Empty => new RepositoryRulesetState(); + } +} diff --git a/sdk/dotnet/RepositoryTopics.cs b/sdk/dotnet/RepositoryTopics.cs new file mode 100644 index 00000000..624e0a2c --- /dev/null +++ b/sdk/dotnet/RepositoryTopics.cs @@ -0,0 +1,159 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Github +{ + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var testRepository = Github.GetRepository.Invoke(new() + /// { + /// Name = "test", + /// }); + /// + /// var testRepositoryTopics = new Github.RepositoryTopics("testRepositoryTopics", new() + /// { + /// Repository = github_repository.Test.Name, + /// Topics = new[] + /// { + /// "topic-1", + /// "topic-2", + /// }, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// Repository topics can be imported using the `name` of the repository. + /// + /// ```sh + /// $ pulumi import github:index/repositoryTopics:RepositoryTopics terraform terraform + /// ``` + /// + [GithubResourceType("github:index/repositoryTopics:RepositoryTopics")] + public partial class RepositoryTopics : global::Pulumi.CustomResource + { + /// + /// The repository name. + /// + [Output("repository")] + public Output Repository { get; private set; } = null!; + + /// + /// A list of topics to add to the repository. + /// + [Output("topics")] + public Output> Topics { get; private set; } = null!; + + + /// + /// Create a RepositoryTopics resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public RepositoryTopics(string name, RepositoryTopicsArgs args, CustomResourceOptions? options = null) + : base("github:index/repositoryTopics:RepositoryTopics", name, args ?? new RepositoryTopicsArgs(), MakeResourceOptions(options, "")) + { + } + + private RepositoryTopics(string name, Input id, RepositoryTopicsState? state = null, CustomResourceOptions? options = null) + : base("github:index/repositoryTopics:RepositoryTopics", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing RepositoryTopics resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static RepositoryTopics Get(string name, Input id, RepositoryTopicsState? state = null, CustomResourceOptions? options = null) + { + return new RepositoryTopics(name, id, state, options); + } + } + + public sealed class RepositoryTopicsArgs : global::Pulumi.ResourceArgs + { + /// + /// The repository name. + /// + [Input("repository", required: true)] + public Input Repository { get; set; } = null!; + + [Input("topics", required: true)] + private InputList? _topics; + + /// + /// A list of topics to add to the repository. + /// + public InputList Topics + { + get => _topics ?? (_topics = new InputList()); + set => _topics = value; + } + + public RepositoryTopicsArgs() + { + } + public static new RepositoryTopicsArgs Empty => new RepositoryTopicsArgs(); + } + + public sealed class RepositoryTopicsState : global::Pulumi.ResourceArgs + { + /// + /// The repository name. + /// + [Input("repository")] + public Input? Repository { get; set; } + + [Input("topics")] + private InputList? _topics; + + /// + /// A list of topics to add to the repository. + /// + public InputList Topics + { + get => _topics ?? (_topics = new InputList()); + set => _topics = value; + } + + public RepositoryTopicsState() + { + } + public static new RepositoryTopicsState Empty => new RepositoryTopicsState(); + } +} diff --git a/sdk/go/github/actionsSecret.go b/sdk/go/github/actionsSecret.go index db29397f..92a50a93 100644 --- a/sdk/go/github/actionsSecret.go +++ b/sdk/go/github/actionsSecret.go @@ -61,7 +61,7 @@ import ( // // ```sh // -// $ pulumi import github:index/actionsSecret:ActionsSecret example_secret / +// $ pulumi import github:index/actionsSecret:ActionsSecret example_secret repository/secret_name // // ``` // diff --git a/sdk/go/github/enterpriseOrganization.go b/sdk/go/github/enterpriseOrganization.go index 65810c73..6471b8c1 100644 --- a/sdk/go/github/enterpriseOrganization.go +++ b/sdk/go/github/enterpriseOrganization.go @@ -31,6 +31,7 @@ import ( // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := github.NewEnterpriseOrganization(ctx, "org", &github.EnterpriseOrganizationArgs{ // EnterpriseId: pulumi.Any(data.Github_enterprise.Enterprise.Id), +// DisplayName: pulumi.String("Some Awesome Org"), // Description: pulumi.String("Organization created with terraform"), // BillingEmail: pulumi.String("jon@winteriscoming.com"), // AdminLogins: pulumi.StringArray{ @@ -48,7 +49,13 @@ import ( // // ## Import // -// Support for importing organizations is not currently supported. +// GitHub Enterprise Organization can be imported using the `slug` of the enterprise, combined with the `orgname` of the organization, separated by a `/` character. +// +// ```sh +// +// $ pulumi import github:index/enterpriseOrganization:EnterpriseOrganization org enterp/some-awesome-org +// +// ``` type EnterpriseOrganization struct { pulumi.CustomResourceState @@ -58,6 +65,8 @@ type EnterpriseOrganization struct { BillingEmail pulumi.StringOutput `pulumi:"billingEmail"` // The description of the organization. Description pulumi.StringPtrOutput `pulumi:"description"` + // The display name of the organization. + DisplayName pulumi.StringPtrOutput `pulumi:"displayName"` // The ID of the enterprise. EnterpriseId pulumi.StringOutput `pulumi:"enterpriseId"` // The name of the organization. @@ -109,6 +118,8 @@ type enterpriseOrganizationState struct { BillingEmail *string `pulumi:"billingEmail"` // The description of the organization. Description *string `pulumi:"description"` + // The display name of the organization. + DisplayName *string `pulumi:"displayName"` // The ID of the enterprise. EnterpriseId *string `pulumi:"enterpriseId"` // The name of the organization. @@ -122,6 +133,8 @@ type EnterpriseOrganizationState struct { BillingEmail pulumi.StringPtrInput // The description of the organization. Description pulumi.StringPtrInput + // The display name of the organization. + DisplayName pulumi.StringPtrInput // The ID of the enterprise. EnterpriseId pulumi.StringPtrInput // The name of the organization. @@ -139,6 +152,8 @@ type enterpriseOrganizationArgs struct { BillingEmail string `pulumi:"billingEmail"` // The description of the organization. Description *string `pulumi:"description"` + // The display name of the organization. + DisplayName *string `pulumi:"displayName"` // The ID of the enterprise. EnterpriseId string `pulumi:"enterpriseId"` // The name of the organization. @@ -153,6 +168,8 @@ type EnterpriseOrganizationArgs struct { BillingEmail pulumi.StringInput // The description of the organization. Description pulumi.StringPtrInput + // The display name of the organization. + DisplayName pulumi.StringPtrInput // The ID of the enterprise. EnterpriseId pulumi.StringInput // The name of the organization. @@ -285,6 +302,11 @@ func (o EnterpriseOrganizationOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *EnterpriseOrganization) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } +// The display name of the organization. +func (o EnterpriseOrganizationOutput) DisplayName() pulumi.StringPtrOutput { + return o.ApplyT(func(v *EnterpriseOrganization) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput) +} + // The ID of the enterprise. func (o EnterpriseOrganizationOutput) EnterpriseId() pulumi.StringOutput { return o.ApplyT(func(v *EnterpriseOrganization) pulumi.StringOutput { return v.EnterpriseId }).(pulumi.StringOutput) diff --git a/sdk/go/github/init.go b/sdk/go/github/init.go index e8768c19..5ecbf990 100644 --- a/sdk/go/github/init.go +++ b/sdk/go/github/init.go @@ -89,6 +89,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &OrganizationCustomRole{} case "github:index/organizationProject:OrganizationProject": r = &OrganizationProject{} + case "github:index/organizationRuleset:OrganizationRuleset": + r = &OrganizationRuleset{} case "github:index/organizationSecurityManager:OrganizationSecurityManager": r = &OrganizationSecurityManager{} case "github:index/organizationSettings:OrganizationSettings": @@ -127,8 +129,12 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &RepositoryProject{} case "github:index/repositoryPullRequest:RepositoryPullRequest": r = &RepositoryPullRequest{} + case "github:index/repositoryRuleset:RepositoryRuleset": + r = &RepositoryRuleset{} case "github:index/repositoryTagProtection:RepositoryTagProtection": r = &RepositoryTagProtection{} + case "github:index/repositoryTopics:RepositoryTopics": + r = &RepositoryTopics{} case "github:index/repositoryWebhook:RepositoryWebhook": r = &RepositoryWebhook{} case "github:index/team:Team": @@ -350,6 +356,11 @@ func init() { "index/organizationProject", &module{version}, ) + pulumi.RegisterResourceModule( + "github", + "index/organizationRuleset", + &module{version}, + ) pulumi.RegisterResourceModule( "github", "index/organizationSecurityManager", @@ -445,11 +456,21 @@ func init() { "index/repositoryPullRequest", &module{version}, ) + pulumi.RegisterResourceModule( + "github", + "index/repositoryRuleset", + &module{version}, + ) pulumi.RegisterResourceModule( "github", "index/repositoryTagProtection", &module{version}, ) + pulumi.RegisterResourceModule( + "github", + "index/repositoryTopics", + &module{version}, + ) pulumi.RegisterResourceModule( "github", "index/repositoryWebhook", diff --git a/sdk/go/github/organizationRuleset.go b/sdk/go/github/organizationRuleset.go new file mode 100644 index 00000000..bd12531f --- /dev/null +++ b/sdk/go/github/organizationRuleset.go @@ -0,0 +1,382 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package github + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-github/sdk/v5/go/github/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +// Creates a GitHub organization ruleset. +// +// This resource allows you to create and manage rulesets on the organization level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. +// +// ## Import +// +// GitHub Organization Rulesets can be imported using the GitHub ruleset ID e.g. +// +// ```sh +// +// $ pulumi import github:index/organizationRuleset:OrganizationRuleset example 12345` +// +// ``` +type OrganizationRuleset struct { + pulumi.CustomResourceState + + // (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + BypassActors OrganizationRulesetBypassActorArrayOutput `pulumi:"bypassActors"` + // (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + Conditions OrganizationRulesetConditionsPtrOutput `pulumi:"conditions"` + // (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + Enforcement pulumi.StringOutput `pulumi:"enforcement"` + // (String) + Etag pulumi.StringOutput `pulumi:"etag"` + // (String) The name of the ruleset. + Name pulumi.StringOutput `pulumi:"name"` + // (String) GraphQL global node id for use with v4 API. + NodeId pulumi.StringOutput `pulumi:"nodeId"` + // (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + Rules OrganizationRulesetRulesOutput `pulumi:"rules"` + // (Number) GitHub ID for the ruleset. + RulesetId pulumi.IntOutput `pulumi:"rulesetId"` + // (String) Possible values are `branch` and `tag`. + Target pulumi.StringOutput `pulumi:"target"` +} + +// NewOrganizationRuleset registers a new resource with the given unique name, arguments, and options. +func NewOrganizationRuleset(ctx *pulumi.Context, + name string, args *OrganizationRulesetArgs, opts ...pulumi.ResourceOption) (*OrganizationRuleset, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Enforcement == nil { + return nil, errors.New("invalid value for required argument 'Enforcement'") + } + if args.Rules == nil { + return nil, errors.New("invalid value for required argument 'Rules'") + } + if args.Target == nil { + return nil, errors.New("invalid value for required argument 'Target'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource OrganizationRuleset + err := ctx.RegisterResource("github:index/organizationRuleset:OrganizationRuleset", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetOrganizationRuleset gets an existing OrganizationRuleset resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetOrganizationRuleset(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *OrganizationRulesetState, opts ...pulumi.ResourceOption) (*OrganizationRuleset, error) { + var resource OrganizationRuleset + err := ctx.ReadResource("github:index/organizationRuleset:OrganizationRuleset", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering OrganizationRuleset resources. +type organizationRulesetState struct { + // (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + BypassActors []OrganizationRulesetBypassActor `pulumi:"bypassActors"` + // (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + Conditions *OrganizationRulesetConditions `pulumi:"conditions"` + // (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + Enforcement *string `pulumi:"enforcement"` + // (String) + Etag *string `pulumi:"etag"` + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (String) GraphQL global node id for use with v4 API. + NodeId *string `pulumi:"nodeId"` + // (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + Rules *OrganizationRulesetRules `pulumi:"rules"` + // (Number) GitHub ID for the ruleset. + RulesetId *int `pulumi:"rulesetId"` + // (String) Possible values are `branch` and `tag`. + Target *string `pulumi:"target"` +} + +type OrganizationRulesetState struct { + // (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + BypassActors OrganizationRulesetBypassActorArrayInput + // (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + Conditions OrganizationRulesetConditionsPtrInput + // (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + Enforcement pulumi.StringPtrInput + // (String) + Etag pulumi.StringPtrInput + // (String) The name of the ruleset. + Name pulumi.StringPtrInput + // (String) GraphQL global node id for use with v4 API. + NodeId pulumi.StringPtrInput + // (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + Rules OrganizationRulesetRulesPtrInput + // (Number) GitHub ID for the ruleset. + RulesetId pulumi.IntPtrInput + // (String) Possible values are `branch` and `tag`. + Target pulumi.StringPtrInput +} + +func (OrganizationRulesetState) ElementType() reflect.Type { + return reflect.TypeOf((*organizationRulesetState)(nil)).Elem() +} + +type organizationRulesetArgs struct { + // (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + BypassActors []OrganizationRulesetBypassActor `pulumi:"bypassActors"` + // (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + Conditions *OrganizationRulesetConditions `pulumi:"conditions"` + // (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + Enforcement string `pulumi:"enforcement"` + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + Rules OrganizationRulesetRules `pulumi:"rules"` + // (String) Possible values are `branch` and `tag`. + Target string `pulumi:"target"` +} + +// The set of arguments for constructing a OrganizationRuleset resource. +type OrganizationRulesetArgs struct { + // (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + BypassActors OrganizationRulesetBypassActorArrayInput + // (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + Conditions OrganizationRulesetConditionsPtrInput + // (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + Enforcement pulumi.StringInput + // (String) The name of the ruleset. + Name pulumi.StringPtrInput + // (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + Rules OrganizationRulesetRulesInput + // (String) Possible values are `branch` and `tag`. + Target pulumi.StringInput +} + +func (OrganizationRulesetArgs) ElementType() reflect.Type { + return reflect.TypeOf((*organizationRulesetArgs)(nil)).Elem() +} + +type OrganizationRulesetInput interface { + pulumi.Input + + ToOrganizationRulesetOutput() OrganizationRulesetOutput + ToOrganizationRulesetOutputWithContext(ctx context.Context) OrganizationRulesetOutput +} + +func (*OrganizationRuleset) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRuleset)(nil)).Elem() +} + +func (i *OrganizationRuleset) ToOrganizationRulesetOutput() OrganizationRulesetOutput { + return i.ToOrganizationRulesetOutputWithContext(context.Background()) +} + +func (i *OrganizationRuleset) ToOrganizationRulesetOutputWithContext(ctx context.Context) OrganizationRulesetOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetOutput) +} + +func (i *OrganizationRuleset) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRuleset] { + return pulumix.Output[*OrganizationRuleset]{ + OutputState: i.ToOrganizationRulesetOutputWithContext(ctx).OutputState, + } +} + +// OrganizationRulesetArrayInput is an input type that accepts OrganizationRulesetArray and OrganizationRulesetArrayOutput values. +// You can construct a concrete instance of `OrganizationRulesetArrayInput` via: +// +// OrganizationRulesetArray{ OrganizationRulesetArgs{...} } +type OrganizationRulesetArrayInput interface { + pulumi.Input + + ToOrganizationRulesetArrayOutput() OrganizationRulesetArrayOutput + ToOrganizationRulesetArrayOutputWithContext(context.Context) OrganizationRulesetArrayOutput +} + +type OrganizationRulesetArray []OrganizationRulesetInput + +func (OrganizationRulesetArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*OrganizationRuleset)(nil)).Elem() +} + +func (i OrganizationRulesetArray) ToOrganizationRulesetArrayOutput() OrganizationRulesetArrayOutput { + return i.ToOrganizationRulesetArrayOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetArray) ToOrganizationRulesetArrayOutputWithContext(ctx context.Context) OrganizationRulesetArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetArrayOutput) +} + +func (i OrganizationRulesetArray) ToOutput(ctx context.Context) pulumix.Output[[]*OrganizationRuleset] { + return pulumix.Output[[]*OrganizationRuleset]{ + OutputState: i.ToOrganizationRulesetArrayOutputWithContext(ctx).OutputState, + } +} + +// OrganizationRulesetMapInput is an input type that accepts OrganizationRulesetMap and OrganizationRulesetMapOutput values. +// You can construct a concrete instance of `OrganizationRulesetMapInput` via: +// +// OrganizationRulesetMap{ "key": OrganizationRulesetArgs{...} } +type OrganizationRulesetMapInput interface { + pulumi.Input + + ToOrganizationRulesetMapOutput() OrganizationRulesetMapOutput + ToOrganizationRulesetMapOutputWithContext(context.Context) OrganizationRulesetMapOutput +} + +type OrganizationRulesetMap map[string]OrganizationRulesetInput + +func (OrganizationRulesetMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*OrganizationRuleset)(nil)).Elem() +} + +func (i OrganizationRulesetMap) ToOrganizationRulesetMapOutput() OrganizationRulesetMapOutput { + return i.ToOrganizationRulesetMapOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetMap) ToOrganizationRulesetMapOutputWithContext(ctx context.Context) OrganizationRulesetMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetMapOutput) +} + +func (i OrganizationRulesetMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*OrganizationRuleset] { + return pulumix.Output[map[string]*OrganizationRuleset]{ + OutputState: i.ToOrganizationRulesetMapOutputWithContext(ctx).OutputState, + } +} + +type OrganizationRulesetOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRuleset)(nil)).Elem() +} + +func (o OrganizationRulesetOutput) ToOrganizationRulesetOutput() OrganizationRulesetOutput { + return o +} + +func (o OrganizationRulesetOutput) ToOrganizationRulesetOutputWithContext(ctx context.Context) OrganizationRulesetOutput { + return o +} + +func (o OrganizationRulesetOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRuleset] { + return pulumix.Output[*OrganizationRuleset]{ + OutputState: o.OutputState, + } +} + +// (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) +func (o OrganizationRulesetOutput) BypassActors() OrganizationRulesetBypassActorArrayOutput { + return o.ApplyT(func(v *OrganizationRuleset) OrganizationRulesetBypassActorArrayOutput { return v.BypassActors }).(OrganizationRulesetBypassActorArrayOutput) +} + +// (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) +func (o OrganizationRulesetOutput) Conditions() OrganizationRulesetConditionsPtrOutput { + return o.ApplyT(func(v *OrganizationRuleset) OrganizationRulesetConditionsPtrOutput { return v.Conditions }).(OrganizationRulesetConditionsPtrOutput) +} + +// (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. +func (o OrganizationRulesetOutput) Enforcement() pulumi.StringOutput { + return o.ApplyT(func(v *OrganizationRuleset) pulumi.StringOutput { return v.Enforcement }).(pulumi.StringOutput) +} + +// (String) +func (o OrganizationRulesetOutput) Etag() pulumi.StringOutput { + return o.ApplyT(func(v *OrganizationRuleset) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput) +} + +// (String) The name of the ruleset. +func (o OrganizationRulesetOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v *OrganizationRuleset) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) +} + +// (String) GraphQL global node id for use with v4 API. +func (o OrganizationRulesetOutput) NodeId() pulumi.StringOutput { + return o.ApplyT(func(v *OrganizationRuleset) pulumi.StringOutput { return v.NodeId }).(pulumi.StringOutput) +} + +// (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) +func (o OrganizationRulesetOutput) Rules() OrganizationRulesetRulesOutput { + return o.ApplyT(func(v *OrganizationRuleset) OrganizationRulesetRulesOutput { return v.Rules }).(OrganizationRulesetRulesOutput) +} + +// (Number) GitHub ID for the ruleset. +func (o OrganizationRulesetOutput) RulesetId() pulumi.IntOutput { + return o.ApplyT(func(v *OrganizationRuleset) pulumi.IntOutput { return v.RulesetId }).(pulumi.IntOutput) +} + +// (String) Possible values are `branch` and `tag`. +func (o OrganizationRulesetOutput) Target() pulumi.StringOutput { + return o.ApplyT(func(v *OrganizationRuleset) pulumi.StringOutput { return v.Target }).(pulumi.StringOutput) +} + +type OrganizationRulesetArrayOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*OrganizationRuleset)(nil)).Elem() +} + +func (o OrganizationRulesetArrayOutput) ToOrganizationRulesetArrayOutput() OrganizationRulesetArrayOutput { + return o +} + +func (o OrganizationRulesetArrayOutput) ToOrganizationRulesetArrayOutputWithContext(ctx context.Context) OrganizationRulesetArrayOutput { + return o +} + +func (o OrganizationRulesetArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*OrganizationRuleset] { + return pulumix.Output[[]*OrganizationRuleset]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationRulesetArrayOutput) Index(i pulumi.IntInput) OrganizationRulesetOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OrganizationRuleset { + return vs[0].([]*OrganizationRuleset)[vs[1].(int)] + }).(OrganizationRulesetOutput) +} + +type OrganizationRulesetMapOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*OrganizationRuleset)(nil)).Elem() +} + +func (o OrganizationRulesetMapOutput) ToOrganizationRulesetMapOutput() OrganizationRulesetMapOutput { + return o +} + +func (o OrganizationRulesetMapOutput) ToOrganizationRulesetMapOutputWithContext(ctx context.Context) OrganizationRulesetMapOutput { + return o +} + +func (o OrganizationRulesetMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*OrganizationRuleset] { + return pulumix.Output[map[string]*OrganizationRuleset]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationRulesetMapOutput) MapIndex(k pulumi.StringInput) OrganizationRulesetOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OrganizationRuleset { + return vs[0].(map[string]*OrganizationRuleset)[vs[1].(string)] + }).(OrganizationRulesetOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetInput)(nil)).Elem(), &OrganizationRuleset{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetArrayInput)(nil)).Elem(), OrganizationRulesetArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetMapInput)(nil)).Elem(), OrganizationRulesetMap{}) + pulumi.RegisterOutputType(OrganizationRulesetOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetArrayOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetMapOutput{}) +} diff --git a/sdk/go/github/pulumiTypes.go b/sdk/go/github/pulumiTypes.go index ddf45f09..4e6b946d 100644 --- a/sdk/go/github/pulumiTypes.go +++ b/sdk/go/github/pulumiTypes.go @@ -1804,1426 +1804,6904 @@ func (o BranchProtectionV3RestrictionsPtrOutput) Users() pulumi.StringArrayOutpu }).(pulumi.StringArrayOutput) } -type OrganizationWebhookConfiguration struct { - ContentType *string `pulumi:"contentType"` - InsecureSsl *bool `pulumi:"insecureSsl"` - Secret *string `pulumi:"secret"` - // URL of the webhook - Url string `pulumi:"url"` +type OrganizationRulesetBypassActor struct { + // (Number) The ID of the actor that can bypass a ruleset + ActorId int `pulumi:"actorId"` + // The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + ActorType string `pulumi:"actorType"` + // (String) When the specified actor can bypass the ruleset. pullRequest means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pullRequest`. + BypassMode *string `pulumi:"bypassMode"` } -// OrganizationWebhookConfigurationInput is an input type that accepts OrganizationWebhookConfigurationArgs and OrganizationWebhookConfigurationOutput values. -// You can construct a concrete instance of `OrganizationWebhookConfigurationInput` via: +// OrganizationRulesetBypassActorInput is an input type that accepts OrganizationRulesetBypassActorArgs and OrganizationRulesetBypassActorOutput values. +// You can construct a concrete instance of `OrganizationRulesetBypassActorInput` via: // -// OrganizationWebhookConfigurationArgs{...} -type OrganizationWebhookConfigurationInput interface { +// OrganizationRulesetBypassActorArgs{...} +type OrganizationRulesetBypassActorInput interface { pulumi.Input - ToOrganizationWebhookConfigurationOutput() OrganizationWebhookConfigurationOutput - ToOrganizationWebhookConfigurationOutputWithContext(context.Context) OrganizationWebhookConfigurationOutput + ToOrganizationRulesetBypassActorOutput() OrganizationRulesetBypassActorOutput + ToOrganizationRulesetBypassActorOutputWithContext(context.Context) OrganizationRulesetBypassActorOutput } -type OrganizationWebhookConfigurationArgs struct { - ContentType pulumi.StringPtrInput `pulumi:"contentType"` - InsecureSsl pulumi.BoolPtrInput `pulumi:"insecureSsl"` - Secret pulumi.StringPtrInput `pulumi:"secret"` - // URL of the webhook - Url pulumi.StringInput `pulumi:"url"` +type OrganizationRulesetBypassActorArgs struct { + // (Number) The ID of the actor that can bypass a ruleset + ActorId pulumi.IntInput `pulumi:"actorId"` + // The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + ActorType pulumi.StringInput `pulumi:"actorType"` + // (String) When the specified actor can bypass the ruleset. pullRequest means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pullRequest`. + BypassMode pulumi.StringPtrInput `pulumi:"bypassMode"` } -func (OrganizationWebhookConfigurationArgs) ElementType() reflect.Type { - return reflect.TypeOf((*OrganizationWebhookConfiguration)(nil)).Elem() +func (OrganizationRulesetBypassActorArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetBypassActor)(nil)).Elem() } -func (i OrganizationWebhookConfigurationArgs) ToOrganizationWebhookConfigurationOutput() OrganizationWebhookConfigurationOutput { - return i.ToOrganizationWebhookConfigurationOutputWithContext(context.Background()) +func (i OrganizationRulesetBypassActorArgs) ToOrganizationRulesetBypassActorOutput() OrganizationRulesetBypassActorOutput { + return i.ToOrganizationRulesetBypassActorOutputWithContext(context.Background()) } -func (i OrganizationWebhookConfigurationArgs) ToOrganizationWebhookConfigurationOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationOutput { - return pulumi.ToOutputWithContext(ctx, i).(OrganizationWebhookConfigurationOutput) +func (i OrganizationRulesetBypassActorArgs) ToOrganizationRulesetBypassActorOutputWithContext(ctx context.Context) OrganizationRulesetBypassActorOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetBypassActorOutput) } -func (i OrganizationWebhookConfigurationArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationWebhookConfiguration] { - return pulumix.Output[OrganizationWebhookConfiguration]{ - OutputState: i.ToOrganizationWebhookConfigurationOutputWithContext(ctx).OutputState, +func (i OrganizationRulesetBypassActorArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetBypassActor] { + return pulumix.Output[OrganizationRulesetBypassActor]{ + OutputState: i.ToOrganizationRulesetBypassActorOutputWithContext(ctx).OutputState, } } -func (i OrganizationWebhookConfigurationArgs) ToOrganizationWebhookConfigurationPtrOutput() OrganizationWebhookConfigurationPtrOutput { - return i.ToOrganizationWebhookConfigurationPtrOutputWithContext(context.Background()) +// OrganizationRulesetBypassActorArrayInput is an input type that accepts OrganizationRulesetBypassActorArray and OrganizationRulesetBypassActorArrayOutput values. +// You can construct a concrete instance of `OrganizationRulesetBypassActorArrayInput` via: +// +// OrganizationRulesetBypassActorArray{ OrganizationRulesetBypassActorArgs{...} } +type OrganizationRulesetBypassActorArrayInput interface { + pulumi.Input + + ToOrganizationRulesetBypassActorArrayOutput() OrganizationRulesetBypassActorArrayOutput + ToOrganizationRulesetBypassActorArrayOutputWithContext(context.Context) OrganizationRulesetBypassActorArrayOutput } -func (i OrganizationWebhookConfigurationArgs) ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(OrganizationWebhookConfigurationOutput).ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx) +type OrganizationRulesetBypassActorArray []OrganizationRulesetBypassActorInput + +func (OrganizationRulesetBypassActorArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]OrganizationRulesetBypassActor)(nil)).Elem() } -// OrganizationWebhookConfigurationPtrInput is an input type that accepts OrganizationWebhookConfigurationArgs, OrganizationWebhookConfigurationPtr and OrganizationWebhookConfigurationPtrOutput values. -// You can construct a concrete instance of `OrganizationWebhookConfigurationPtrInput` via: +func (i OrganizationRulesetBypassActorArray) ToOrganizationRulesetBypassActorArrayOutput() OrganizationRulesetBypassActorArrayOutput { + return i.ToOrganizationRulesetBypassActorArrayOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetBypassActorArray) ToOrganizationRulesetBypassActorArrayOutputWithContext(ctx context.Context) OrganizationRulesetBypassActorArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetBypassActorArrayOutput) +} + +func (i OrganizationRulesetBypassActorArray) ToOutput(ctx context.Context) pulumix.Output[[]OrganizationRulesetBypassActor] { + return pulumix.Output[[]OrganizationRulesetBypassActor]{ + OutputState: i.ToOrganizationRulesetBypassActorArrayOutputWithContext(ctx).OutputState, + } +} + +type OrganizationRulesetBypassActorOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetBypassActorOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetBypassActor)(nil)).Elem() +} + +func (o OrganizationRulesetBypassActorOutput) ToOrganizationRulesetBypassActorOutput() OrganizationRulesetBypassActorOutput { + return o +} + +func (o OrganizationRulesetBypassActorOutput) ToOrganizationRulesetBypassActorOutputWithContext(ctx context.Context) OrganizationRulesetBypassActorOutput { + return o +} + +func (o OrganizationRulesetBypassActorOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetBypassActor] { + return pulumix.Output[OrganizationRulesetBypassActor]{ + OutputState: o.OutputState, + } +} + +// (Number) The ID of the actor that can bypass a ruleset +func (o OrganizationRulesetBypassActorOutput) ActorId() pulumi.IntOutput { + return o.ApplyT(func(v OrganizationRulesetBypassActor) int { return v.ActorId }).(pulumi.IntOutput) +} + +// The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. +func (o OrganizationRulesetBypassActorOutput) ActorType() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetBypassActor) string { return v.ActorType }).(pulumi.StringOutput) +} + +// (String) When the specified actor can bypass the ruleset. pullRequest means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pullRequest`. +func (o OrganizationRulesetBypassActorOutput) BypassMode() pulumi.StringPtrOutput { + return o.ApplyT(func(v OrganizationRulesetBypassActor) *string { return v.BypassMode }).(pulumi.StringPtrOutput) +} + +type OrganizationRulesetBypassActorArrayOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetBypassActorArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]OrganizationRulesetBypassActor)(nil)).Elem() +} + +func (o OrganizationRulesetBypassActorArrayOutput) ToOrganizationRulesetBypassActorArrayOutput() OrganizationRulesetBypassActorArrayOutput { + return o +} + +func (o OrganizationRulesetBypassActorArrayOutput) ToOrganizationRulesetBypassActorArrayOutputWithContext(ctx context.Context) OrganizationRulesetBypassActorArrayOutput { + return o +} + +func (o OrganizationRulesetBypassActorArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]OrganizationRulesetBypassActor] { + return pulumix.Output[[]OrganizationRulesetBypassActor]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationRulesetBypassActorArrayOutput) Index(i pulumi.IntInput) OrganizationRulesetBypassActorOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) OrganizationRulesetBypassActor { + return vs[0].([]OrganizationRulesetBypassActor)[vs[1].(int)] + }).(OrganizationRulesetBypassActorOutput) +} + +type OrganizationRulesetConditions struct { + // (Block List, Min: 1, Max: 1) (see below for nested schema) + RefName OrganizationRulesetConditionsRefName `pulumi:"refName"` + // The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repositoryName`. + RepositoryId *int `pulumi:"repositoryId"` + // Conflicts with `repositoryId`. (see below for nested schema) + // + // One of `repositoryId` and `repositoryName` must be set for the rule to target any repositories. + RepositoryName *OrganizationRulesetConditionsRepositoryName `pulumi:"repositoryName"` +} + +// OrganizationRulesetConditionsInput is an input type that accepts OrganizationRulesetConditionsArgs and OrganizationRulesetConditionsOutput values. +// You can construct a concrete instance of `OrganizationRulesetConditionsInput` via: // -// OrganizationWebhookConfigurationArgs{...} +// OrganizationRulesetConditionsArgs{...} +type OrganizationRulesetConditionsInput interface { + pulumi.Input + + ToOrganizationRulesetConditionsOutput() OrganizationRulesetConditionsOutput + ToOrganizationRulesetConditionsOutputWithContext(context.Context) OrganizationRulesetConditionsOutput +} + +type OrganizationRulesetConditionsArgs struct { + // (Block List, Min: 1, Max: 1) (see below for nested schema) + RefName OrganizationRulesetConditionsRefNameInput `pulumi:"refName"` + // The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repositoryName`. + RepositoryId pulumi.IntPtrInput `pulumi:"repositoryId"` + // Conflicts with `repositoryId`. (see below for nested schema) + // + // One of `repositoryId` and `repositoryName` must be set for the rule to target any repositories. + RepositoryName OrganizationRulesetConditionsRepositoryNamePtrInput `pulumi:"repositoryName"` +} + +func (OrganizationRulesetConditionsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetConditions)(nil)).Elem() +} + +func (i OrganizationRulesetConditionsArgs) ToOrganizationRulesetConditionsOutput() OrganizationRulesetConditionsOutput { + return i.ToOrganizationRulesetConditionsOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetConditionsArgs) ToOrganizationRulesetConditionsOutputWithContext(ctx context.Context) OrganizationRulesetConditionsOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetConditionsOutput) +} + +func (i OrganizationRulesetConditionsArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetConditions] { + return pulumix.Output[OrganizationRulesetConditions]{ + OutputState: i.ToOrganizationRulesetConditionsOutputWithContext(ctx).OutputState, + } +} + +func (i OrganizationRulesetConditionsArgs) ToOrganizationRulesetConditionsPtrOutput() OrganizationRulesetConditionsPtrOutput { + return i.ToOrganizationRulesetConditionsPtrOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetConditionsArgs) ToOrganizationRulesetConditionsPtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetConditionsOutput).ToOrganizationRulesetConditionsPtrOutputWithContext(ctx) +} + +// OrganizationRulesetConditionsPtrInput is an input type that accepts OrganizationRulesetConditionsArgs, OrganizationRulesetConditionsPtr and OrganizationRulesetConditionsPtrOutput values. +// You can construct a concrete instance of `OrganizationRulesetConditionsPtrInput` via: +// +// OrganizationRulesetConditionsArgs{...} // // or: // // nil -type OrganizationWebhookConfigurationPtrInput interface { +type OrganizationRulesetConditionsPtrInput interface { pulumi.Input - ToOrganizationWebhookConfigurationPtrOutput() OrganizationWebhookConfigurationPtrOutput - ToOrganizationWebhookConfigurationPtrOutputWithContext(context.Context) OrganizationWebhookConfigurationPtrOutput + ToOrganizationRulesetConditionsPtrOutput() OrganizationRulesetConditionsPtrOutput + ToOrganizationRulesetConditionsPtrOutputWithContext(context.Context) OrganizationRulesetConditionsPtrOutput } -type organizationWebhookConfigurationPtrType OrganizationWebhookConfigurationArgs +type organizationRulesetConditionsPtrType OrganizationRulesetConditionsArgs -func OrganizationWebhookConfigurationPtr(v *OrganizationWebhookConfigurationArgs) OrganizationWebhookConfigurationPtrInput { - return (*organizationWebhookConfigurationPtrType)(v) +func OrganizationRulesetConditionsPtr(v *OrganizationRulesetConditionsArgs) OrganizationRulesetConditionsPtrInput { + return (*organizationRulesetConditionsPtrType)(v) } -func (*organizationWebhookConfigurationPtrType) ElementType() reflect.Type { - return reflect.TypeOf((**OrganizationWebhookConfiguration)(nil)).Elem() +func (*organizationRulesetConditionsPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetConditions)(nil)).Elem() } -func (i *organizationWebhookConfigurationPtrType) ToOrganizationWebhookConfigurationPtrOutput() OrganizationWebhookConfigurationPtrOutput { - return i.ToOrganizationWebhookConfigurationPtrOutputWithContext(context.Background()) +func (i *organizationRulesetConditionsPtrType) ToOrganizationRulesetConditionsPtrOutput() OrganizationRulesetConditionsPtrOutput { + return i.ToOrganizationRulesetConditionsPtrOutputWithContext(context.Background()) } -func (i *organizationWebhookConfigurationPtrType) ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(OrganizationWebhookConfigurationPtrOutput) +func (i *organizationRulesetConditionsPtrType) ToOrganizationRulesetConditionsPtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetConditionsPtrOutput) } -func (i *organizationWebhookConfigurationPtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationWebhookConfiguration] { - return pulumix.Output[*OrganizationWebhookConfiguration]{ - OutputState: i.ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx).OutputState, +func (i *organizationRulesetConditionsPtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetConditions] { + return pulumix.Output[*OrganizationRulesetConditions]{ + OutputState: i.ToOrganizationRulesetConditionsPtrOutputWithContext(ctx).OutputState, } } -type OrganizationWebhookConfigurationOutput struct{ *pulumi.OutputState } +type OrganizationRulesetConditionsOutput struct{ *pulumi.OutputState } -func (OrganizationWebhookConfigurationOutput) ElementType() reflect.Type { - return reflect.TypeOf((*OrganizationWebhookConfiguration)(nil)).Elem() +func (OrganizationRulesetConditionsOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetConditions)(nil)).Elem() } -func (o OrganizationWebhookConfigurationOutput) ToOrganizationWebhookConfigurationOutput() OrganizationWebhookConfigurationOutput { +func (o OrganizationRulesetConditionsOutput) ToOrganizationRulesetConditionsOutput() OrganizationRulesetConditionsOutput { return o } -func (o OrganizationWebhookConfigurationOutput) ToOrganizationWebhookConfigurationOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationOutput { +func (o OrganizationRulesetConditionsOutput) ToOrganizationRulesetConditionsOutputWithContext(ctx context.Context) OrganizationRulesetConditionsOutput { return o } -func (o OrganizationWebhookConfigurationOutput) ToOrganizationWebhookConfigurationPtrOutput() OrganizationWebhookConfigurationPtrOutput { - return o.ToOrganizationWebhookConfigurationPtrOutputWithContext(context.Background()) +func (o OrganizationRulesetConditionsOutput) ToOrganizationRulesetConditionsPtrOutput() OrganizationRulesetConditionsPtrOutput { + return o.ToOrganizationRulesetConditionsPtrOutputWithContext(context.Background()) } -func (o OrganizationWebhookConfigurationOutput) ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationPtrOutput { - return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationWebhookConfiguration) *OrganizationWebhookConfiguration { +func (o OrganizationRulesetConditionsOutput) ToOrganizationRulesetConditionsPtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationRulesetConditions) *OrganizationRulesetConditions { return &v - }).(OrganizationWebhookConfigurationPtrOutput) + }).(OrganizationRulesetConditionsPtrOutput) } -func (o OrganizationWebhookConfigurationOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationWebhookConfiguration] { - return pulumix.Output[OrganizationWebhookConfiguration]{ +func (o OrganizationRulesetConditionsOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetConditions] { + return pulumix.Output[OrganizationRulesetConditions]{ OutputState: o.OutputState, } } -func (o OrganizationWebhookConfigurationOutput) ContentType() pulumi.StringPtrOutput { - return o.ApplyT(func(v OrganizationWebhookConfiguration) *string { return v.ContentType }).(pulumi.StringPtrOutput) -} - -func (o OrganizationWebhookConfigurationOutput) InsecureSsl() pulumi.BoolPtrOutput { - return o.ApplyT(func(v OrganizationWebhookConfiguration) *bool { return v.InsecureSsl }).(pulumi.BoolPtrOutput) +// (Block List, Min: 1, Max: 1) (see below for nested schema) +func (o OrganizationRulesetConditionsOutput) RefName() OrganizationRulesetConditionsRefNameOutput { + return o.ApplyT(func(v OrganizationRulesetConditions) OrganizationRulesetConditionsRefName { return v.RefName }).(OrganizationRulesetConditionsRefNameOutput) } -func (o OrganizationWebhookConfigurationOutput) Secret() pulumi.StringPtrOutput { - return o.ApplyT(func(v OrganizationWebhookConfiguration) *string { return v.Secret }).(pulumi.StringPtrOutput) +// The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repositoryName`. +func (o OrganizationRulesetConditionsOutput) RepositoryId() pulumi.IntPtrOutput { + return o.ApplyT(func(v OrganizationRulesetConditions) *int { return v.RepositoryId }).(pulumi.IntPtrOutput) } -// URL of the webhook -func (o OrganizationWebhookConfigurationOutput) Url() pulumi.StringOutput { - return o.ApplyT(func(v OrganizationWebhookConfiguration) string { return v.Url }).(pulumi.StringOutput) +// Conflicts with `repositoryId`. (see below for nested schema) +// +// One of `repositoryId` and `repositoryName` must be set for the rule to target any repositories. +func (o OrganizationRulesetConditionsOutput) RepositoryName() OrganizationRulesetConditionsRepositoryNamePtrOutput { + return o.ApplyT(func(v OrganizationRulesetConditions) *OrganizationRulesetConditionsRepositoryName { + return v.RepositoryName + }).(OrganizationRulesetConditionsRepositoryNamePtrOutput) } -type OrganizationWebhookConfigurationPtrOutput struct{ *pulumi.OutputState } +type OrganizationRulesetConditionsPtrOutput struct{ *pulumi.OutputState } -func (OrganizationWebhookConfigurationPtrOutput) ElementType() reflect.Type { - return reflect.TypeOf((**OrganizationWebhookConfiguration)(nil)).Elem() +func (OrganizationRulesetConditionsPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetConditions)(nil)).Elem() } -func (o OrganizationWebhookConfigurationPtrOutput) ToOrganizationWebhookConfigurationPtrOutput() OrganizationWebhookConfigurationPtrOutput { +func (o OrganizationRulesetConditionsPtrOutput) ToOrganizationRulesetConditionsPtrOutput() OrganizationRulesetConditionsPtrOutput { return o } -func (o OrganizationWebhookConfigurationPtrOutput) ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationPtrOutput { +func (o OrganizationRulesetConditionsPtrOutput) ToOrganizationRulesetConditionsPtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsPtrOutput { return o } -func (o OrganizationWebhookConfigurationPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationWebhookConfiguration] { - return pulumix.Output[*OrganizationWebhookConfiguration]{ +func (o OrganizationRulesetConditionsPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetConditions] { + return pulumix.Output[*OrganizationRulesetConditions]{ OutputState: o.OutputState, } } -func (o OrganizationWebhookConfigurationPtrOutput) Elem() OrganizationWebhookConfigurationOutput { - return o.ApplyT(func(v *OrganizationWebhookConfiguration) OrganizationWebhookConfiguration { +func (o OrganizationRulesetConditionsPtrOutput) Elem() OrganizationRulesetConditionsOutput { + return o.ApplyT(func(v *OrganizationRulesetConditions) OrganizationRulesetConditions { if v != nil { return *v } - var ret OrganizationWebhookConfiguration + var ret OrganizationRulesetConditions return ret - }).(OrganizationWebhookConfigurationOutput) -} - -func (o OrganizationWebhookConfigurationPtrOutput) ContentType() pulumi.StringPtrOutput { - return o.ApplyT(func(v *OrganizationWebhookConfiguration) *string { - if v == nil { - return nil - } - return v.ContentType - }).(pulumi.StringPtrOutput) + }).(OrganizationRulesetConditionsOutput) } -func (o OrganizationWebhookConfigurationPtrOutput) InsecureSsl() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *OrganizationWebhookConfiguration) *bool { +// (Block List, Min: 1, Max: 1) (see below for nested schema) +func (o OrganizationRulesetConditionsPtrOutput) RefName() OrganizationRulesetConditionsRefNamePtrOutput { + return o.ApplyT(func(v *OrganizationRulesetConditions) *OrganizationRulesetConditionsRefName { if v == nil { return nil } - return v.InsecureSsl - }).(pulumi.BoolPtrOutput) + return &v.RefName + }).(OrganizationRulesetConditionsRefNamePtrOutput) } -func (o OrganizationWebhookConfigurationPtrOutput) Secret() pulumi.StringPtrOutput { - return o.ApplyT(func(v *OrganizationWebhookConfiguration) *string { +// The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repositoryName`. +func (o OrganizationRulesetConditionsPtrOutput) RepositoryId() pulumi.IntPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetConditions) *int { if v == nil { return nil } - return v.Secret - }).(pulumi.StringPtrOutput) + return v.RepositoryId + }).(pulumi.IntPtrOutput) } -// URL of the webhook -func (o OrganizationWebhookConfigurationPtrOutput) Url() pulumi.StringPtrOutput { - return o.ApplyT(func(v *OrganizationWebhookConfiguration) *string { +// Conflicts with `repositoryId`. (see below for nested schema) +// +// One of `repositoryId` and `repositoryName` must be set for the rule to target any repositories. +func (o OrganizationRulesetConditionsPtrOutput) RepositoryName() OrganizationRulesetConditionsRepositoryNamePtrOutput { + return o.ApplyT(func(v *OrganizationRulesetConditions) *OrganizationRulesetConditionsRepositoryName { if v == nil { return nil } - return &v.Url - }).(pulumi.StringPtrOutput) + return v.RepositoryName + }).(OrganizationRulesetConditionsRepositoryNamePtrOutput) } -type ProviderAppAuth struct { - Id string `pulumi:"id"` - InstallationId string `pulumi:"installationId"` - PemFile string `pulumi:"pemFile"` +type OrganizationRulesetConditionsRefName struct { + // (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + Excludes []string `pulumi:"excludes"` + // (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + Includes []string `pulumi:"includes"` } -// ProviderAppAuthInput is an input type that accepts ProviderAppAuthArgs and ProviderAppAuthOutput values. -// You can construct a concrete instance of `ProviderAppAuthInput` via: +// OrganizationRulesetConditionsRefNameInput is an input type that accepts OrganizationRulesetConditionsRefNameArgs and OrganizationRulesetConditionsRefNameOutput values. +// You can construct a concrete instance of `OrganizationRulesetConditionsRefNameInput` via: // -// ProviderAppAuthArgs{...} -type ProviderAppAuthInput interface { +// OrganizationRulesetConditionsRefNameArgs{...} +type OrganizationRulesetConditionsRefNameInput interface { pulumi.Input - ToProviderAppAuthOutput() ProviderAppAuthOutput - ToProviderAppAuthOutputWithContext(context.Context) ProviderAppAuthOutput + ToOrganizationRulesetConditionsRefNameOutput() OrganizationRulesetConditionsRefNameOutput + ToOrganizationRulesetConditionsRefNameOutputWithContext(context.Context) OrganizationRulesetConditionsRefNameOutput } -type ProviderAppAuthArgs struct { - Id pulumi.StringInput `pulumi:"id"` - InstallationId pulumi.StringInput `pulumi:"installationId"` - PemFile pulumi.StringInput `pulumi:"pemFile"` +type OrganizationRulesetConditionsRefNameArgs struct { + // (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + Excludes pulumi.StringArrayInput `pulumi:"excludes"` + // (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + Includes pulumi.StringArrayInput `pulumi:"includes"` } -func (ProviderAppAuthArgs) ElementType() reflect.Type { - return reflect.TypeOf((*ProviderAppAuth)(nil)).Elem() +func (OrganizationRulesetConditionsRefNameArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetConditionsRefName)(nil)).Elem() } -func (i ProviderAppAuthArgs) ToProviderAppAuthOutput() ProviderAppAuthOutput { - return i.ToProviderAppAuthOutputWithContext(context.Background()) +func (i OrganizationRulesetConditionsRefNameArgs) ToOrganizationRulesetConditionsRefNameOutput() OrganizationRulesetConditionsRefNameOutput { + return i.ToOrganizationRulesetConditionsRefNameOutputWithContext(context.Background()) } -func (i ProviderAppAuthArgs) ToProviderAppAuthOutputWithContext(ctx context.Context) ProviderAppAuthOutput { - return pulumi.ToOutputWithContext(ctx, i).(ProviderAppAuthOutput) +func (i OrganizationRulesetConditionsRefNameArgs) ToOrganizationRulesetConditionsRefNameOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRefNameOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetConditionsRefNameOutput) } -func (i ProviderAppAuthArgs) ToOutput(ctx context.Context) pulumix.Output[ProviderAppAuth] { - return pulumix.Output[ProviderAppAuth]{ - OutputState: i.ToProviderAppAuthOutputWithContext(ctx).OutputState, +func (i OrganizationRulesetConditionsRefNameArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetConditionsRefName] { + return pulumix.Output[OrganizationRulesetConditionsRefName]{ + OutputState: i.ToOrganizationRulesetConditionsRefNameOutputWithContext(ctx).OutputState, } } -func (i ProviderAppAuthArgs) ToProviderAppAuthPtrOutput() ProviderAppAuthPtrOutput { - return i.ToProviderAppAuthPtrOutputWithContext(context.Background()) +func (i OrganizationRulesetConditionsRefNameArgs) ToOrganizationRulesetConditionsRefNamePtrOutput() OrganizationRulesetConditionsRefNamePtrOutput { + return i.ToOrganizationRulesetConditionsRefNamePtrOutputWithContext(context.Background()) } -func (i ProviderAppAuthArgs) ToProviderAppAuthPtrOutputWithContext(ctx context.Context) ProviderAppAuthPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(ProviderAppAuthOutput).ToProviderAppAuthPtrOutputWithContext(ctx) +func (i OrganizationRulesetConditionsRefNameArgs) ToOrganizationRulesetConditionsRefNamePtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRefNamePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetConditionsRefNameOutput).ToOrganizationRulesetConditionsRefNamePtrOutputWithContext(ctx) } -// ProviderAppAuthPtrInput is an input type that accepts ProviderAppAuthArgs, ProviderAppAuthPtr and ProviderAppAuthPtrOutput values. -// You can construct a concrete instance of `ProviderAppAuthPtrInput` via: +// OrganizationRulesetConditionsRefNamePtrInput is an input type that accepts OrganizationRulesetConditionsRefNameArgs, OrganizationRulesetConditionsRefNamePtr and OrganizationRulesetConditionsRefNamePtrOutput values. +// You can construct a concrete instance of `OrganizationRulesetConditionsRefNamePtrInput` via: // -// ProviderAppAuthArgs{...} +// OrganizationRulesetConditionsRefNameArgs{...} // // or: // // nil -type ProviderAppAuthPtrInput interface { +type OrganizationRulesetConditionsRefNamePtrInput interface { pulumi.Input - ToProviderAppAuthPtrOutput() ProviderAppAuthPtrOutput - ToProviderAppAuthPtrOutputWithContext(context.Context) ProviderAppAuthPtrOutput + ToOrganizationRulesetConditionsRefNamePtrOutput() OrganizationRulesetConditionsRefNamePtrOutput + ToOrganizationRulesetConditionsRefNamePtrOutputWithContext(context.Context) OrganizationRulesetConditionsRefNamePtrOutput } -type providerAppAuthPtrType ProviderAppAuthArgs +type organizationRulesetConditionsRefNamePtrType OrganizationRulesetConditionsRefNameArgs -func ProviderAppAuthPtr(v *ProviderAppAuthArgs) ProviderAppAuthPtrInput { - return (*providerAppAuthPtrType)(v) +func OrganizationRulesetConditionsRefNamePtr(v *OrganizationRulesetConditionsRefNameArgs) OrganizationRulesetConditionsRefNamePtrInput { + return (*organizationRulesetConditionsRefNamePtrType)(v) } -func (*providerAppAuthPtrType) ElementType() reflect.Type { - return reflect.TypeOf((**ProviderAppAuth)(nil)).Elem() +func (*organizationRulesetConditionsRefNamePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetConditionsRefName)(nil)).Elem() } -func (i *providerAppAuthPtrType) ToProviderAppAuthPtrOutput() ProviderAppAuthPtrOutput { - return i.ToProviderAppAuthPtrOutputWithContext(context.Background()) +func (i *organizationRulesetConditionsRefNamePtrType) ToOrganizationRulesetConditionsRefNamePtrOutput() OrganizationRulesetConditionsRefNamePtrOutput { + return i.ToOrganizationRulesetConditionsRefNamePtrOutputWithContext(context.Background()) } -func (i *providerAppAuthPtrType) ToProviderAppAuthPtrOutputWithContext(ctx context.Context) ProviderAppAuthPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(ProviderAppAuthPtrOutput) +func (i *organizationRulesetConditionsRefNamePtrType) ToOrganizationRulesetConditionsRefNamePtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRefNamePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetConditionsRefNamePtrOutput) } -func (i *providerAppAuthPtrType) ToOutput(ctx context.Context) pulumix.Output[*ProviderAppAuth] { - return pulumix.Output[*ProviderAppAuth]{ - OutputState: i.ToProviderAppAuthPtrOutputWithContext(ctx).OutputState, +func (i *organizationRulesetConditionsRefNamePtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetConditionsRefName] { + return pulumix.Output[*OrganizationRulesetConditionsRefName]{ + OutputState: i.ToOrganizationRulesetConditionsRefNamePtrOutputWithContext(ctx).OutputState, } } -type ProviderAppAuthOutput struct{ *pulumi.OutputState } +type OrganizationRulesetConditionsRefNameOutput struct{ *pulumi.OutputState } -func (ProviderAppAuthOutput) ElementType() reflect.Type { - return reflect.TypeOf((*ProviderAppAuth)(nil)).Elem() +func (OrganizationRulesetConditionsRefNameOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetConditionsRefName)(nil)).Elem() } -func (o ProviderAppAuthOutput) ToProviderAppAuthOutput() ProviderAppAuthOutput { +func (o OrganizationRulesetConditionsRefNameOutput) ToOrganizationRulesetConditionsRefNameOutput() OrganizationRulesetConditionsRefNameOutput { return o } -func (o ProviderAppAuthOutput) ToProviderAppAuthOutputWithContext(ctx context.Context) ProviderAppAuthOutput { +func (o OrganizationRulesetConditionsRefNameOutput) ToOrganizationRulesetConditionsRefNameOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRefNameOutput { return o } -func (o ProviderAppAuthOutput) ToProviderAppAuthPtrOutput() ProviderAppAuthPtrOutput { - return o.ToProviderAppAuthPtrOutputWithContext(context.Background()) +func (o OrganizationRulesetConditionsRefNameOutput) ToOrganizationRulesetConditionsRefNamePtrOutput() OrganizationRulesetConditionsRefNamePtrOutput { + return o.ToOrganizationRulesetConditionsRefNamePtrOutputWithContext(context.Background()) } -func (o ProviderAppAuthOutput) ToProviderAppAuthPtrOutputWithContext(ctx context.Context) ProviderAppAuthPtrOutput { - return o.ApplyTWithContext(ctx, func(_ context.Context, v ProviderAppAuth) *ProviderAppAuth { +func (o OrganizationRulesetConditionsRefNameOutput) ToOrganizationRulesetConditionsRefNamePtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRefNamePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationRulesetConditionsRefName) *OrganizationRulesetConditionsRefName { return &v - }).(ProviderAppAuthPtrOutput) + }).(OrganizationRulesetConditionsRefNamePtrOutput) } -func (o ProviderAppAuthOutput) ToOutput(ctx context.Context) pulumix.Output[ProviderAppAuth] { - return pulumix.Output[ProviderAppAuth]{ +func (o OrganizationRulesetConditionsRefNameOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetConditionsRefName] { + return pulumix.Output[OrganizationRulesetConditionsRefName]{ OutputState: o.OutputState, } } -func (o ProviderAppAuthOutput) Id() pulumi.StringOutput { - return o.ApplyT(func(v ProviderAppAuth) string { return v.Id }).(pulumi.StringOutput) -} - -func (o ProviderAppAuthOutput) InstallationId() pulumi.StringOutput { - return o.ApplyT(func(v ProviderAppAuth) string { return v.InstallationId }).(pulumi.StringOutput) +// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. +func (o OrganizationRulesetConditionsRefNameOutput) Excludes() pulumi.StringArrayOutput { + return o.ApplyT(func(v OrganizationRulesetConditionsRefName) []string { return v.Excludes }).(pulumi.StringArrayOutput) } -func (o ProviderAppAuthOutput) PemFile() pulumi.StringOutput { - return o.ApplyT(func(v ProviderAppAuth) string { return v.PemFile }).(pulumi.StringOutput) +// (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. +func (o OrganizationRulesetConditionsRefNameOutput) Includes() pulumi.StringArrayOutput { + return o.ApplyT(func(v OrganizationRulesetConditionsRefName) []string { return v.Includes }).(pulumi.StringArrayOutput) } -type ProviderAppAuthPtrOutput struct{ *pulumi.OutputState } +type OrganizationRulesetConditionsRefNamePtrOutput struct{ *pulumi.OutputState } -func (ProviderAppAuthPtrOutput) ElementType() reflect.Type { - return reflect.TypeOf((**ProviderAppAuth)(nil)).Elem() +func (OrganizationRulesetConditionsRefNamePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetConditionsRefName)(nil)).Elem() } -func (o ProviderAppAuthPtrOutput) ToProviderAppAuthPtrOutput() ProviderAppAuthPtrOutput { +func (o OrganizationRulesetConditionsRefNamePtrOutput) ToOrganizationRulesetConditionsRefNamePtrOutput() OrganizationRulesetConditionsRefNamePtrOutput { return o } -func (o ProviderAppAuthPtrOutput) ToProviderAppAuthPtrOutputWithContext(ctx context.Context) ProviderAppAuthPtrOutput { +func (o OrganizationRulesetConditionsRefNamePtrOutput) ToOrganizationRulesetConditionsRefNamePtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRefNamePtrOutput { return o } -func (o ProviderAppAuthPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*ProviderAppAuth] { - return pulumix.Output[*ProviderAppAuth]{ +func (o OrganizationRulesetConditionsRefNamePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetConditionsRefName] { + return pulumix.Output[*OrganizationRulesetConditionsRefName]{ OutputState: o.OutputState, } } -func (o ProviderAppAuthPtrOutput) Elem() ProviderAppAuthOutput { - return o.ApplyT(func(v *ProviderAppAuth) ProviderAppAuth { +func (o OrganizationRulesetConditionsRefNamePtrOutput) Elem() OrganizationRulesetConditionsRefNameOutput { + return o.ApplyT(func(v *OrganizationRulesetConditionsRefName) OrganizationRulesetConditionsRefName { if v != nil { return *v } - var ret ProviderAppAuth + var ret OrganizationRulesetConditionsRefName return ret - }).(ProviderAppAuthOutput) + }).(OrganizationRulesetConditionsRefNameOutput) } -func (o ProviderAppAuthPtrOutput) Id() pulumi.StringPtrOutput { - return o.ApplyT(func(v *ProviderAppAuth) *string { +// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. +func (o OrganizationRulesetConditionsRefNamePtrOutput) Excludes() pulumi.StringArrayOutput { + return o.ApplyT(func(v *OrganizationRulesetConditionsRefName) []string { if v == nil { return nil } - return &v.Id - }).(pulumi.StringPtrOutput) -} - -func (o ProviderAppAuthPtrOutput) InstallationId() pulumi.StringPtrOutput { - return o.ApplyT(func(v *ProviderAppAuth) *string { - if v == nil { - return nil - } - return &v.InstallationId - }).(pulumi.StringPtrOutput) + return v.Excludes + }).(pulumi.StringArrayOutput) } -func (o ProviderAppAuthPtrOutput) PemFile() pulumi.StringPtrOutput { - return o.ApplyT(func(v *ProviderAppAuth) *string { +// (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. +func (o OrganizationRulesetConditionsRefNamePtrOutput) Includes() pulumi.StringArrayOutput { + return o.ApplyT(func(v *OrganizationRulesetConditionsRefName) []string { if v == nil { return nil } - return &v.PemFile - }).(pulumi.StringPtrOutput) + return v.Includes + }).(pulumi.StringArrayOutput) } -type RepositoryCollaboratorsTeam struct { - // The permission of the outside collaborators for the repository. - // Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. - // Must be `push` for personal repositories. Defaults to `push`. - Permission *string `pulumi:"permission"` - // The GitHub team id or the GitHub team slug - TeamId string `pulumi:"teamId"` +type OrganizationRulesetConditionsRepositoryName struct { + // (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + Excludes []string `pulumi:"excludes"` + // (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + Inlcudes []string `pulumi:"inlcudes"` + Protected *bool `pulumi:"protected"` } -// RepositoryCollaboratorsTeamInput is an input type that accepts RepositoryCollaboratorsTeamArgs and RepositoryCollaboratorsTeamOutput values. -// You can construct a concrete instance of `RepositoryCollaboratorsTeamInput` via: +// OrganizationRulesetConditionsRepositoryNameInput is an input type that accepts OrganizationRulesetConditionsRepositoryNameArgs and OrganizationRulesetConditionsRepositoryNameOutput values. +// You can construct a concrete instance of `OrganizationRulesetConditionsRepositoryNameInput` via: // -// RepositoryCollaboratorsTeamArgs{...} -type RepositoryCollaboratorsTeamInput interface { +// OrganizationRulesetConditionsRepositoryNameArgs{...} +type OrganizationRulesetConditionsRepositoryNameInput interface { pulumi.Input - ToRepositoryCollaboratorsTeamOutput() RepositoryCollaboratorsTeamOutput - ToRepositoryCollaboratorsTeamOutputWithContext(context.Context) RepositoryCollaboratorsTeamOutput + ToOrganizationRulesetConditionsRepositoryNameOutput() OrganizationRulesetConditionsRepositoryNameOutput + ToOrganizationRulesetConditionsRepositoryNameOutputWithContext(context.Context) OrganizationRulesetConditionsRepositoryNameOutput } -type RepositoryCollaboratorsTeamArgs struct { - // The permission of the outside collaborators for the repository. - // Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. - // Must be `push` for personal repositories. Defaults to `push`. - Permission pulumi.StringPtrInput `pulumi:"permission"` - // The GitHub team id or the GitHub team slug - TeamId pulumi.StringInput `pulumi:"teamId"` +type OrganizationRulesetConditionsRepositoryNameArgs struct { + // (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + Excludes pulumi.StringArrayInput `pulumi:"excludes"` + // (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + Inlcudes pulumi.StringArrayInput `pulumi:"inlcudes"` + Protected pulumi.BoolPtrInput `pulumi:"protected"` } -func (RepositoryCollaboratorsTeamArgs) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryCollaboratorsTeam)(nil)).Elem() +func (OrganizationRulesetConditionsRepositoryNameArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetConditionsRepositoryName)(nil)).Elem() } -func (i RepositoryCollaboratorsTeamArgs) ToRepositoryCollaboratorsTeamOutput() RepositoryCollaboratorsTeamOutput { - return i.ToRepositoryCollaboratorsTeamOutputWithContext(context.Background()) +func (i OrganizationRulesetConditionsRepositoryNameArgs) ToOrganizationRulesetConditionsRepositoryNameOutput() OrganizationRulesetConditionsRepositoryNameOutput { + return i.ToOrganizationRulesetConditionsRepositoryNameOutputWithContext(context.Background()) } -func (i RepositoryCollaboratorsTeamArgs) ToRepositoryCollaboratorsTeamOutputWithContext(ctx context.Context) RepositoryCollaboratorsTeamOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryCollaboratorsTeamOutput) +func (i OrganizationRulesetConditionsRepositoryNameArgs) ToOrganizationRulesetConditionsRepositoryNameOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRepositoryNameOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetConditionsRepositoryNameOutput) } -func (i RepositoryCollaboratorsTeamArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryCollaboratorsTeam] { - return pulumix.Output[RepositoryCollaboratorsTeam]{ - OutputState: i.ToRepositoryCollaboratorsTeamOutputWithContext(ctx).OutputState, +func (i OrganizationRulesetConditionsRepositoryNameArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetConditionsRepositoryName] { + return pulumix.Output[OrganizationRulesetConditionsRepositoryName]{ + OutputState: i.ToOrganizationRulesetConditionsRepositoryNameOutputWithContext(ctx).OutputState, } } -// RepositoryCollaboratorsTeamArrayInput is an input type that accepts RepositoryCollaboratorsTeamArray and RepositoryCollaboratorsTeamArrayOutput values. -// You can construct a concrete instance of `RepositoryCollaboratorsTeamArrayInput` via: +func (i OrganizationRulesetConditionsRepositoryNameArgs) ToOrganizationRulesetConditionsRepositoryNamePtrOutput() OrganizationRulesetConditionsRepositoryNamePtrOutput { + return i.ToOrganizationRulesetConditionsRepositoryNamePtrOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetConditionsRepositoryNameArgs) ToOrganizationRulesetConditionsRepositoryNamePtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRepositoryNamePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetConditionsRepositoryNameOutput).ToOrganizationRulesetConditionsRepositoryNamePtrOutputWithContext(ctx) +} + +// OrganizationRulesetConditionsRepositoryNamePtrInput is an input type that accepts OrganizationRulesetConditionsRepositoryNameArgs, OrganizationRulesetConditionsRepositoryNamePtr and OrganizationRulesetConditionsRepositoryNamePtrOutput values. +// You can construct a concrete instance of `OrganizationRulesetConditionsRepositoryNamePtrInput` via: // -// RepositoryCollaboratorsTeamArray{ RepositoryCollaboratorsTeamArgs{...} } -type RepositoryCollaboratorsTeamArrayInput interface { +// OrganizationRulesetConditionsRepositoryNameArgs{...} +// +// or: +// +// nil +type OrganizationRulesetConditionsRepositoryNamePtrInput interface { pulumi.Input - ToRepositoryCollaboratorsTeamArrayOutput() RepositoryCollaboratorsTeamArrayOutput - ToRepositoryCollaboratorsTeamArrayOutputWithContext(context.Context) RepositoryCollaboratorsTeamArrayOutput + ToOrganizationRulesetConditionsRepositoryNamePtrOutput() OrganizationRulesetConditionsRepositoryNamePtrOutput + ToOrganizationRulesetConditionsRepositoryNamePtrOutputWithContext(context.Context) OrganizationRulesetConditionsRepositoryNamePtrOutput } -type RepositoryCollaboratorsTeamArray []RepositoryCollaboratorsTeamInput +type organizationRulesetConditionsRepositoryNamePtrType OrganizationRulesetConditionsRepositoryNameArgs -func (RepositoryCollaboratorsTeamArray) ElementType() reflect.Type { - return reflect.TypeOf((*[]RepositoryCollaboratorsTeam)(nil)).Elem() +func OrganizationRulesetConditionsRepositoryNamePtr(v *OrganizationRulesetConditionsRepositoryNameArgs) OrganizationRulesetConditionsRepositoryNamePtrInput { + return (*organizationRulesetConditionsRepositoryNamePtrType)(v) } -func (i RepositoryCollaboratorsTeamArray) ToRepositoryCollaboratorsTeamArrayOutput() RepositoryCollaboratorsTeamArrayOutput { - return i.ToRepositoryCollaboratorsTeamArrayOutputWithContext(context.Background()) +func (*organizationRulesetConditionsRepositoryNamePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetConditionsRepositoryName)(nil)).Elem() } -func (i RepositoryCollaboratorsTeamArray) ToRepositoryCollaboratorsTeamArrayOutputWithContext(ctx context.Context) RepositoryCollaboratorsTeamArrayOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryCollaboratorsTeamArrayOutput) +func (i *organizationRulesetConditionsRepositoryNamePtrType) ToOrganizationRulesetConditionsRepositoryNamePtrOutput() OrganizationRulesetConditionsRepositoryNamePtrOutput { + return i.ToOrganizationRulesetConditionsRepositoryNamePtrOutputWithContext(context.Background()) } -func (i RepositoryCollaboratorsTeamArray) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryCollaboratorsTeam] { - return pulumix.Output[[]RepositoryCollaboratorsTeam]{ - OutputState: i.ToRepositoryCollaboratorsTeamArrayOutputWithContext(ctx).OutputState, +func (i *organizationRulesetConditionsRepositoryNamePtrType) ToOrganizationRulesetConditionsRepositoryNamePtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRepositoryNamePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetConditionsRepositoryNamePtrOutput) +} + +func (i *organizationRulesetConditionsRepositoryNamePtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetConditionsRepositoryName] { + return pulumix.Output[*OrganizationRulesetConditionsRepositoryName]{ + OutputState: i.ToOrganizationRulesetConditionsRepositoryNamePtrOutputWithContext(ctx).OutputState, } } -type RepositoryCollaboratorsTeamOutput struct{ *pulumi.OutputState } +type OrganizationRulesetConditionsRepositoryNameOutput struct{ *pulumi.OutputState } -func (RepositoryCollaboratorsTeamOutput) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryCollaboratorsTeam)(nil)).Elem() +func (OrganizationRulesetConditionsRepositoryNameOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetConditionsRepositoryName)(nil)).Elem() } -func (o RepositoryCollaboratorsTeamOutput) ToRepositoryCollaboratorsTeamOutput() RepositoryCollaboratorsTeamOutput { +func (o OrganizationRulesetConditionsRepositoryNameOutput) ToOrganizationRulesetConditionsRepositoryNameOutput() OrganizationRulesetConditionsRepositoryNameOutput { return o } -func (o RepositoryCollaboratorsTeamOutput) ToRepositoryCollaboratorsTeamOutputWithContext(ctx context.Context) RepositoryCollaboratorsTeamOutput { +func (o OrganizationRulesetConditionsRepositoryNameOutput) ToOrganizationRulesetConditionsRepositoryNameOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRepositoryNameOutput { return o } -func (o RepositoryCollaboratorsTeamOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryCollaboratorsTeam] { - return pulumix.Output[RepositoryCollaboratorsTeam]{ +func (o OrganizationRulesetConditionsRepositoryNameOutput) ToOrganizationRulesetConditionsRepositoryNamePtrOutput() OrganizationRulesetConditionsRepositoryNamePtrOutput { + return o.ToOrganizationRulesetConditionsRepositoryNamePtrOutputWithContext(context.Background()) +} + +func (o OrganizationRulesetConditionsRepositoryNameOutput) ToOrganizationRulesetConditionsRepositoryNamePtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRepositoryNamePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationRulesetConditionsRepositoryName) *OrganizationRulesetConditionsRepositoryName { + return &v + }).(OrganizationRulesetConditionsRepositoryNamePtrOutput) +} + +func (o OrganizationRulesetConditionsRepositoryNameOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetConditionsRepositoryName] { + return pulumix.Output[OrganizationRulesetConditionsRepositoryName]{ OutputState: o.OutputState, } } -// The permission of the outside collaborators for the repository. -// Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. -// Must be `push` for personal repositories. Defaults to `push`. -func (o RepositoryCollaboratorsTeamOutput) Permission() pulumi.StringPtrOutput { - return o.ApplyT(func(v RepositoryCollaboratorsTeam) *string { return v.Permission }).(pulumi.StringPtrOutput) +// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. +func (o OrganizationRulesetConditionsRepositoryNameOutput) Excludes() pulumi.StringArrayOutput { + return o.ApplyT(func(v OrganizationRulesetConditionsRepositoryName) []string { return v.Excludes }).(pulumi.StringArrayOutput) } -// The GitHub team id or the GitHub team slug -func (o RepositoryCollaboratorsTeamOutput) TeamId() pulumi.StringOutput { - return o.ApplyT(func(v RepositoryCollaboratorsTeam) string { return v.TeamId }).(pulumi.StringOutput) +// (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. +func (o OrganizationRulesetConditionsRepositoryNameOutput) Inlcudes() pulumi.StringArrayOutput { + return o.ApplyT(func(v OrganizationRulesetConditionsRepositoryName) []string { return v.Inlcudes }).(pulumi.StringArrayOutput) } -type RepositoryCollaboratorsTeamArrayOutput struct{ *pulumi.OutputState } +func (o OrganizationRulesetConditionsRepositoryNameOutput) Protected() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetConditionsRepositoryName) *bool { return v.Protected }).(pulumi.BoolPtrOutput) +} -func (RepositoryCollaboratorsTeamArrayOutput) ElementType() reflect.Type { - return reflect.TypeOf((*[]RepositoryCollaboratorsTeam)(nil)).Elem() +type OrganizationRulesetConditionsRepositoryNamePtrOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetConditionsRepositoryNamePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetConditionsRepositoryName)(nil)).Elem() } -func (o RepositoryCollaboratorsTeamArrayOutput) ToRepositoryCollaboratorsTeamArrayOutput() RepositoryCollaboratorsTeamArrayOutput { +func (o OrganizationRulesetConditionsRepositoryNamePtrOutput) ToOrganizationRulesetConditionsRepositoryNamePtrOutput() OrganizationRulesetConditionsRepositoryNamePtrOutput { return o } -func (o RepositoryCollaboratorsTeamArrayOutput) ToRepositoryCollaboratorsTeamArrayOutputWithContext(ctx context.Context) RepositoryCollaboratorsTeamArrayOutput { +func (o OrganizationRulesetConditionsRepositoryNamePtrOutput) ToOrganizationRulesetConditionsRepositoryNamePtrOutputWithContext(ctx context.Context) OrganizationRulesetConditionsRepositoryNamePtrOutput { return o } -func (o RepositoryCollaboratorsTeamArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryCollaboratorsTeam] { - return pulumix.Output[[]RepositoryCollaboratorsTeam]{ +func (o OrganizationRulesetConditionsRepositoryNamePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetConditionsRepositoryName] { + return pulumix.Output[*OrganizationRulesetConditionsRepositoryName]{ OutputState: o.OutputState, } } -func (o RepositoryCollaboratorsTeamArrayOutput) Index(i pulumi.IntInput) RepositoryCollaboratorsTeamOutput { - return pulumi.All(o, i).ApplyT(func(vs []interface{}) RepositoryCollaboratorsTeam { - return vs[0].([]RepositoryCollaboratorsTeam)[vs[1].(int)] - }).(RepositoryCollaboratorsTeamOutput) +func (o OrganizationRulesetConditionsRepositoryNamePtrOutput) Elem() OrganizationRulesetConditionsRepositoryNameOutput { + return o.ApplyT(func(v *OrganizationRulesetConditionsRepositoryName) OrganizationRulesetConditionsRepositoryName { + if v != nil { + return *v + } + var ret OrganizationRulesetConditionsRepositoryName + return ret + }).(OrganizationRulesetConditionsRepositoryNameOutput) } -type RepositoryCollaboratorsUser struct { - // The permission of the outside collaborators for the repository. - // Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. - // Must be `push` for personal repositories. Defaults to `push`. - Permission *string `pulumi:"permission"` - Username string `pulumi:"username"` +// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. +func (o OrganizationRulesetConditionsRepositoryNamePtrOutput) Excludes() pulumi.StringArrayOutput { + return o.ApplyT(func(v *OrganizationRulesetConditionsRepositoryName) []string { + if v == nil { + return nil + } + return v.Excludes + }).(pulumi.StringArrayOutput) } -// RepositoryCollaboratorsUserInput is an input type that accepts RepositoryCollaboratorsUserArgs and RepositoryCollaboratorsUserOutput values. -// You can construct a concrete instance of `RepositoryCollaboratorsUserInput` via: -// -// RepositoryCollaboratorsUserArgs{...} -type RepositoryCollaboratorsUserInput interface { +// (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. +func (o OrganizationRulesetConditionsRepositoryNamePtrOutput) Inlcudes() pulumi.StringArrayOutput { + return o.ApplyT(func(v *OrganizationRulesetConditionsRepositoryName) []string { + if v == nil { + return nil + } + return v.Inlcudes + }).(pulumi.StringArrayOutput) +} + +func (o OrganizationRulesetConditionsRepositoryNamePtrOutput) Protected() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetConditionsRepositoryName) *bool { + if v == nil { + return nil + } + return v.Protected + }).(pulumi.BoolPtrOutput) +} + +type OrganizationRulesetRules struct { + // (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + BranchNamePattern *OrganizationRulesetRulesBranchNamePattern `pulumi:"branchNamePattern"` + // (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitAuthorEmailPattern *OrganizationRulesetRulesCommitAuthorEmailPattern `pulumi:"commitAuthorEmailPattern"` + // (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitMessagePattern *OrganizationRulesetRulesCommitMessagePattern `pulumi:"commitMessagePattern"` + // (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitterEmailPattern *OrganizationRulesetRulesCommitterEmailPattern `pulumi:"committerEmailPattern"` + // (Boolean) Only allow users with bypass permission to create matching refs. + Creation *bool `pulumi:"creation"` + // (Boolean) Only allow users with bypass permissions to delete matching refs. + Deletion *bool `pulumi:"deletion"` + // (Boolean) Prevent users with push access from force pushing to branches. + NonFastForward *bool `pulumi:"nonFastForward"` + // (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + PullRequest *OrganizationRulesetRulesPullRequest `pulumi:"pullRequest"` + // (Boolean) Prevent merge commits from being pushed to matching branches. + RequiredLinearHistory *bool `pulumi:"requiredLinearHistory"` + // (Boolean) Commits pushed to matching branches must have verified signatures. + RequiredSignatures *bool `pulumi:"requiredSignatures"` + // (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + RequiredStatusChecks *OrganizationRulesetRulesRequiredStatusChecks `pulumi:"requiredStatusChecks"` + // (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + TagNamePattern *OrganizationRulesetRulesTagNamePattern `pulumi:"tagNamePattern"` + // (Boolean) Only allow users with bypass permission to update matching refs. + Update *bool `pulumi:"update"` +} + +// OrganizationRulesetRulesInput is an input type that accepts OrganizationRulesetRulesArgs and OrganizationRulesetRulesOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesInput` via: +// +// OrganizationRulesetRulesArgs{...} +type OrganizationRulesetRulesInput interface { pulumi.Input - ToRepositoryCollaboratorsUserOutput() RepositoryCollaboratorsUserOutput - ToRepositoryCollaboratorsUserOutputWithContext(context.Context) RepositoryCollaboratorsUserOutput + ToOrganizationRulesetRulesOutput() OrganizationRulesetRulesOutput + ToOrganizationRulesetRulesOutputWithContext(context.Context) OrganizationRulesetRulesOutput } -type RepositoryCollaboratorsUserArgs struct { - // The permission of the outside collaborators for the repository. - // Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. - // Must be `push` for personal repositories. Defaults to `push`. - Permission pulumi.StringPtrInput `pulumi:"permission"` - Username pulumi.StringInput `pulumi:"username"` +type OrganizationRulesetRulesArgs struct { + // (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + BranchNamePattern OrganizationRulesetRulesBranchNamePatternPtrInput `pulumi:"branchNamePattern"` + // (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitAuthorEmailPattern OrganizationRulesetRulesCommitAuthorEmailPatternPtrInput `pulumi:"commitAuthorEmailPattern"` + // (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitMessagePattern OrganizationRulesetRulesCommitMessagePatternPtrInput `pulumi:"commitMessagePattern"` + // (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitterEmailPattern OrganizationRulesetRulesCommitterEmailPatternPtrInput `pulumi:"committerEmailPattern"` + // (Boolean) Only allow users with bypass permission to create matching refs. + Creation pulumi.BoolPtrInput `pulumi:"creation"` + // (Boolean) Only allow users with bypass permissions to delete matching refs. + Deletion pulumi.BoolPtrInput `pulumi:"deletion"` + // (Boolean) Prevent users with push access from force pushing to branches. + NonFastForward pulumi.BoolPtrInput `pulumi:"nonFastForward"` + // (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + PullRequest OrganizationRulesetRulesPullRequestPtrInput `pulumi:"pullRequest"` + // (Boolean) Prevent merge commits from being pushed to matching branches. + RequiredLinearHistory pulumi.BoolPtrInput `pulumi:"requiredLinearHistory"` + // (Boolean) Commits pushed to matching branches must have verified signatures. + RequiredSignatures pulumi.BoolPtrInput `pulumi:"requiredSignatures"` + // (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + RequiredStatusChecks OrganizationRulesetRulesRequiredStatusChecksPtrInput `pulumi:"requiredStatusChecks"` + // (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + TagNamePattern OrganizationRulesetRulesTagNamePatternPtrInput `pulumi:"tagNamePattern"` + // (Boolean) Only allow users with bypass permission to update matching refs. + Update pulumi.BoolPtrInput `pulumi:"update"` } -func (RepositoryCollaboratorsUserArgs) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryCollaboratorsUser)(nil)).Elem() +func (OrganizationRulesetRulesArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRules)(nil)).Elem() } -func (i RepositoryCollaboratorsUserArgs) ToRepositoryCollaboratorsUserOutput() RepositoryCollaboratorsUserOutput { - return i.ToRepositoryCollaboratorsUserOutputWithContext(context.Background()) +func (i OrganizationRulesetRulesArgs) ToOrganizationRulesetRulesOutput() OrganizationRulesetRulesOutput { + return i.ToOrganizationRulesetRulesOutputWithContext(context.Background()) } -func (i RepositoryCollaboratorsUserArgs) ToRepositoryCollaboratorsUserOutputWithContext(ctx context.Context) RepositoryCollaboratorsUserOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryCollaboratorsUserOutput) +func (i OrganizationRulesetRulesArgs) ToOrganizationRulesetRulesOutputWithContext(ctx context.Context) OrganizationRulesetRulesOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesOutput) } -func (i RepositoryCollaboratorsUserArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryCollaboratorsUser] { - return pulumix.Output[RepositoryCollaboratorsUser]{ - OutputState: i.ToRepositoryCollaboratorsUserOutputWithContext(ctx).OutputState, +func (i OrganizationRulesetRulesArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRules] { + return pulumix.Output[OrganizationRulesetRules]{ + OutputState: i.ToOrganizationRulesetRulesOutputWithContext(ctx).OutputState, } } -// RepositoryCollaboratorsUserArrayInput is an input type that accepts RepositoryCollaboratorsUserArray and RepositoryCollaboratorsUserArrayOutput values. -// You can construct a concrete instance of `RepositoryCollaboratorsUserArrayInput` via: +func (i OrganizationRulesetRulesArgs) ToOrganizationRulesetRulesPtrOutput() OrganizationRulesetRulesPtrOutput { + return i.ToOrganizationRulesetRulesPtrOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesArgs) ToOrganizationRulesetRulesPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesOutput).ToOrganizationRulesetRulesPtrOutputWithContext(ctx) +} + +// OrganizationRulesetRulesPtrInput is an input type that accepts OrganizationRulesetRulesArgs, OrganizationRulesetRulesPtr and OrganizationRulesetRulesPtrOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesPtrInput` via: // -// RepositoryCollaboratorsUserArray{ RepositoryCollaboratorsUserArgs{...} } -type RepositoryCollaboratorsUserArrayInput interface { +// OrganizationRulesetRulesArgs{...} +// +// or: +// +// nil +type OrganizationRulesetRulesPtrInput interface { pulumi.Input - ToRepositoryCollaboratorsUserArrayOutput() RepositoryCollaboratorsUserArrayOutput - ToRepositoryCollaboratorsUserArrayOutputWithContext(context.Context) RepositoryCollaboratorsUserArrayOutput + ToOrganizationRulesetRulesPtrOutput() OrganizationRulesetRulesPtrOutput + ToOrganizationRulesetRulesPtrOutputWithContext(context.Context) OrganizationRulesetRulesPtrOutput } -type RepositoryCollaboratorsUserArray []RepositoryCollaboratorsUserInput +type organizationRulesetRulesPtrType OrganizationRulesetRulesArgs -func (RepositoryCollaboratorsUserArray) ElementType() reflect.Type { - return reflect.TypeOf((*[]RepositoryCollaboratorsUser)(nil)).Elem() +func OrganizationRulesetRulesPtr(v *OrganizationRulesetRulesArgs) OrganizationRulesetRulesPtrInput { + return (*organizationRulesetRulesPtrType)(v) } -func (i RepositoryCollaboratorsUserArray) ToRepositoryCollaboratorsUserArrayOutput() RepositoryCollaboratorsUserArrayOutput { - return i.ToRepositoryCollaboratorsUserArrayOutputWithContext(context.Background()) +func (*organizationRulesetRulesPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRules)(nil)).Elem() } -func (i RepositoryCollaboratorsUserArray) ToRepositoryCollaboratorsUserArrayOutputWithContext(ctx context.Context) RepositoryCollaboratorsUserArrayOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryCollaboratorsUserArrayOutput) +func (i *organizationRulesetRulesPtrType) ToOrganizationRulesetRulesPtrOutput() OrganizationRulesetRulesPtrOutput { + return i.ToOrganizationRulesetRulesPtrOutputWithContext(context.Background()) } -func (i RepositoryCollaboratorsUserArray) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryCollaboratorsUser] { - return pulumix.Output[[]RepositoryCollaboratorsUser]{ - OutputState: i.ToRepositoryCollaboratorsUserArrayOutputWithContext(ctx).OutputState, +func (i *organizationRulesetRulesPtrType) ToOrganizationRulesetRulesPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesPtrOutput) +} + +func (i *organizationRulesetRulesPtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRules] { + return pulumix.Output[*OrganizationRulesetRules]{ + OutputState: i.ToOrganizationRulesetRulesPtrOutputWithContext(ctx).OutputState, } } -type RepositoryCollaboratorsUserOutput struct{ *pulumi.OutputState } +type OrganizationRulesetRulesOutput struct{ *pulumi.OutputState } -func (RepositoryCollaboratorsUserOutput) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryCollaboratorsUser)(nil)).Elem() +func (OrganizationRulesetRulesOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRules)(nil)).Elem() } -func (o RepositoryCollaboratorsUserOutput) ToRepositoryCollaboratorsUserOutput() RepositoryCollaboratorsUserOutput { +func (o OrganizationRulesetRulesOutput) ToOrganizationRulesetRulesOutput() OrganizationRulesetRulesOutput { return o } -func (o RepositoryCollaboratorsUserOutput) ToRepositoryCollaboratorsUserOutputWithContext(ctx context.Context) RepositoryCollaboratorsUserOutput { +func (o OrganizationRulesetRulesOutput) ToOrganizationRulesetRulesOutputWithContext(ctx context.Context) OrganizationRulesetRulesOutput { return o } -func (o RepositoryCollaboratorsUserOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryCollaboratorsUser] { - return pulumix.Output[RepositoryCollaboratorsUser]{ +func (o OrganizationRulesetRulesOutput) ToOrganizationRulesetRulesPtrOutput() OrganizationRulesetRulesPtrOutput { + return o.ToOrganizationRulesetRulesPtrOutputWithContext(context.Background()) +} + +func (o OrganizationRulesetRulesOutput) ToOrganizationRulesetRulesPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationRulesetRules) *OrganizationRulesetRules { + return &v + }).(OrganizationRulesetRulesPtrOutput) +} + +func (o OrganizationRulesetRulesOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRules] { + return pulumix.Output[OrganizationRulesetRules]{ OutputState: o.OutputState, } } -// The permission of the outside collaborators for the repository. -// Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. -// Must be `push` for personal repositories. Defaults to `push`. -func (o RepositoryCollaboratorsUserOutput) Permission() pulumi.StringPtrOutput { - return o.ApplyT(func(v RepositoryCollaboratorsUser) *string { return v.Permission }).(pulumi.StringPtrOutput) +// (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applies to rulesets with target `branch`. (see below for nested schema) +func (o OrganizationRulesetRulesOutput) BranchNamePattern() OrganizationRulesetRulesBranchNamePatternPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *OrganizationRulesetRulesBranchNamePattern { + return v.BranchNamePattern + }).(OrganizationRulesetRulesBranchNamePatternPtrOutput) } -func (o RepositoryCollaboratorsUserOutput) Username() pulumi.StringOutput { - return o.ApplyT(func(v RepositoryCollaboratorsUser) string { return v.Username }).(pulumi.StringOutput) +// (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o OrganizationRulesetRulesOutput) CommitAuthorEmailPattern() OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *OrganizationRulesetRulesCommitAuthorEmailPattern { + return v.CommitAuthorEmailPattern + }).(OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) } -type RepositoryCollaboratorsUserArrayOutput struct{ *pulumi.OutputState } +// (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o OrganizationRulesetRulesOutput) CommitMessagePattern() OrganizationRulesetRulesCommitMessagePatternPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *OrganizationRulesetRulesCommitMessagePattern { + return v.CommitMessagePattern + }).(OrganizationRulesetRulesCommitMessagePatternPtrOutput) +} -func (RepositoryCollaboratorsUserArrayOutput) ElementType() reflect.Type { - return reflect.TypeOf((*[]RepositoryCollaboratorsUser)(nil)).Elem() +// (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o OrganizationRulesetRulesOutput) CommitterEmailPattern() OrganizationRulesetRulesCommitterEmailPatternPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *OrganizationRulesetRulesCommitterEmailPattern { + return v.CommitterEmailPattern + }).(OrganizationRulesetRulesCommitterEmailPatternPtrOutput) } -func (o RepositoryCollaboratorsUserArrayOutput) ToRepositoryCollaboratorsUserArrayOutput() RepositoryCollaboratorsUserArrayOutput { - return o +// (Boolean) Only allow users with bypass permission to create matching refs. +func (o OrganizationRulesetRulesOutput) Creation() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *bool { return v.Creation }).(pulumi.BoolPtrOutput) } -func (o RepositoryCollaboratorsUserArrayOutput) ToRepositoryCollaboratorsUserArrayOutputWithContext(ctx context.Context) RepositoryCollaboratorsUserArrayOutput { - return o +// (Boolean) Only allow users with bypass permissions to delete matching refs. +func (o OrganizationRulesetRulesOutput) Deletion() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *bool { return v.Deletion }).(pulumi.BoolPtrOutput) } -func (o RepositoryCollaboratorsUserArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryCollaboratorsUser] { - return pulumix.Output[[]RepositoryCollaboratorsUser]{ - OutputState: o.OutputState, - } +// (Boolean) Prevent users with push access from force pushing to branches. +func (o OrganizationRulesetRulesOutput) NonFastForward() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *bool { return v.NonFastForward }).(pulumi.BoolPtrOutput) } -func (o RepositoryCollaboratorsUserArrayOutput) Index(i pulumi.IntInput) RepositoryCollaboratorsUserOutput { - return pulumi.All(o, i).ApplyT(func(vs []interface{}) RepositoryCollaboratorsUser { - return vs[0].([]RepositoryCollaboratorsUser)[vs[1].(int)] - }).(RepositoryCollaboratorsUserOutput) +// (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) +func (o OrganizationRulesetRulesOutput) PullRequest() OrganizationRulesetRulesPullRequestPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *OrganizationRulesetRulesPullRequest { return v.PullRequest }).(OrganizationRulesetRulesPullRequestPtrOutput) } -type RepositoryEnvironmentDeploymentBranchPolicy struct { - // Whether only branches that match the specified name patterns can deploy to this environment. - CustomBranchPolicies bool `pulumi:"customBranchPolicies"` - // Whether only branches with branch protection rules can deploy to this environment. - ProtectedBranches bool `pulumi:"protectedBranches"` +// (Boolean) Prevent merge commits from being pushed to matching branches. +func (o OrganizationRulesetRulesOutput) RequiredLinearHistory() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *bool { return v.RequiredLinearHistory }).(pulumi.BoolPtrOutput) } -// RepositoryEnvironmentDeploymentBranchPolicyInput is an input type that accepts RepositoryEnvironmentDeploymentBranchPolicyArgs and RepositoryEnvironmentDeploymentBranchPolicyOutput values. -// You can construct a concrete instance of `RepositoryEnvironmentDeploymentBranchPolicyInput` via: -// -// RepositoryEnvironmentDeploymentBranchPolicyArgs{...} -type RepositoryEnvironmentDeploymentBranchPolicyInput interface { - pulumi.Input +// (Boolean) Commits pushed to matching branches must have verified signatures. +func (o OrganizationRulesetRulesOutput) RequiredSignatures() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *bool { return v.RequiredSignatures }).(pulumi.BoolPtrOutput) +} - ToRepositoryEnvironmentDeploymentBranchPolicyOutput() RepositoryEnvironmentDeploymentBranchPolicyOutput - ToRepositoryEnvironmentDeploymentBranchPolicyOutputWithContext(context.Context) RepositoryEnvironmentDeploymentBranchPolicyOutput +// (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) +func (o OrganizationRulesetRulesOutput) RequiredStatusChecks() OrganizationRulesetRulesRequiredStatusChecksPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *OrganizationRulesetRulesRequiredStatusChecks { + return v.RequiredStatusChecks + }).(OrganizationRulesetRulesRequiredStatusChecksPtrOutput) } -type RepositoryEnvironmentDeploymentBranchPolicyArgs struct { - // Whether only branches that match the specified name patterns can deploy to this environment. - CustomBranchPolicies pulumi.BoolInput `pulumi:"customBranchPolicies"` - // Whether only branches with branch protection rules can deploy to this environment. - ProtectedBranches pulumi.BoolInput `pulumi:"protectedBranches"` +// (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applies to rulesets with target `tag`. (see below for nested schema) +func (o OrganizationRulesetRulesOutput) TagNamePattern() OrganizationRulesetRulesTagNamePatternPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *OrganizationRulesetRulesTagNamePattern { return v.TagNamePattern }).(OrganizationRulesetRulesTagNamePatternPtrOutput) } -func (RepositoryEnvironmentDeploymentBranchPolicyArgs) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryEnvironmentDeploymentBranchPolicy)(nil)).Elem() +// (Boolean) Only allow users with bypass permission to update matching refs. +func (o OrganizationRulesetRulesOutput) Update() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRules) *bool { return v.Update }).(pulumi.BoolPtrOutput) } -func (i RepositoryEnvironmentDeploymentBranchPolicyArgs) ToRepositoryEnvironmentDeploymentBranchPolicyOutput() RepositoryEnvironmentDeploymentBranchPolicyOutput { - return i.ToRepositoryEnvironmentDeploymentBranchPolicyOutputWithContext(context.Background()) +type OrganizationRulesetRulesPtrOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRules)(nil)).Elem() } -func (i RepositoryEnvironmentDeploymentBranchPolicyArgs) ToRepositoryEnvironmentDeploymentBranchPolicyOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryEnvironmentDeploymentBranchPolicyOutput) +func (o OrganizationRulesetRulesPtrOutput) ToOrganizationRulesetRulesPtrOutput() OrganizationRulesetRulesPtrOutput { + return o } -func (i RepositoryEnvironmentDeploymentBranchPolicyArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryEnvironmentDeploymentBranchPolicy] { - return pulumix.Output[RepositoryEnvironmentDeploymentBranchPolicy]{ - OutputState: i.ToRepositoryEnvironmentDeploymentBranchPolicyOutputWithContext(ctx).OutputState, +func (o OrganizationRulesetRulesPtrOutput) ToOrganizationRulesetRulesPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesPtrOutput { + return o +} + +func (o OrganizationRulesetRulesPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRules] { + return pulumix.Output[*OrganizationRulesetRules]{ + OutputState: o.OutputState, } } -func (i RepositoryEnvironmentDeploymentBranchPolicyArgs) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutput() RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { - return i.ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(context.Background()) +func (o OrganizationRulesetRulesPtrOutput) Elem() OrganizationRulesetRulesOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) OrganizationRulesetRules { + if v != nil { + return *v + } + var ret OrganizationRulesetRules + return ret + }).(OrganizationRulesetRulesOutput) +} + +// (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applies to rulesets with target `branch`. (see below for nested schema) +func (o OrganizationRulesetRulesPtrOutput) BranchNamePattern() OrganizationRulesetRulesBranchNamePatternPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *OrganizationRulesetRulesBranchNamePattern { + if v == nil { + return nil + } + return v.BranchNamePattern + }).(OrganizationRulesetRulesBranchNamePatternPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o OrganizationRulesetRulesPtrOutput) CommitAuthorEmailPattern() OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *OrganizationRulesetRulesCommitAuthorEmailPattern { + if v == nil { + return nil + } + return v.CommitAuthorEmailPattern + }).(OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o OrganizationRulesetRulesPtrOutput) CommitMessagePattern() OrganizationRulesetRulesCommitMessagePatternPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *OrganizationRulesetRulesCommitMessagePattern { + if v == nil { + return nil + } + return v.CommitMessagePattern + }).(OrganizationRulesetRulesCommitMessagePatternPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o OrganizationRulesetRulesPtrOutput) CommitterEmailPattern() OrganizationRulesetRulesCommitterEmailPatternPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *OrganizationRulesetRulesCommitterEmailPattern { + if v == nil { + return nil + } + return v.CommitterEmailPattern + }).(OrganizationRulesetRulesCommitterEmailPatternPtrOutput) +} + +// (Boolean) Only allow users with bypass permission to create matching refs. +func (o OrganizationRulesetRulesPtrOutput) Creation() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *bool { + if v == nil { + return nil + } + return v.Creation + }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Only allow users with bypass permissions to delete matching refs. +func (o OrganizationRulesetRulesPtrOutput) Deletion() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *bool { + if v == nil { + return nil + } + return v.Deletion + }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Prevent users with push access from force pushing to branches. +func (o OrganizationRulesetRulesPtrOutput) NonFastForward() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *bool { + if v == nil { + return nil + } + return v.NonFastForward + }).(pulumi.BoolPtrOutput) +} + +// (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) +func (o OrganizationRulesetRulesPtrOutput) PullRequest() OrganizationRulesetRulesPullRequestPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *OrganizationRulesetRulesPullRequest { + if v == nil { + return nil + } + return v.PullRequest + }).(OrganizationRulesetRulesPullRequestPtrOutput) +} + +// (Boolean) Prevent merge commits from being pushed to matching branches. +func (o OrganizationRulesetRulesPtrOutput) RequiredLinearHistory() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *bool { + if v == nil { + return nil + } + return v.RequiredLinearHistory + }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Commits pushed to matching branches must have verified signatures. +func (o OrganizationRulesetRulesPtrOutput) RequiredSignatures() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *bool { + if v == nil { + return nil + } + return v.RequiredSignatures + }).(pulumi.BoolPtrOutput) +} + +// (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) +func (o OrganizationRulesetRulesPtrOutput) RequiredStatusChecks() OrganizationRulesetRulesRequiredStatusChecksPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *OrganizationRulesetRulesRequiredStatusChecks { + if v == nil { + return nil + } + return v.RequiredStatusChecks + }).(OrganizationRulesetRulesRequiredStatusChecksPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applies to rulesets with target `tag`. (see below for nested schema) +func (o OrganizationRulesetRulesPtrOutput) TagNamePattern() OrganizationRulesetRulesTagNamePatternPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *OrganizationRulesetRulesTagNamePattern { + if v == nil { + return nil + } + return v.TagNamePattern + }).(OrganizationRulesetRulesTagNamePatternPtrOutput) +} + +// (Boolean) Only allow users with bypass permission to update matching refs. +func (o OrganizationRulesetRulesPtrOutput) Update() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRules) *bool { + if v == nil { + return nil + } + return v.Update + }).(pulumi.BoolPtrOutput) +} + +type OrganizationRulesetRulesBranchNamePattern struct { + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate *bool `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator string `pulumi:"operator"` + // (String) The pattern to match with. + Pattern string `pulumi:"pattern"` +} + +// OrganizationRulesetRulesBranchNamePatternInput is an input type that accepts OrganizationRulesetRulesBranchNamePatternArgs and OrganizationRulesetRulesBranchNamePatternOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesBranchNamePatternInput` via: +// +// OrganizationRulesetRulesBranchNamePatternArgs{...} +type OrganizationRulesetRulesBranchNamePatternInput interface { + pulumi.Input + + ToOrganizationRulesetRulesBranchNamePatternOutput() OrganizationRulesetRulesBranchNamePatternOutput + ToOrganizationRulesetRulesBranchNamePatternOutputWithContext(context.Context) OrganizationRulesetRulesBranchNamePatternOutput +} + +type OrganizationRulesetRulesBranchNamePatternArgs struct { + // (String) The name of the ruleset. + Name pulumi.StringPtrInput `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate pulumi.BoolPtrInput `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator pulumi.StringInput `pulumi:"operator"` + // (String) The pattern to match with. + Pattern pulumi.StringInput `pulumi:"pattern"` +} + +func (OrganizationRulesetRulesBranchNamePatternArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesBranchNamePattern)(nil)).Elem() +} + +func (i OrganizationRulesetRulesBranchNamePatternArgs) ToOrganizationRulesetRulesBranchNamePatternOutput() OrganizationRulesetRulesBranchNamePatternOutput { + return i.ToOrganizationRulesetRulesBranchNamePatternOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesBranchNamePatternArgs) ToOrganizationRulesetRulesBranchNamePatternOutputWithContext(ctx context.Context) OrganizationRulesetRulesBranchNamePatternOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesBranchNamePatternOutput) +} + +func (i OrganizationRulesetRulesBranchNamePatternArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesBranchNamePattern] { + return pulumix.Output[OrganizationRulesetRulesBranchNamePattern]{ + OutputState: i.ToOrganizationRulesetRulesBranchNamePatternOutputWithContext(ctx).OutputState, + } +} + +func (i OrganizationRulesetRulesBranchNamePatternArgs) ToOrganizationRulesetRulesBranchNamePatternPtrOutput() OrganizationRulesetRulesBranchNamePatternPtrOutput { + return i.ToOrganizationRulesetRulesBranchNamePatternPtrOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesBranchNamePatternArgs) ToOrganizationRulesetRulesBranchNamePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesBranchNamePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesBranchNamePatternOutput).ToOrganizationRulesetRulesBranchNamePatternPtrOutputWithContext(ctx) +} + +// OrganizationRulesetRulesBranchNamePatternPtrInput is an input type that accepts OrganizationRulesetRulesBranchNamePatternArgs, OrganizationRulesetRulesBranchNamePatternPtr and OrganizationRulesetRulesBranchNamePatternPtrOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesBranchNamePatternPtrInput` via: +// +// OrganizationRulesetRulesBranchNamePatternArgs{...} +// +// or: +// +// nil +type OrganizationRulesetRulesBranchNamePatternPtrInput interface { + pulumi.Input + + ToOrganizationRulesetRulesBranchNamePatternPtrOutput() OrganizationRulesetRulesBranchNamePatternPtrOutput + ToOrganizationRulesetRulesBranchNamePatternPtrOutputWithContext(context.Context) OrganizationRulesetRulesBranchNamePatternPtrOutput +} + +type organizationRulesetRulesBranchNamePatternPtrType OrganizationRulesetRulesBranchNamePatternArgs + +func OrganizationRulesetRulesBranchNamePatternPtr(v *OrganizationRulesetRulesBranchNamePatternArgs) OrganizationRulesetRulesBranchNamePatternPtrInput { + return (*organizationRulesetRulesBranchNamePatternPtrType)(v) +} + +func (*organizationRulesetRulesBranchNamePatternPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesBranchNamePattern)(nil)).Elem() +} + +func (i *organizationRulesetRulesBranchNamePatternPtrType) ToOrganizationRulesetRulesBranchNamePatternPtrOutput() OrganizationRulesetRulesBranchNamePatternPtrOutput { + return i.ToOrganizationRulesetRulesBranchNamePatternPtrOutputWithContext(context.Background()) +} + +func (i *organizationRulesetRulesBranchNamePatternPtrType) ToOrganizationRulesetRulesBranchNamePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesBranchNamePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesBranchNamePatternPtrOutput) +} + +func (i *organizationRulesetRulesBranchNamePatternPtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesBranchNamePattern] { + return pulumix.Output[*OrganizationRulesetRulesBranchNamePattern]{ + OutputState: i.ToOrganizationRulesetRulesBranchNamePatternPtrOutputWithContext(ctx).OutputState, + } +} + +type OrganizationRulesetRulesBranchNamePatternOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesBranchNamePatternOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesBranchNamePattern)(nil)).Elem() +} + +func (o OrganizationRulesetRulesBranchNamePatternOutput) ToOrganizationRulesetRulesBranchNamePatternOutput() OrganizationRulesetRulesBranchNamePatternOutput { + return o +} + +func (o OrganizationRulesetRulesBranchNamePatternOutput) ToOrganizationRulesetRulesBranchNamePatternOutputWithContext(ctx context.Context) OrganizationRulesetRulesBranchNamePatternOutput { + return o +} + +func (o OrganizationRulesetRulesBranchNamePatternOutput) ToOrganizationRulesetRulesBranchNamePatternPtrOutput() OrganizationRulesetRulesBranchNamePatternPtrOutput { + return o.ToOrganizationRulesetRulesBranchNamePatternPtrOutputWithContext(context.Background()) +} + +func (o OrganizationRulesetRulesBranchNamePatternOutput) ToOrganizationRulesetRulesBranchNamePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesBranchNamePatternPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationRulesetRulesBranchNamePattern) *OrganizationRulesetRulesBranchNamePattern { + return &v + }).(OrganizationRulesetRulesBranchNamePatternPtrOutput) +} + +func (o OrganizationRulesetRulesBranchNamePatternOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesBranchNamePattern] { + return pulumix.Output[OrganizationRulesetRulesBranchNamePattern]{ + OutputState: o.OutputState, + } +} + +// (String) The name of the ruleset. +func (o OrganizationRulesetRulesBranchNamePatternOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesBranchNamePattern) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o OrganizationRulesetRulesBranchNamePatternOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesBranchNamePattern) *bool { return v.Negate }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o OrganizationRulesetRulesBranchNamePatternOutput) Operator() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetRulesBranchNamePattern) string { return v.Operator }).(pulumi.StringOutput) +} + +// (String) The pattern to match with. +func (o OrganizationRulesetRulesBranchNamePatternOutput) Pattern() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetRulesBranchNamePattern) string { return v.Pattern }).(pulumi.StringOutput) +} + +type OrganizationRulesetRulesBranchNamePatternPtrOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesBranchNamePatternPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesBranchNamePattern)(nil)).Elem() +} + +func (o OrganizationRulesetRulesBranchNamePatternPtrOutput) ToOrganizationRulesetRulesBranchNamePatternPtrOutput() OrganizationRulesetRulesBranchNamePatternPtrOutput { + return o +} + +func (o OrganizationRulesetRulesBranchNamePatternPtrOutput) ToOrganizationRulesetRulesBranchNamePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesBranchNamePatternPtrOutput { + return o +} + +func (o OrganizationRulesetRulesBranchNamePatternPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesBranchNamePattern] { + return pulumix.Output[*OrganizationRulesetRulesBranchNamePattern]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationRulesetRulesBranchNamePatternPtrOutput) Elem() OrganizationRulesetRulesBranchNamePatternOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesBranchNamePattern) OrganizationRulesetRulesBranchNamePattern { + if v != nil { + return *v + } + var ret OrganizationRulesetRulesBranchNamePattern + return ret + }).(OrganizationRulesetRulesBranchNamePatternOutput) +} + +// (String) The name of the ruleset. +func (o OrganizationRulesetRulesBranchNamePatternPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesBranchNamePattern) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o OrganizationRulesetRulesBranchNamePatternPtrOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesBranchNamePattern) *bool { + if v == nil { + return nil + } + return v.Negate + }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o OrganizationRulesetRulesBranchNamePatternPtrOutput) Operator() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesBranchNamePattern) *string { + if v == nil { + return nil + } + return &v.Operator + }).(pulumi.StringPtrOutput) +} + +// (String) The pattern to match with. +func (o OrganizationRulesetRulesBranchNamePatternPtrOutput) Pattern() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesBranchNamePattern) *string { + if v == nil { + return nil + } + return &v.Pattern + }).(pulumi.StringPtrOutput) +} + +type OrganizationRulesetRulesCommitAuthorEmailPattern struct { + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate *bool `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator string `pulumi:"operator"` + // (String) The pattern to match with. + Pattern string `pulumi:"pattern"` +} + +// OrganizationRulesetRulesCommitAuthorEmailPatternInput is an input type that accepts OrganizationRulesetRulesCommitAuthorEmailPatternArgs and OrganizationRulesetRulesCommitAuthorEmailPatternOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesCommitAuthorEmailPatternInput` via: +// +// OrganizationRulesetRulesCommitAuthorEmailPatternArgs{...} +type OrganizationRulesetRulesCommitAuthorEmailPatternInput interface { + pulumi.Input + + ToOrganizationRulesetRulesCommitAuthorEmailPatternOutput() OrganizationRulesetRulesCommitAuthorEmailPatternOutput + ToOrganizationRulesetRulesCommitAuthorEmailPatternOutputWithContext(context.Context) OrganizationRulesetRulesCommitAuthorEmailPatternOutput +} + +type OrganizationRulesetRulesCommitAuthorEmailPatternArgs struct { + // (String) The name of the ruleset. + Name pulumi.StringPtrInput `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate pulumi.BoolPtrInput `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator pulumi.StringInput `pulumi:"operator"` + // (String) The pattern to match with. + Pattern pulumi.StringInput `pulumi:"pattern"` +} + +func (OrganizationRulesetRulesCommitAuthorEmailPatternArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesCommitAuthorEmailPattern)(nil)).Elem() +} + +func (i OrganizationRulesetRulesCommitAuthorEmailPatternArgs) ToOrganizationRulesetRulesCommitAuthorEmailPatternOutput() OrganizationRulesetRulesCommitAuthorEmailPatternOutput { + return i.ToOrganizationRulesetRulesCommitAuthorEmailPatternOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesCommitAuthorEmailPatternArgs) ToOrganizationRulesetRulesCommitAuthorEmailPatternOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitAuthorEmailPatternOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesCommitAuthorEmailPatternOutput) +} + +func (i OrganizationRulesetRulesCommitAuthorEmailPatternArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesCommitAuthorEmailPattern] { + return pulumix.Output[OrganizationRulesetRulesCommitAuthorEmailPattern]{ + OutputState: i.ToOrganizationRulesetRulesCommitAuthorEmailPatternOutputWithContext(ctx).OutputState, + } +} + +func (i OrganizationRulesetRulesCommitAuthorEmailPatternArgs) ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput() OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput { + return i.ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesCommitAuthorEmailPatternArgs) ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesCommitAuthorEmailPatternOutput).ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx) +} + +// OrganizationRulesetRulesCommitAuthorEmailPatternPtrInput is an input type that accepts OrganizationRulesetRulesCommitAuthorEmailPatternArgs, OrganizationRulesetRulesCommitAuthorEmailPatternPtr and OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesCommitAuthorEmailPatternPtrInput` via: +// +// OrganizationRulesetRulesCommitAuthorEmailPatternArgs{...} +// +// or: +// +// nil +type OrganizationRulesetRulesCommitAuthorEmailPatternPtrInput interface { + pulumi.Input + + ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput() OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput + ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(context.Context) OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput +} + +type organizationRulesetRulesCommitAuthorEmailPatternPtrType OrganizationRulesetRulesCommitAuthorEmailPatternArgs + +func OrganizationRulesetRulesCommitAuthorEmailPatternPtr(v *OrganizationRulesetRulesCommitAuthorEmailPatternArgs) OrganizationRulesetRulesCommitAuthorEmailPatternPtrInput { + return (*organizationRulesetRulesCommitAuthorEmailPatternPtrType)(v) +} + +func (*organizationRulesetRulesCommitAuthorEmailPatternPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesCommitAuthorEmailPattern)(nil)).Elem() +} + +func (i *organizationRulesetRulesCommitAuthorEmailPatternPtrType) ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput() OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput { + return i.ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(context.Background()) +} + +func (i *organizationRulesetRulesCommitAuthorEmailPatternPtrType) ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) +} + +func (i *organizationRulesetRulesCommitAuthorEmailPatternPtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesCommitAuthorEmailPattern] { + return pulumix.Output[*OrganizationRulesetRulesCommitAuthorEmailPattern]{ + OutputState: i.ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx).OutputState, + } +} + +type OrganizationRulesetRulesCommitAuthorEmailPatternOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesCommitAuthorEmailPatternOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesCommitAuthorEmailPattern)(nil)).Elem() +} + +func (o OrganizationRulesetRulesCommitAuthorEmailPatternOutput) ToOrganizationRulesetRulesCommitAuthorEmailPatternOutput() OrganizationRulesetRulesCommitAuthorEmailPatternOutput { + return o +} + +func (o OrganizationRulesetRulesCommitAuthorEmailPatternOutput) ToOrganizationRulesetRulesCommitAuthorEmailPatternOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitAuthorEmailPatternOutput { + return o +} + +func (o OrganizationRulesetRulesCommitAuthorEmailPatternOutput) ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput() OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o.ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(context.Background()) +} + +func (o OrganizationRulesetRulesCommitAuthorEmailPatternOutput) ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationRulesetRulesCommitAuthorEmailPattern) *OrganizationRulesetRulesCommitAuthorEmailPattern { + return &v + }).(OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) +} + +func (o OrganizationRulesetRulesCommitAuthorEmailPatternOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesCommitAuthorEmailPattern] { + return pulumix.Output[OrganizationRulesetRulesCommitAuthorEmailPattern]{ + OutputState: o.OutputState, + } +} + +// (String) The name of the ruleset. +func (o OrganizationRulesetRulesCommitAuthorEmailPatternOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitAuthorEmailPattern) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o OrganizationRulesetRulesCommitAuthorEmailPatternOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitAuthorEmailPattern) *bool { return v.Negate }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o OrganizationRulesetRulesCommitAuthorEmailPatternOutput) Operator() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitAuthorEmailPattern) string { return v.Operator }).(pulumi.StringOutput) +} + +// (String) The pattern to match with. +func (o OrganizationRulesetRulesCommitAuthorEmailPatternOutput) Pattern() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitAuthorEmailPattern) string { return v.Pattern }).(pulumi.StringOutput) +} + +type OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesCommitAuthorEmailPattern)(nil)).Elem() +} + +func (o OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput() OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o +} + +func (o OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) ToOrganizationRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o +} + +func (o OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesCommitAuthorEmailPattern] { + return pulumix.Output[*OrganizationRulesetRulesCommitAuthorEmailPattern]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) Elem() OrganizationRulesetRulesCommitAuthorEmailPatternOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitAuthorEmailPattern) OrganizationRulesetRulesCommitAuthorEmailPattern { + if v != nil { + return *v + } + var ret OrganizationRulesetRulesCommitAuthorEmailPattern + return ret + }).(OrganizationRulesetRulesCommitAuthorEmailPatternOutput) +} + +// (String) The name of the ruleset. +func (o OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitAuthorEmailPattern) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitAuthorEmailPattern) *bool { + if v == nil { + return nil + } + return v.Negate + }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) Operator() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitAuthorEmailPattern) *string { + if v == nil { + return nil + } + return &v.Operator + }).(pulumi.StringPtrOutput) +} + +// (String) The pattern to match with. +func (o OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput) Pattern() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitAuthorEmailPattern) *string { + if v == nil { + return nil + } + return &v.Pattern + }).(pulumi.StringPtrOutput) +} + +type OrganizationRulesetRulesCommitMessagePattern struct { + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate *bool `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator string `pulumi:"operator"` + // (String) The pattern to match with. + Pattern string `pulumi:"pattern"` +} + +// OrganizationRulesetRulesCommitMessagePatternInput is an input type that accepts OrganizationRulesetRulesCommitMessagePatternArgs and OrganizationRulesetRulesCommitMessagePatternOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesCommitMessagePatternInput` via: +// +// OrganizationRulesetRulesCommitMessagePatternArgs{...} +type OrganizationRulesetRulesCommitMessagePatternInput interface { + pulumi.Input + + ToOrganizationRulesetRulesCommitMessagePatternOutput() OrganizationRulesetRulesCommitMessagePatternOutput + ToOrganizationRulesetRulesCommitMessagePatternOutputWithContext(context.Context) OrganizationRulesetRulesCommitMessagePatternOutput +} + +type OrganizationRulesetRulesCommitMessagePatternArgs struct { + // (String) The name of the ruleset. + Name pulumi.StringPtrInput `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate pulumi.BoolPtrInput `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator pulumi.StringInput `pulumi:"operator"` + // (String) The pattern to match with. + Pattern pulumi.StringInput `pulumi:"pattern"` +} + +func (OrganizationRulesetRulesCommitMessagePatternArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesCommitMessagePattern)(nil)).Elem() +} + +func (i OrganizationRulesetRulesCommitMessagePatternArgs) ToOrganizationRulesetRulesCommitMessagePatternOutput() OrganizationRulesetRulesCommitMessagePatternOutput { + return i.ToOrganizationRulesetRulesCommitMessagePatternOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesCommitMessagePatternArgs) ToOrganizationRulesetRulesCommitMessagePatternOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitMessagePatternOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesCommitMessagePatternOutput) +} + +func (i OrganizationRulesetRulesCommitMessagePatternArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesCommitMessagePattern] { + return pulumix.Output[OrganizationRulesetRulesCommitMessagePattern]{ + OutputState: i.ToOrganizationRulesetRulesCommitMessagePatternOutputWithContext(ctx).OutputState, + } +} + +func (i OrganizationRulesetRulesCommitMessagePatternArgs) ToOrganizationRulesetRulesCommitMessagePatternPtrOutput() OrganizationRulesetRulesCommitMessagePatternPtrOutput { + return i.ToOrganizationRulesetRulesCommitMessagePatternPtrOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesCommitMessagePatternArgs) ToOrganizationRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitMessagePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesCommitMessagePatternOutput).ToOrganizationRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx) +} + +// OrganizationRulesetRulesCommitMessagePatternPtrInput is an input type that accepts OrganizationRulesetRulesCommitMessagePatternArgs, OrganizationRulesetRulesCommitMessagePatternPtr and OrganizationRulesetRulesCommitMessagePatternPtrOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesCommitMessagePatternPtrInput` via: +// +// OrganizationRulesetRulesCommitMessagePatternArgs{...} +// +// or: +// +// nil +type OrganizationRulesetRulesCommitMessagePatternPtrInput interface { + pulumi.Input + + ToOrganizationRulesetRulesCommitMessagePatternPtrOutput() OrganizationRulesetRulesCommitMessagePatternPtrOutput + ToOrganizationRulesetRulesCommitMessagePatternPtrOutputWithContext(context.Context) OrganizationRulesetRulesCommitMessagePatternPtrOutput +} + +type organizationRulesetRulesCommitMessagePatternPtrType OrganizationRulesetRulesCommitMessagePatternArgs + +func OrganizationRulesetRulesCommitMessagePatternPtr(v *OrganizationRulesetRulesCommitMessagePatternArgs) OrganizationRulesetRulesCommitMessagePatternPtrInput { + return (*organizationRulesetRulesCommitMessagePatternPtrType)(v) +} + +func (*organizationRulesetRulesCommitMessagePatternPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesCommitMessagePattern)(nil)).Elem() +} + +func (i *organizationRulesetRulesCommitMessagePatternPtrType) ToOrganizationRulesetRulesCommitMessagePatternPtrOutput() OrganizationRulesetRulesCommitMessagePatternPtrOutput { + return i.ToOrganizationRulesetRulesCommitMessagePatternPtrOutputWithContext(context.Background()) +} + +func (i *organizationRulesetRulesCommitMessagePatternPtrType) ToOrganizationRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitMessagePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesCommitMessagePatternPtrOutput) +} + +func (i *organizationRulesetRulesCommitMessagePatternPtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesCommitMessagePattern] { + return pulumix.Output[*OrganizationRulesetRulesCommitMessagePattern]{ + OutputState: i.ToOrganizationRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx).OutputState, + } +} + +type OrganizationRulesetRulesCommitMessagePatternOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesCommitMessagePatternOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesCommitMessagePattern)(nil)).Elem() +} + +func (o OrganizationRulesetRulesCommitMessagePatternOutput) ToOrganizationRulesetRulesCommitMessagePatternOutput() OrganizationRulesetRulesCommitMessagePatternOutput { + return o +} + +func (o OrganizationRulesetRulesCommitMessagePatternOutput) ToOrganizationRulesetRulesCommitMessagePatternOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitMessagePatternOutput { + return o +} + +func (o OrganizationRulesetRulesCommitMessagePatternOutput) ToOrganizationRulesetRulesCommitMessagePatternPtrOutput() OrganizationRulesetRulesCommitMessagePatternPtrOutput { + return o.ToOrganizationRulesetRulesCommitMessagePatternPtrOutputWithContext(context.Background()) +} + +func (o OrganizationRulesetRulesCommitMessagePatternOutput) ToOrganizationRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitMessagePatternPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationRulesetRulesCommitMessagePattern) *OrganizationRulesetRulesCommitMessagePattern { + return &v + }).(OrganizationRulesetRulesCommitMessagePatternPtrOutput) +} + +func (o OrganizationRulesetRulesCommitMessagePatternOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesCommitMessagePattern] { + return pulumix.Output[OrganizationRulesetRulesCommitMessagePattern]{ + OutputState: o.OutputState, + } +} + +// (String) The name of the ruleset. +func (o OrganizationRulesetRulesCommitMessagePatternOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitMessagePattern) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o OrganizationRulesetRulesCommitMessagePatternOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitMessagePattern) *bool { return v.Negate }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o OrganizationRulesetRulesCommitMessagePatternOutput) Operator() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitMessagePattern) string { return v.Operator }).(pulumi.StringOutput) +} + +// (String) The pattern to match with. +func (o OrganizationRulesetRulesCommitMessagePatternOutput) Pattern() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitMessagePattern) string { return v.Pattern }).(pulumi.StringOutput) +} + +type OrganizationRulesetRulesCommitMessagePatternPtrOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesCommitMessagePatternPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesCommitMessagePattern)(nil)).Elem() +} + +func (o OrganizationRulesetRulesCommitMessagePatternPtrOutput) ToOrganizationRulesetRulesCommitMessagePatternPtrOutput() OrganizationRulesetRulesCommitMessagePatternPtrOutput { + return o +} + +func (o OrganizationRulesetRulesCommitMessagePatternPtrOutput) ToOrganizationRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitMessagePatternPtrOutput { + return o +} + +func (o OrganizationRulesetRulesCommitMessagePatternPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesCommitMessagePattern] { + return pulumix.Output[*OrganizationRulesetRulesCommitMessagePattern]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationRulesetRulesCommitMessagePatternPtrOutput) Elem() OrganizationRulesetRulesCommitMessagePatternOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitMessagePattern) OrganizationRulesetRulesCommitMessagePattern { + if v != nil { + return *v + } + var ret OrganizationRulesetRulesCommitMessagePattern + return ret + }).(OrganizationRulesetRulesCommitMessagePatternOutput) +} + +// (String) The name of the ruleset. +func (o OrganizationRulesetRulesCommitMessagePatternPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitMessagePattern) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o OrganizationRulesetRulesCommitMessagePatternPtrOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitMessagePattern) *bool { + if v == nil { + return nil + } + return v.Negate + }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o OrganizationRulesetRulesCommitMessagePatternPtrOutput) Operator() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitMessagePattern) *string { + if v == nil { + return nil + } + return &v.Operator + }).(pulumi.StringPtrOutput) +} + +// (String) The pattern to match with. +func (o OrganizationRulesetRulesCommitMessagePatternPtrOutput) Pattern() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitMessagePattern) *string { + if v == nil { + return nil + } + return &v.Pattern + }).(pulumi.StringPtrOutput) +} + +type OrganizationRulesetRulesCommitterEmailPattern struct { + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate *bool `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator string `pulumi:"operator"` + // (String) The pattern to match with. + Pattern string `pulumi:"pattern"` +} + +// OrganizationRulesetRulesCommitterEmailPatternInput is an input type that accepts OrganizationRulesetRulesCommitterEmailPatternArgs and OrganizationRulesetRulesCommitterEmailPatternOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesCommitterEmailPatternInput` via: +// +// OrganizationRulesetRulesCommitterEmailPatternArgs{...} +type OrganizationRulesetRulesCommitterEmailPatternInput interface { + pulumi.Input + + ToOrganizationRulesetRulesCommitterEmailPatternOutput() OrganizationRulesetRulesCommitterEmailPatternOutput + ToOrganizationRulesetRulesCommitterEmailPatternOutputWithContext(context.Context) OrganizationRulesetRulesCommitterEmailPatternOutput +} + +type OrganizationRulesetRulesCommitterEmailPatternArgs struct { + // (String) The name of the ruleset. + Name pulumi.StringPtrInput `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate pulumi.BoolPtrInput `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator pulumi.StringInput `pulumi:"operator"` + // (String) The pattern to match with. + Pattern pulumi.StringInput `pulumi:"pattern"` +} + +func (OrganizationRulesetRulesCommitterEmailPatternArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesCommitterEmailPattern)(nil)).Elem() +} + +func (i OrganizationRulesetRulesCommitterEmailPatternArgs) ToOrganizationRulesetRulesCommitterEmailPatternOutput() OrganizationRulesetRulesCommitterEmailPatternOutput { + return i.ToOrganizationRulesetRulesCommitterEmailPatternOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesCommitterEmailPatternArgs) ToOrganizationRulesetRulesCommitterEmailPatternOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitterEmailPatternOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesCommitterEmailPatternOutput) +} + +func (i OrganizationRulesetRulesCommitterEmailPatternArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesCommitterEmailPattern] { + return pulumix.Output[OrganizationRulesetRulesCommitterEmailPattern]{ + OutputState: i.ToOrganizationRulesetRulesCommitterEmailPatternOutputWithContext(ctx).OutputState, + } +} + +func (i OrganizationRulesetRulesCommitterEmailPatternArgs) ToOrganizationRulesetRulesCommitterEmailPatternPtrOutput() OrganizationRulesetRulesCommitterEmailPatternPtrOutput { + return i.ToOrganizationRulesetRulesCommitterEmailPatternPtrOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesCommitterEmailPatternArgs) ToOrganizationRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitterEmailPatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesCommitterEmailPatternOutput).ToOrganizationRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx) +} + +// OrganizationRulesetRulesCommitterEmailPatternPtrInput is an input type that accepts OrganizationRulesetRulesCommitterEmailPatternArgs, OrganizationRulesetRulesCommitterEmailPatternPtr and OrganizationRulesetRulesCommitterEmailPatternPtrOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesCommitterEmailPatternPtrInput` via: +// +// OrganizationRulesetRulesCommitterEmailPatternArgs{...} +// +// or: +// +// nil +type OrganizationRulesetRulesCommitterEmailPatternPtrInput interface { + pulumi.Input + + ToOrganizationRulesetRulesCommitterEmailPatternPtrOutput() OrganizationRulesetRulesCommitterEmailPatternPtrOutput + ToOrganizationRulesetRulesCommitterEmailPatternPtrOutputWithContext(context.Context) OrganizationRulesetRulesCommitterEmailPatternPtrOutput +} + +type organizationRulesetRulesCommitterEmailPatternPtrType OrganizationRulesetRulesCommitterEmailPatternArgs + +func OrganizationRulesetRulesCommitterEmailPatternPtr(v *OrganizationRulesetRulesCommitterEmailPatternArgs) OrganizationRulesetRulesCommitterEmailPatternPtrInput { + return (*organizationRulesetRulesCommitterEmailPatternPtrType)(v) +} + +func (*organizationRulesetRulesCommitterEmailPatternPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesCommitterEmailPattern)(nil)).Elem() +} + +func (i *organizationRulesetRulesCommitterEmailPatternPtrType) ToOrganizationRulesetRulesCommitterEmailPatternPtrOutput() OrganizationRulesetRulesCommitterEmailPatternPtrOutput { + return i.ToOrganizationRulesetRulesCommitterEmailPatternPtrOutputWithContext(context.Background()) +} + +func (i *organizationRulesetRulesCommitterEmailPatternPtrType) ToOrganizationRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitterEmailPatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesCommitterEmailPatternPtrOutput) +} + +func (i *organizationRulesetRulesCommitterEmailPatternPtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesCommitterEmailPattern] { + return pulumix.Output[*OrganizationRulesetRulesCommitterEmailPattern]{ + OutputState: i.ToOrganizationRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx).OutputState, + } +} + +type OrganizationRulesetRulesCommitterEmailPatternOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesCommitterEmailPatternOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesCommitterEmailPattern)(nil)).Elem() +} + +func (o OrganizationRulesetRulesCommitterEmailPatternOutput) ToOrganizationRulesetRulesCommitterEmailPatternOutput() OrganizationRulesetRulesCommitterEmailPatternOutput { + return o +} + +func (o OrganizationRulesetRulesCommitterEmailPatternOutput) ToOrganizationRulesetRulesCommitterEmailPatternOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitterEmailPatternOutput { + return o +} + +func (o OrganizationRulesetRulesCommitterEmailPatternOutput) ToOrganizationRulesetRulesCommitterEmailPatternPtrOutput() OrganizationRulesetRulesCommitterEmailPatternPtrOutput { + return o.ToOrganizationRulesetRulesCommitterEmailPatternPtrOutputWithContext(context.Background()) +} + +func (o OrganizationRulesetRulesCommitterEmailPatternOutput) ToOrganizationRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitterEmailPatternPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationRulesetRulesCommitterEmailPattern) *OrganizationRulesetRulesCommitterEmailPattern { + return &v + }).(OrganizationRulesetRulesCommitterEmailPatternPtrOutput) +} + +func (o OrganizationRulesetRulesCommitterEmailPatternOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesCommitterEmailPattern] { + return pulumix.Output[OrganizationRulesetRulesCommitterEmailPattern]{ + OutputState: o.OutputState, + } +} + +// (String) The name of the ruleset. +func (o OrganizationRulesetRulesCommitterEmailPatternOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitterEmailPattern) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o OrganizationRulesetRulesCommitterEmailPatternOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitterEmailPattern) *bool { return v.Negate }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o OrganizationRulesetRulesCommitterEmailPatternOutput) Operator() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitterEmailPattern) string { return v.Operator }).(pulumi.StringOutput) +} + +// (String) The pattern to match with. +func (o OrganizationRulesetRulesCommitterEmailPatternOutput) Pattern() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetRulesCommitterEmailPattern) string { return v.Pattern }).(pulumi.StringOutput) +} + +type OrganizationRulesetRulesCommitterEmailPatternPtrOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesCommitterEmailPatternPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesCommitterEmailPattern)(nil)).Elem() +} + +func (o OrganizationRulesetRulesCommitterEmailPatternPtrOutput) ToOrganizationRulesetRulesCommitterEmailPatternPtrOutput() OrganizationRulesetRulesCommitterEmailPatternPtrOutput { + return o +} + +func (o OrganizationRulesetRulesCommitterEmailPatternPtrOutput) ToOrganizationRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesCommitterEmailPatternPtrOutput { + return o +} + +func (o OrganizationRulesetRulesCommitterEmailPatternPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesCommitterEmailPattern] { + return pulumix.Output[*OrganizationRulesetRulesCommitterEmailPattern]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationRulesetRulesCommitterEmailPatternPtrOutput) Elem() OrganizationRulesetRulesCommitterEmailPatternOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitterEmailPattern) OrganizationRulesetRulesCommitterEmailPattern { + if v != nil { + return *v + } + var ret OrganizationRulesetRulesCommitterEmailPattern + return ret + }).(OrganizationRulesetRulesCommitterEmailPatternOutput) +} + +// (String) The name of the ruleset. +func (o OrganizationRulesetRulesCommitterEmailPatternPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitterEmailPattern) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o OrganizationRulesetRulesCommitterEmailPatternPtrOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitterEmailPattern) *bool { + if v == nil { + return nil + } + return v.Negate + }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o OrganizationRulesetRulesCommitterEmailPatternPtrOutput) Operator() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitterEmailPattern) *string { + if v == nil { + return nil + } + return &v.Operator + }).(pulumi.StringPtrOutput) +} + +// (String) The pattern to match with. +func (o OrganizationRulesetRulesCommitterEmailPatternPtrOutput) Pattern() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesCommitterEmailPattern) *string { + if v == nil { + return nil + } + return &v.Pattern + }).(pulumi.StringPtrOutput) +} + +type OrganizationRulesetRulesPullRequest struct { + // (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + DismissStaleReviewsOnPush *bool `pulumi:"dismissStaleReviewsOnPush"` + // (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + RequireCodeOwnerReview *bool `pulumi:"requireCodeOwnerReview"` + // (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + RequireLastPushApproval *bool `pulumi:"requireLastPushApproval"` + // (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + RequiredApprovingReviewCount *int `pulumi:"requiredApprovingReviewCount"` + // (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + RequiredReviewThreadResolution *bool `pulumi:"requiredReviewThreadResolution"` +} + +// OrganizationRulesetRulesPullRequestInput is an input type that accepts OrganizationRulesetRulesPullRequestArgs and OrganizationRulesetRulesPullRequestOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesPullRequestInput` via: +// +// OrganizationRulesetRulesPullRequestArgs{...} +type OrganizationRulesetRulesPullRequestInput interface { + pulumi.Input + + ToOrganizationRulesetRulesPullRequestOutput() OrganizationRulesetRulesPullRequestOutput + ToOrganizationRulesetRulesPullRequestOutputWithContext(context.Context) OrganizationRulesetRulesPullRequestOutput +} + +type OrganizationRulesetRulesPullRequestArgs struct { + // (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + DismissStaleReviewsOnPush pulumi.BoolPtrInput `pulumi:"dismissStaleReviewsOnPush"` + // (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + RequireCodeOwnerReview pulumi.BoolPtrInput `pulumi:"requireCodeOwnerReview"` + // (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + RequireLastPushApproval pulumi.BoolPtrInput `pulumi:"requireLastPushApproval"` + // (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + RequiredApprovingReviewCount pulumi.IntPtrInput `pulumi:"requiredApprovingReviewCount"` + // (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + RequiredReviewThreadResolution pulumi.BoolPtrInput `pulumi:"requiredReviewThreadResolution"` +} + +func (OrganizationRulesetRulesPullRequestArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesPullRequest)(nil)).Elem() +} + +func (i OrganizationRulesetRulesPullRequestArgs) ToOrganizationRulesetRulesPullRequestOutput() OrganizationRulesetRulesPullRequestOutput { + return i.ToOrganizationRulesetRulesPullRequestOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesPullRequestArgs) ToOrganizationRulesetRulesPullRequestOutputWithContext(ctx context.Context) OrganizationRulesetRulesPullRequestOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesPullRequestOutput) +} + +func (i OrganizationRulesetRulesPullRequestArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesPullRequest] { + return pulumix.Output[OrganizationRulesetRulesPullRequest]{ + OutputState: i.ToOrganizationRulesetRulesPullRequestOutputWithContext(ctx).OutputState, + } +} + +func (i OrganizationRulesetRulesPullRequestArgs) ToOrganizationRulesetRulesPullRequestPtrOutput() OrganizationRulesetRulesPullRequestPtrOutput { + return i.ToOrganizationRulesetRulesPullRequestPtrOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesPullRequestArgs) ToOrganizationRulesetRulesPullRequestPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesPullRequestPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesPullRequestOutput).ToOrganizationRulesetRulesPullRequestPtrOutputWithContext(ctx) +} + +// OrganizationRulesetRulesPullRequestPtrInput is an input type that accepts OrganizationRulesetRulesPullRequestArgs, OrganizationRulesetRulesPullRequestPtr and OrganizationRulesetRulesPullRequestPtrOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesPullRequestPtrInput` via: +// +// OrganizationRulesetRulesPullRequestArgs{...} +// +// or: +// +// nil +type OrganizationRulesetRulesPullRequestPtrInput interface { + pulumi.Input + + ToOrganizationRulesetRulesPullRequestPtrOutput() OrganizationRulesetRulesPullRequestPtrOutput + ToOrganizationRulesetRulesPullRequestPtrOutputWithContext(context.Context) OrganizationRulesetRulesPullRequestPtrOutput +} + +type organizationRulesetRulesPullRequestPtrType OrganizationRulesetRulesPullRequestArgs + +func OrganizationRulesetRulesPullRequestPtr(v *OrganizationRulesetRulesPullRequestArgs) OrganizationRulesetRulesPullRequestPtrInput { + return (*organizationRulesetRulesPullRequestPtrType)(v) +} + +func (*organizationRulesetRulesPullRequestPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesPullRequest)(nil)).Elem() +} + +func (i *organizationRulesetRulesPullRequestPtrType) ToOrganizationRulesetRulesPullRequestPtrOutput() OrganizationRulesetRulesPullRequestPtrOutput { + return i.ToOrganizationRulesetRulesPullRequestPtrOutputWithContext(context.Background()) +} + +func (i *organizationRulesetRulesPullRequestPtrType) ToOrganizationRulesetRulesPullRequestPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesPullRequestPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesPullRequestPtrOutput) +} + +func (i *organizationRulesetRulesPullRequestPtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesPullRequest] { + return pulumix.Output[*OrganizationRulesetRulesPullRequest]{ + OutputState: i.ToOrganizationRulesetRulesPullRequestPtrOutputWithContext(ctx).OutputState, + } +} + +type OrganizationRulesetRulesPullRequestOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesPullRequestOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesPullRequest)(nil)).Elem() +} + +func (o OrganizationRulesetRulesPullRequestOutput) ToOrganizationRulesetRulesPullRequestOutput() OrganizationRulesetRulesPullRequestOutput { + return o +} + +func (o OrganizationRulesetRulesPullRequestOutput) ToOrganizationRulesetRulesPullRequestOutputWithContext(ctx context.Context) OrganizationRulesetRulesPullRequestOutput { + return o +} + +func (o OrganizationRulesetRulesPullRequestOutput) ToOrganizationRulesetRulesPullRequestPtrOutput() OrganizationRulesetRulesPullRequestPtrOutput { + return o.ToOrganizationRulesetRulesPullRequestPtrOutputWithContext(context.Background()) +} + +func (o OrganizationRulesetRulesPullRequestOutput) ToOrganizationRulesetRulesPullRequestPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesPullRequestPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationRulesetRulesPullRequest) *OrganizationRulesetRulesPullRequest { + return &v + }).(OrganizationRulesetRulesPullRequestPtrOutput) +} + +func (o OrganizationRulesetRulesPullRequestOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesPullRequest] { + return pulumix.Output[OrganizationRulesetRulesPullRequest]{ + OutputState: o.OutputState, + } +} + +// (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. +func (o OrganizationRulesetRulesPullRequestOutput) DismissStaleReviewsOnPush() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesPullRequest) *bool { return v.DismissStaleReviewsOnPush }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. +func (o OrganizationRulesetRulesPullRequestOutput) RequireCodeOwnerReview() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesPullRequest) *bool { return v.RequireCodeOwnerReview }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. +func (o OrganizationRulesetRulesPullRequestOutput) RequireLastPushApproval() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesPullRequest) *bool { return v.RequireLastPushApproval }).(pulumi.BoolPtrOutput) +} + +// (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. +func (o OrganizationRulesetRulesPullRequestOutput) RequiredApprovingReviewCount() pulumi.IntPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesPullRequest) *int { return v.RequiredApprovingReviewCount }).(pulumi.IntPtrOutput) +} + +// (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. +func (o OrganizationRulesetRulesPullRequestOutput) RequiredReviewThreadResolution() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesPullRequest) *bool { return v.RequiredReviewThreadResolution }).(pulumi.BoolPtrOutput) +} + +type OrganizationRulesetRulesPullRequestPtrOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesPullRequestPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesPullRequest)(nil)).Elem() +} + +func (o OrganizationRulesetRulesPullRequestPtrOutput) ToOrganizationRulesetRulesPullRequestPtrOutput() OrganizationRulesetRulesPullRequestPtrOutput { + return o +} + +func (o OrganizationRulesetRulesPullRequestPtrOutput) ToOrganizationRulesetRulesPullRequestPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesPullRequestPtrOutput { + return o +} + +func (o OrganizationRulesetRulesPullRequestPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesPullRequest] { + return pulumix.Output[*OrganizationRulesetRulesPullRequest]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationRulesetRulesPullRequestPtrOutput) Elem() OrganizationRulesetRulesPullRequestOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesPullRequest) OrganizationRulesetRulesPullRequest { + if v != nil { + return *v + } + var ret OrganizationRulesetRulesPullRequest + return ret + }).(OrganizationRulesetRulesPullRequestOutput) +} + +// (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. +func (o OrganizationRulesetRulesPullRequestPtrOutput) DismissStaleReviewsOnPush() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesPullRequest) *bool { + if v == nil { + return nil + } + return v.DismissStaleReviewsOnPush + }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. +func (o OrganizationRulesetRulesPullRequestPtrOutput) RequireCodeOwnerReview() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesPullRequest) *bool { + if v == nil { + return nil + } + return v.RequireCodeOwnerReview + }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. +func (o OrganizationRulesetRulesPullRequestPtrOutput) RequireLastPushApproval() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesPullRequest) *bool { + if v == nil { + return nil + } + return v.RequireLastPushApproval + }).(pulumi.BoolPtrOutput) +} + +// (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. +func (o OrganizationRulesetRulesPullRequestPtrOutput) RequiredApprovingReviewCount() pulumi.IntPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesPullRequest) *int { + if v == nil { + return nil + } + return v.RequiredApprovingReviewCount + }).(pulumi.IntPtrOutput) +} + +// (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. +func (o OrganizationRulesetRulesPullRequestPtrOutput) RequiredReviewThreadResolution() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesPullRequest) *bool { + if v == nil { + return nil + } + return v.RequiredReviewThreadResolution + }).(pulumi.BoolPtrOutput) +} + +type OrganizationRulesetRulesRequiredStatusChecks struct { + // (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + RequiredChecks []OrganizationRulesetRulesRequiredStatusChecksRequiredCheck `pulumi:"requiredChecks"` + // (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + StrictRequiredStatusChecksPolicy *bool `pulumi:"strictRequiredStatusChecksPolicy"` +} + +// OrganizationRulesetRulesRequiredStatusChecksInput is an input type that accepts OrganizationRulesetRulesRequiredStatusChecksArgs and OrganizationRulesetRulesRequiredStatusChecksOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesRequiredStatusChecksInput` via: +// +// OrganizationRulesetRulesRequiredStatusChecksArgs{...} +type OrganizationRulesetRulesRequiredStatusChecksInput interface { + pulumi.Input + + ToOrganizationRulesetRulesRequiredStatusChecksOutput() OrganizationRulesetRulesRequiredStatusChecksOutput + ToOrganizationRulesetRulesRequiredStatusChecksOutputWithContext(context.Context) OrganizationRulesetRulesRequiredStatusChecksOutput +} + +type OrganizationRulesetRulesRequiredStatusChecksArgs struct { + // (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + RequiredChecks OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayInput `pulumi:"requiredChecks"` + // (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + StrictRequiredStatusChecksPolicy pulumi.BoolPtrInput `pulumi:"strictRequiredStatusChecksPolicy"` +} + +func (OrganizationRulesetRulesRequiredStatusChecksArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesRequiredStatusChecks)(nil)).Elem() +} + +func (i OrganizationRulesetRulesRequiredStatusChecksArgs) ToOrganizationRulesetRulesRequiredStatusChecksOutput() OrganizationRulesetRulesRequiredStatusChecksOutput { + return i.ToOrganizationRulesetRulesRequiredStatusChecksOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesRequiredStatusChecksArgs) ToOrganizationRulesetRulesRequiredStatusChecksOutputWithContext(ctx context.Context) OrganizationRulesetRulesRequiredStatusChecksOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesRequiredStatusChecksOutput) +} + +func (i OrganizationRulesetRulesRequiredStatusChecksArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesRequiredStatusChecks] { + return pulumix.Output[OrganizationRulesetRulesRequiredStatusChecks]{ + OutputState: i.ToOrganizationRulesetRulesRequiredStatusChecksOutputWithContext(ctx).OutputState, + } +} + +func (i OrganizationRulesetRulesRequiredStatusChecksArgs) ToOrganizationRulesetRulesRequiredStatusChecksPtrOutput() OrganizationRulesetRulesRequiredStatusChecksPtrOutput { + return i.ToOrganizationRulesetRulesRequiredStatusChecksPtrOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesRequiredStatusChecksArgs) ToOrganizationRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesRequiredStatusChecksPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesRequiredStatusChecksOutput).ToOrganizationRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx) +} + +// OrganizationRulesetRulesRequiredStatusChecksPtrInput is an input type that accepts OrganizationRulesetRulesRequiredStatusChecksArgs, OrganizationRulesetRulesRequiredStatusChecksPtr and OrganizationRulesetRulesRequiredStatusChecksPtrOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesRequiredStatusChecksPtrInput` via: +// +// OrganizationRulesetRulesRequiredStatusChecksArgs{...} +// +// or: +// +// nil +type OrganizationRulesetRulesRequiredStatusChecksPtrInput interface { + pulumi.Input + + ToOrganizationRulesetRulesRequiredStatusChecksPtrOutput() OrganizationRulesetRulesRequiredStatusChecksPtrOutput + ToOrganizationRulesetRulesRequiredStatusChecksPtrOutputWithContext(context.Context) OrganizationRulesetRulesRequiredStatusChecksPtrOutput +} + +type organizationRulesetRulesRequiredStatusChecksPtrType OrganizationRulesetRulesRequiredStatusChecksArgs + +func OrganizationRulesetRulesRequiredStatusChecksPtr(v *OrganizationRulesetRulesRequiredStatusChecksArgs) OrganizationRulesetRulesRequiredStatusChecksPtrInput { + return (*organizationRulesetRulesRequiredStatusChecksPtrType)(v) +} + +func (*organizationRulesetRulesRequiredStatusChecksPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesRequiredStatusChecks)(nil)).Elem() +} + +func (i *organizationRulesetRulesRequiredStatusChecksPtrType) ToOrganizationRulesetRulesRequiredStatusChecksPtrOutput() OrganizationRulesetRulesRequiredStatusChecksPtrOutput { + return i.ToOrganizationRulesetRulesRequiredStatusChecksPtrOutputWithContext(context.Background()) +} + +func (i *organizationRulesetRulesRequiredStatusChecksPtrType) ToOrganizationRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesRequiredStatusChecksPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesRequiredStatusChecksPtrOutput) +} + +func (i *organizationRulesetRulesRequiredStatusChecksPtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesRequiredStatusChecks] { + return pulumix.Output[*OrganizationRulesetRulesRequiredStatusChecks]{ + OutputState: i.ToOrganizationRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx).OutputState, + } +} + +type OrganizationRulesetRulesRequiredStatusChecksOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesRequiredStatusChecksOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesRequiredStatusChecks)(nil)).Elem() +} + +func (o OrganizationRulesetRulesRequiredStatusChecksOutput) ToOrganizationRulesetRulesRequiredStatusChecksOutput() OrganizationRulesetRulesRequiredStatusChecksOutput { + return o +} + +func (o OrganizationRulesetRulesRequiredStatusChecksOutput) ToOrganizationRulesetRulesRequiredStatusChecksOutputWithContext(ctx context.Context) OrganizationRulesetRulesRequiredStatusChecksOutput { + return o +} + +func (o OrganizationRulesetRulesRequiredStatusChecksOutput) ToOrganizationRulesetRulesRequiredStatusChecksPtrOutput() OrganizationRulesetRulesRequiredStatusChecksPtrOutput { + return o.ToOrganizationRulesetRulesRequiredStatusChecksPtrOutputWithContext(context.Background()) +} + +func (o OrganizationRulesetRulesRequiredStatusChecksOutput) ToOrganizationRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesRequiredStatusChecksPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationRulesetRulesRequiredStatusChecks) *OrganizationRulesetRulesRequiredStatusChecks { + return &v + }).(OrganizationRulesetRulesRequiredStatusChecksPtrOutput) +} + +func (o OrganizationRulesetRulesRequiredStatusChecksOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesRequiredStatusChecks] { + return pulumix.Output[OrganizationRulesetRulesRequiredStatusChecks]{ + OutputState: o.OutputState, + } +} + +// (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) +func (o OrganizationRulesetRulesRequiredStatusChecksOutput) RequiredChecks() OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return o.ApplyT(func(v OrganizationRulesetRulesRequiredStatusChecks) []OrganizationRulesetRulesRequiredStatusChecksRequiredCheck { + return v.RequiredChecks + }).(OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) +} + +// (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. +func (o OrganizationRulesetRulesRequiredStatusChecksOutput) StrictRequiredStatusChecksPolicy() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesRequiredStatusChecks) *bool { return v.StrictRequiredStatusChecksPolicy }).(pulumi.BoolPtrOutput) +} + +type OrganizationRulesetRulesRequiredStatusChecksPtrOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesRequiredStatusChecksPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesRequiredStatusChecks)(nil)).Elem() +} + +func (o OrganizationRulesetRulesRequiredStatusChecksPtrOutput) ToOrganizationRulesetRulesRequiredStatusChecksPtrOutput() OrganizationRulesetRulesRequiredStatusChecksPtrOutput { + return o +} + +func (o OrganizationRulesetRulesRequiredStatusChecksPtrOutput) ToOrganizationRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesRequiredStatusChecksPtrOutput { + return o +} + +func (o OrganizationRulesetRulesRequiredStatusChecksPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesRequiredStatusChecks] { + return pulumix.Output[*OrganizationRulesetRulesRequiredStatusChecks]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationRulesetRulesRequiredStatusChecksPtrOutput) Elem() OrganizationRulesetRulesRequiredStatusChecksOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesRequiredStatusChecks) OrganizationRulesetRulesRequiredStatusChecks { + if v != nil { + return *v + } + var ret OrganizationRulesetRulesRequiredStatusChecks + return ret + }).(OrganizationRulesetRulesRequiredStatusChecksOutput) +} + +// (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) +func (o OrganizationRulesetRulesRequiredStatusChecksPtrOutput) RequiredChecks() OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesRequiredStatusChecks) []OrganizationRulesetRulesRequiredStatusChecksRequiredCheck { + if v == nil { + return nil + } + return v.RequiredChecks + }).(OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) +} + +// (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. +func (o OrganizationRulesetRulesRequiredStatusChecksPtrOutput) StrictRequiredStatusChecksPolicy() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesRequiredStatusChecks) *bool { + if v == nil { + return nil + } + return v.StrictRequiredStatusChecksPolicy + }).(pulumi.BoolPtrOutput) +} + +type OrganizationRulesetRulesRequiredStatusChecksRequiredCheck struct { + // (String) The status check context name that must be present on the commit. + Context string `pulumi:"context"` + // (Number) The optional integration ID that this status check must originate from. + IntegrationId *int `pulumi:"integrationId"` +} + +// OrganizationRulesetRulesRequiredStatusChecksRequiredCheckInput is an input type that accepts OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs and OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesRequiredStatusChecksRequiredCheckInput` via: +// +// OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs{...} +type OrganizationRulesetRulesRequiredStatusChecksRequiredCheckInput interface { + pulumi.Input + + ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput() OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput + ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutputWithContext(context.Context) OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput +} + +type OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs struct { + // (String) The status check context name that must be present on the commit. + Context pulumi.StringInput `pulumi:"context"` + // (Number) The optional integration ID that this status check must originate from. + IntegrationId pulumi.IntPtrInput `pulumi:"integrationId"` +} + +func (OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesRequiredStatusChecksRequiredCheck)(nil)).Elem() +} + +func (i OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs) ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput() OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput { + return i.ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs) ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutputWithContext(ctx context.Context) OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput) +} + +func (i OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesRequiredStatusChecksRequiredCheck] { + return pulumix.Output[OrganizationRulesetRulesRequiredStatusChecksRequiredCheck]{ + OutputState: i.ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutputWithContext(ctx).OutputState, + } +} + +// OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayInput is an input type that accepts OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArray and OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayInput` via: +// +// OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArray{ OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs{...} } +type OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayInput interface { + pulumi.Input + + ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput() OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput + ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutputWithContext(context.Context) OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput +} + +type OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArray []OrganizationRulesetRulesRequiredStatusChecksRequiredCheckInput + +func (OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]OrganizationRulesetRulesRequiredStatusChecksRequiredCheck)(nil)).Elem() +} + +func (i OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArray) ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput() OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return i.ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArray) ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutputWithContext(ctx context.Context) OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) +} + +func (i OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArray) ToOutput(ctx context.Context) pulumix.Output[[]OrganizationRulesetRulesRequiredStatusChecksRequiredCheck] { + return pulumix.Output[[]OrganizationRulesetRulesRequiredStatusChecksRequiredCheck]{ + OutputState: i.ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutputWithContext(ctx).OutputState, + } +} + +type OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesRequiredStatusChecksRequiredCheck)(nil)).Elem() +} + +func (o OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput) ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput() OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput { + return o +} + +func (o OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput) ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutputWithContext(ctx context.Context) OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput { + return o +} + +func (o OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesRequiredStatusChecksRequiredCheck] { + return pulumix.Output[OrganizationRulesetRulesRequiredStatusChecksRequiredCheck]{ + OutputState: o.OutputState, + } +} + +// (String) The status check context name that must be present on the commit. +func (o OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput) Context() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetRulesRequiredStatusChecksRequiredCheck) string { return v.Context }).(pulumi.StringOutput) +} + +// (Number) The optional integration ID that this status check must originate from. +func (o OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput) IntegrationId() pulumi.IntPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesRequiredStatusChecksRequiredCheck) *int { return v.IntegrationId }).(pulumi.IntPtrOutput) +} + +type OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]OrganizationRulesetRulesRequiredStatusChecksRequiredCheck)(nil)).Elem() +} + +func (o OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput() OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return o +} + +func (o OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) ToOrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutputWithContext(ctx context.Context) OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return o +} + +func (o OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]OrganizationRulesetRulesRequiredStatusChecksRequiredCheck] { + return pulumix.Output[[]OrganizationRulesetRulesRequiredStatusChecksRequiredCheck]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) Index(i pulumi.IntInput) OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) OrganizationRulesetRulesRequiredStatusChecksRequiredCheck { + return vs[0].([]OrganizationRulesetRulesRequiredStatusChecksRequiredCheck)[vs[1].(int)] + }).(OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput) +} + +type OrganizationRulesetRulesTagNamePattern struct { + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate *bool `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator string `pulumi:"operator"` + // (String) The pattern to match with. + Pattern string `pulumi:"pattern"` +} + +// OrganizationRulesetRulesTagNamePatternInput is an input type that accepts OrganizationRulesetRulesTagNamePatternArgs and OrganizationRulesetRulesTagNamePatternOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesTagNamePatternInput` via: +// +// OrganizationRulesetRulesTagNamePatternArgs{...} +type OrganizationRulesetRulesTagNamePatternInput interface { + pulumi.Input + + ToOrganizationRulesetRulesTagNamePatternOutput() OrganizationRulesetRulesTagNamePatternOutput + ToOrganizationRulesetRulesTagNamePatternOutputWithContext(context.Context) OrganizationRulesetRulesTagNamePatternOutput +} + +type OrganizationRulesetRulesTagNamePatternArgs struct { + // (String) The name of the ruleset. + Name pulumi.StringPtrInput `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate pulumi.BoolPtrInput `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator pulumi.StringInput `pulumi:"operator"` + // (String) The pattern to match with. + Pattern pulumi.StringInput `pulumi:"pattern"` +} + +func (OrganizationRulesetRulesTagNamePatternArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesTagNamePattern)(nil)).Elem() +} + +func (i OrganizationRulesetRulesTagNamePatternArgs) ToOrganizationRulesetRulesTagNamePatternOutput() OrganizationRulesetRulesTagNamePatternOutput { + return i.ToOrganizationRulesetRulesTagNamePatternOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesTagNamePatternArgs) ToOrganizationRulesetRulesTagNamePatternOutputWithContext(ctx context.Context) OrganizationRulesetRulesTagNamePatternOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesTagNamePatternOutput) +} + +func (i OrganizationRulesetRulesTagNamePatternArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesTagNamePattern] { + return pulumix.Output[OrganizationRulesetRulesTagNamePattern]{ + OutputState: i.ToOrganizationRulesetRulesTagNamePatternOutputWithContext(ctx).OutputState, + } +} + +func (i OrganizationRulesetRulesTagNamePatternArgs) ToOrganizationRulesetRulesTagNamePatternPtrOutput() OrganizationRulesetRulesTagNamePatternPtrOutput { + return i.ToOrganizationRulesetRulesTagNamePatternPtrOutputWithContext(context.Background()) +} + +func (i OrganizationRulesetRulesTagNamePatternArgs) ToOrganizationRulesetRulesTagNamePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesTagNamePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesTagNamePatternOutput).ToOrganizationRulesetRulesTagNamePatternPtrOutputWithContext(ctx) +} + +// OrganizationRulesetRulesTagNamePatternPtrInput is an input type that accepts OrganizationRulesetRulesTagNamePatternArgs, OrganizationRulesetRulesTagNamePatternPtr and OrganizationRulesetRulesTagNamePatternPtrOutput values. +// You can construct a concrete instance of `OrganizationRulesetRulesTagNamePatternPtrInput` via: +// +// OrganizationRulesetRulesTagNamePatternArgs{...} +// +// or: +// +// nil +type OrganizationRulesetRulesTagNamePatternPtrInput interface { + pulumi.Input + + ToOrganizationRulesetRulesTagNamePatternPtrOutput() OrganizationRulesetRulesTagNamePatternPtrOutput + ToOrganizationRulesetRulesTagNamePatternPtrOutputWithContext(context.Context) OrganizationRulesetRulesTagNamePatternPtrOutput +} + +type organizationRulesetRulesTagNamePatternPtrType OrganizationRulesetRulesTagNamePatternArgs + +func OrganizationRulesetRulesTagNamePatternPtr(v *OrganizationRulesetRulesTagNamePatternArgs) OrganizationRulesetRulesTagNamePatternPtrInput { + return (*organizationRulesetRulesTagNamePatternPtrType)(v) +} + +func (*organizationRulesetRulesTagNamePatternPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesTagNamePattern)(nil)).Elem() +} + +func (i *organizationRulesetRulesTagNamePatternPtrType) ToOrganizationRulesetRulesTagNamePatternPtrOutput() OrganizationRulesetRulesTagNamePatternPtrOutput { + return i.ToOrganizationRulesetRulesTagNamePatternPtrOutputWithContext(context.Background()) +} + +func (i *organizationRulesetRulesTagNamePatternPtrType) ToOrganizationRulesetRulesTagNamePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesTagNamePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationRulesetRulesTagNamePatternPtrOutput) +} + +func (i *organizationRulesetRulesTagNamePatternPtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesTagNamePattern] { + return pulumix.Output[*OrganizationRulesetRulesTagNamePattern]{ + OutputState: i.ToOrganizationRulesetRulesTagNamePatternPtrOutputWithContext(ctx).OutputState, + } +} + +type OrganizationRulesetRulesTagNamePatternOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesTagNamePatternOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationRulesetRulesTagNamePattern)(nil)).Elem() +} + +func (o OrganizationRulesetRulesTagNamePatternOutput) ToOrganizationRulesetRulesTagNamePatternOutput() OrganizationRulesetRulesTagNamePatternOutput { + return o +} + +func (o OrganizationRulesetRulesTagNamePatternOutput) ToOrganizationRulesetRulesTagNamePatternOutputWithContext(ctx context.Context) OrganizationRulesetRulesTagNamePatternOutput { + return o +} + +func (o OrganizationRulesetRulesTagNamePatternOutput) ToOrganizationRulesetRulesTagNamePatternPtrOutput() OrganizationRulesetRulesTagNamePatternPtrOutput { + return o.ToOrganizationRulesetRulesTagNamePatternPtrOutputWithContext(context.Background()) +} + +func (o OrganizationRulesetRulesTagNamePatternOutput) ToOrganizationRulesetRulesTagNamePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesTagNamePatternPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationRulesetRulesTagNamePattern) *OrganizationRulesetRulesTagNamePattern { + return &v + }).(OrganizationRulesetRulesTagNamePatternPtrOutput) +} + +func (o OrganizationRulesetRulesTagNamePatternOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationRulesetRulesTagNamePattern] { + return pulumix.Output[OrganizationRulesetRulesTagNamePattern]{ + OutputState: o.OutputState, + } +} + +// (String) The name of the ruleset. +func (o OrganizationRulesetRulesTagNamePatternOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesTagNamePattern) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o OrganizationRulesetRulesTagNamePatternOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationRulesetRulesTagNamePattern) *bool { return v.Negate }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o OrganizationRulesetRulesTagNamePatternOutput) Operator() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetRulesTagNamePattern) string { return v.Operator }).(pulumi.StringOutput) +} + +// (String) The pattern to match with. +func (o OrganizationRulesetRulesTagNamePatternOutput) Pattern() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationRulesetRulesTagNamePattern) string { return v.Pattern }).(pulumi.StringOutput) +} + +type OrganizationRulesetRulesTagNamePatternPtrOutput struct{ *pulumi.OutputState } + +func (OrganizationRulesetRulesTagNamePatternPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationRulesetRulesTagNamePattern)(nil)).Elem() +} + +func (o OrganizationRulesetRulesTagNamePatternPtrOutput) ToOrganizationRulesetRulesTagNamePatternPtrOutput() OrganizationRulesetRulesTagNamePatternPtrOutput { + return o +} + +func (o OrganizationRulesetRulesTagNamePatternPtrOutput) ToOrganizationRulesetRulesTagNamePatternPtrOutputWithContext(ctx context.Context) OrganizationRulesetRulesTagNamePatternPtrOutput { + return o +} + +func (o OrganizationRulesetRulesTagNamePatternPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationRulesetRulesTagNamePattern] { + return pulumix.Output[*OrganizationRulesetRulesTagNamePattern]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationRulesetRulesTagNamePatternPtrOutput) Elem() OrganizationRulesetRulesTagNamePatternOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesTagNamePattern) OrganizationRulesetRulesTagNamePattern { + if v != nil { + return *v + } + var ret OrganizationRulesetRulesTagNamePattern + return ret + }).(OrganizationRulesetRulesTagNamePatternOutput) +} + +// (String) The name of the ruleset. +func (o OrganizationRulesetRulesTagNamePatternPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesTagNamePattern) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o OrganizationRulesetRulesTagNamePatternPtrOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesTagNamePattern) *bool { + if v == nil { + return nil + } + return v.Negate + }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o OrganizationRulesetRulesTagNamePatternPtrOutput) Operator() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesTagNamePattern) *string { + if v == nil { + return nil + } + return &v.Operator + }).(pulumi.StringPtrOutput) +} + +// (String) The pattern to match with. +func (o OrganizationRulesetRulesTagNamePatternPtrOutput) Pattern() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationRulesetRulesTagNamePattern) *string { + if v == nil { + return nil + } + return &v.Pattern + }).(pulumi.StringPtrOutput) +} + +type OrganizationWebhookConfiguration struct { + ContentType *string `pulumi:"contentType"` + InsecureSsl *bool `pulumi:"insecureSsl"` + Secret *string `pulumi:"secret"` + // URL of the webhook + Url string `pulumi:"url"` +} + +// OrganizationWebhookConfigurationInput is an input type that accepts OrganizationWebhookConfigurationArgs and OrganizationWebhookConfigurationOutput values. +// You can construct a concrete instance of `OrganizationWebhookConfigurationInput` via: +// +// OrganizationWebhookConfigurationArgs{...} +type OrganizationWebhookConfigurationInput interface { + pulumi.Input + + ToOrganizationWebhookConfigurationOutput() OrganizationWebhookConfigurationOutput + ToOrganizationWebhookConfigurationOutputWithContext(context.Context) OrganizationWebhookConfigurationOutput +} + +type OrganizationWebhookConfigurationArgs struct { + ContentType pulumi.StringPtrInput `pulumi:"contentType"` + InsecureSsl pulumi.BoolPtrInput `pulumi:"insecureSsl"` + Secret pulumi.StringPtrInput `pulumi:"secret"` + // URL of the webhook + Url pulumi.StringInput `pulumi:"url"` +} + +func (OrganizationWebhookConfigurationArgs) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationWebhookConfiguration)(nil)).Elem() +} + +func (i OrganizationWebhookConfigurationArgs) ToOrganizationWebhookConfigurationOutput() OrganizationWebhookConfigurationOutput { + return i.ToOrganizationWebhookConfigurationOutputWithContext(context.Background()) +} + +func (i OrganizationWebhookConfigurationArgs) ToOrganizationWebhookConfigurationOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationWebhookConfigurationOutput) +} + +func (i OrganizationWebhookConfigurationArgs) ToOutput(ctx context.Context) pulumix.Output[OrganizationWebhookConfiguration] { + return pulumix.Output[OrganizationWebhookConfiguration]{ + OutputState: i.ToOrganizationWebhookConfigurationOutputWithContext(ctx).OutputState, + } +} + +func (i OrganizationWebhookConfigurationArgs) ToOrganizationWebhookConfigurationPtrOutput() OrganizationWebhookConfigurationPtrOutput { + return i.ToOrganizationWebhookConfigurationPtrOutputWithContext(context.Background()) +} + +func (i OrganizationWebhookConfigurationArgs) ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationWebhookConfigurationOutput).ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx) +} + +// OrganizationWebhookConfigurationPtrInput is an input type that accepts OrganizationWebhookConfigurationArgs, OrganizationWebhookConfigurationPtr and OrganizationWebhookConfigurationPtrOutput values. +// You can construct a concrete instance of `OrganizationWebhookConfigurationPtrInput` via: +// +// OrganizationWebhookConfigurationArgs{...} +// +// or: +// +// nil +type OrganizationWebhookConfigurationPtrInput interface { + pulumi.Input + + ToOrganizationWebhookConfigurationPtrOutput() OrganizationWebhookConfigurationPtrOutput + ToOrganizationWebhookConfigurationPtrOutputWithContext(context.Context) OrganizationWebhookConfigurationPtrOutput +} + +type organizationWebhookConfigurationPtrType OrganizationWebhookConfigurationArgs + +func OrganizationWebhookConfigurationPtr(v *OrganizationWebhookConfigurationArgs) OrganizationWebhookConfigurationPtrInput { + return (*organizationWebhookConfigurationPtrType)(v) +} + +func (*organizationWebhookConfigurationPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationWebhookConfiguration)(nil)).Elem() +} + +func (i *organizationWebhookConfigurationPtrType) ToOrganizationWebhookConfigurationPtrOutput() OrganizationWebhookConfigurationPtrOutput { + return i.ToOrganizationWebhookConfigurationPtrOutputWithContext(context.Background()) +} + +func (i *organizationWebhookConfigurationPtrType) ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(OrganizationWebhookConfigurationPtrOutput) +} + +func (i *organizationWebhookConfigurationPtrType) ToOutput(ctx context.Context) pulumix.Output[*OrganizationWebhookConfiguration] { + return pulumix.Output[*OrganizationWebhookConfiguration]{ + OutputState: i.ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx).OutputState, + } +} + +type OrganizationWebhookConfigurationOutput struct{ *pulumi.OutputState } + +func (OrganizationWebhookConfigurationOutput) ElementType() reflect.Type { + return reflect.TypeOf((*OrganizationWebhookConfiguration)(nil)).Elem() +} + +func (o OrganizationWebhookConfigurationOutput) ToOrganizationWebhookConfigurationOutput() OrganizationWebhookConfigurationOutput { + return o +} + +func (o OrganizationWebhookConfigurationOutput) ToOrganizationWebhookConfigurationOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationOutput { + return o +} + +func (o OrganizationWebhookConfigurationOutput) ToOrganizationWebhookConfigurationPtrOutput() OrganizationWebhookConfigurationPtrOutput { + return o.ToOrganizationWebhookConfigurationPtrOutputWithContext(context.Background()) +} + +func (o OrganizationWebhookConfigurationOutput) ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v OrganizationWebhookConfiguration) *OrganizationWebhookConfiguration { + return &v + }).(OrganizationWebhookConfigurationPtrOutput) +} + +func (o OrganizationWebhookConfigurationOutput) ToOutput(ctx context.Context) pulumix.Output[OrganizationWebhookConfiguration] { + return pulumix.Output[OrganizationWebhookConfiguration]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationWebhookConfigurationOutput) ContentType() pulumi.StringPtrOutput { + return o.ApplyT(func(v OrganizationWebhookConfiguration) *string { return v.ContentType }).(pulumi.StringPtrOutput) +} + +func (o OrganizationWebhookConfigurationOutput) InsecureSsl() pulumi.BoolPtrOutput { + return o.ApplyT(func(v OrganizationWebhookConfiguration) *bool { return v.InsecureSsl }).(pulumi.BoolPtrOutput) +} + +func (o OrganizationWebhookConfigurationOutput) Secret() pulumi.StringPtrOutput { + return o.ApplyT(func(v OrganizationWebhookConfiguration) *string { return v.Secret }).(pulumi.StringPtrOutput) +} + +// URL of the webhook +func (o OrganizationWebhookConfigurationOutput) Url() pulumi.StringOutput { + return o.ApplyT(func(v OrganizationWebhookConfiguration) string { return v.Url }).(pulumi.StringOutput) +} + +type OrganizationWebhookConfigurationPtrOutput struct{ *pulumi.OutputState } + +func (OrganizationWebhookConfigurationPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**OrganizationWebhookConfiguration)(nil)).Elem() +} + +func (o OrganizationWebhookConfigurationPtrOutput) ToOrganizationWebhookConfigurationPtrOutput() OrganizationWebhookConfigurationPtrOutput { + return o +} + +func (o OrganizationWebhookConfigurationPtrOutput) ToOrganizationWebhookConfigurationPtrOutputWithContext(ctx context.Context) OrganizationWebhookConfigurationPtrOutput { + return o +} + +func (o OrganizationWebhookConfigurationPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*OrganizationWebhookConfiguration] { + return pulumix.Output[*OrganizationWebhookConfiguration]{ + OutputState: o.OutputState, + } +} + +func (o OrganizationWebhookConfigurationPtrOutput) Elem() OrganizationWebhookConfigurationOutput { + return o.ApplyT(func(v *OrganizationWebhookConfiguration) OrganizationWebhookConfiguration { + if v != nil { + return *v + } + var ret OrganizationWebhookConfiguration + return ret + }).(OrganizationWebhookConfigurationOutput) +} + +func (o OrganizationWebhookConfigurationPtrOutput) ContentType() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationWebhookConfiguration) *string { + if v == nil { + return nil + } + return v.ContentType + }).(pulumi.StringPtrOutput) +} + +func (o OrganizationWebhookConfigurationPtrOutput) InsecureSsl() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *OrganizationWebhookConfiguration) *bool { + if v == nil { + return nil + } + return v.InsecureSsl + }).(pulumi.BoolPtrOutput) +} + +func (o OrganizationWebhookConfigurationPtrOutput) Secret() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationWebhookConfiguration) *string { + if v == nil { + return nil + } + return v.Secret + }).(pulumi.StringPtrOutput) +} + +// URL of the webhook +func (o OrganizationWebhookConfigurationPtrOutput) Url() pulumi.StringPtrOutput { + return o.ApplyT(func(v *OrganizationWebhookConfiguration) *string { + if v == nil { + return nil + } + return &v.Url + }).(pulumi.StringPtrOutput) +} + +type ProviderAppAuth struct { + Id string `pulumi:"id"` + InstallationId string `pulumi:"installationId"` + PemFile string `pulumi:"pemFile"` +} + +// ProviderAppAuthInput is an input type that accepts ProviderAppAuthArgs and ProviderAppAuthOutput values. +// You can construct a concrete instance of `ProviderAppAuthInput` via: +// +// ProviderAppAuthArgs{...} +type ProviderAppAuthInput interface { + pulumi.Input + + ToProviderAppAuthOutput() ProviderAppAuthOutput + ToProviderAppAuthOutputWithContext(context.Context) ProviderAppAuthOutput +} + +type ProviderAppAuthArgs struct { + Id pulumi.StringInput `pulumi:"id"` + InstallationId pulumi.StringInput `pulumi:"installationId"` + PemFile pulumi.StringInput `pulumi:"pemFile"` +} + +func (ProviderAppAuthArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ProviderAppAuth)(nil)).Elem() +} + +func (i ProviderAppAuthArgs) ToProviderAppAuthOutput() ProviderAppAuthOutput { + return i.ToProviderAppAuthOutputWithContext(context.Background()) +} + +func (i ProviderAppAuthArgs) ToProviderAppAuthOutputWithContext(ctx context.Context) ProviderAppAuthOutput { + return pulumi.ToOutputWithContext(ctx, i).(ProviderAppAuthOutput) +} + +func (i ProviderAppAuthArgs) ToOutput(ctx context.Context) pulumix.Output[ProviderAppAuth] { + return pulumix.Output[ProviderAppAuth]{ + OutputState: i.ToProviderAppAuthOutputWithContext(ctx).OutputState, + } +} + +func (i ProviderAppAuthArgs) ToProviderAppAuthPtrOutput() ProviderAppAuthPtrOutput { + return i.ToProviderAppAuthPtrOutputWithContext(context.Background()) +} + +func (i ProviderAppAuthArgs) ToProviderAppAuthPtrOutputWithContext(ctx context.Context) ProviderAppAuthPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ProviderAppAuthOutput).ToProviderAppAuthPtrOutputWithContext(ctx) +} + +// ProviderAppAuthPtrInput is an input type that accepts ProviderAppAuthArgs, ProviderAppAuthPtr and ProviderAppAuthPtrOutput values. +// You can construct a concrete instance of `ProviderAppAuthPtrInput` via: +// +// ProviderAppAuthArgs{...} +// +// or: +// +// nil +type ProviderAppAuthPtrInput interface { + pulumi.Input + + ToProviderAppAuthPtrOutput() ProviderAppAuthPtrOutput + ToProviderAppAuthPtrOutputWithContext(context.Context) ProviderAppAuthPtrOutput +} + +type providerAppAuthPtrType ProviderAppAuthArgs + +func ProviderAppAuthPtr(v *ProviderAppAuthArgs) ProviderAppAuthPtrInput { + return (*providerAppAuthPtrType)(v) +} + +func (*providerAppAuthPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**ProviderAppAuth)(nil)).Elem() +} + +func (i *providerAppAuthPtrType) ToProviderAppAuthPtrOutput() ProviderAppAuthPtrOutput { + return i.ToProviderAppAuthPtrOutputWithContext(context.Background()) +} + +func (i *providerAppAuthPtrType) ToProviderAppAuthPtrOutputWithContext(ctx context.Context) ProviderAppAuthPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ProviderAppAuthPtrOutput) +} + +func (i *providerAppAuthPtrType) ToOutput(ctx context.Context) pulumix.Output[*ProviderAppAuth] { + return pulumix.Output[*ProviderAppAuth]{ + OutputState: i.ToProviderAppAuthPtrOutputWithContext(ctx).OutputState, + } +} + +type ProviderAppAuthOutput struct{ *pulumi.OutputState } + +func (ProviderAppAuthOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ProviderAppAuth)(nil)).Elem() +} + +func (o ProviderAppAuthOutput) ToProviderAppAuthOutput() ProviderAppAuthOutput { + return o +} + +func (o ProviderAppAuthOutput) ToProviderAppAuthOutputWithContext(ctx context.Context) ProviderAppAuthOutput { + return o +} + +func (o ProviderAppAuthOutput) ToProviderAppAuthPtrOutput() ProviderAppAuthPtrOutput { + return o.ToProviderAppAuthPtrOutputWithContext(context.Background()) +} + +func (o ProviderAppAuthOutput) ToProviderAppAuthPtrOutputWithContext(ctx context.Context) ProviderAppAuthPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v ProviderAppAuth) *ProviderAppAuth { + return &v + }).(ProviderAppAuthPtrOutput) +} + +func (o ProviderAppAuthOutput) ToOutput(ctx context.Context) pulumix.Output[ProviderAppAuth] { + return pulumix.Output[ProviderAppAuth]{ + OutputState: o.OutputState, + } +} + +func (o ProviderAppAuthOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v ProviderAppAuth) string { return v.Id }).(pulumi.StringOutput) +} + +func (o ProviderAppAuthOutput) InstallationId() pulumi.StringOutput { + return o.ApplyT(func(v ProviderAppAuth) string { return v.InstallationId }).(pulumi.StringOutput) +} + +func (o ProviderAppAuthOutput) PemFile() pulumi.StringOutput { + return o.ApplyT(func(v ProviderAppAuth) string { return v.PemFile }).(pulumi.StringOutput) +} + +type ProviderAppAuthPtrOutput struct{ *pulumi.OutputState } + +func (ProviderAppAuthPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**ProviderAppAuth)(nil)).Elem() +} + +func (o ProviderAppAuthPtrOutput) ToProviderAppAuthPtrOutput() ProviderAppAuthPtrOutput { + return o +} + +func (o ProviderAppAuthPtrOutput) ToProviderAppAuthPtrOutputWithContext(ctx context.Context) ProviderAppAuthPtrOutput { + return o +} + +func (o ProviderAppAuthPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*ProviderAppAuth] { + return pulumix.Output[*ProviderAppAuth]{ + OutputState: o.OutputState, + } +} + +func (o ProviderAppAuthPtrOutput) Elem() ProviderAppAuthOutput { + return o.ApplyT(func(v *ProviderAppAuth) ProviderAppAuth { + if v != nil { + return *v + } + var ret ProviderAppAuth + return ret + }).(ProviderAppAuthOutput) +} + +func (o ProviderAppAuthPtrOutput) Id() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ProviderAppAuth) *string { + if v == nil { + return nil + } + return &v.Id + }).(pulumi.StringPtrOutput) +} + +func (o ProviderAppAuthPtrOutput) InstallationId() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ProviderAppAuth) *string { + if v == nil { + return nil + } + return &v.InstallationId + }).(pulumi.StringPtrOutput) +} + +func (o ProviderAppAuthPtrOutput) PemFile() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ProviderAppAuth) *string { + if v == nil { + return nil + } + return &v.PemFile + }).(pulumi.StringPtrOutput) +} + +type RepositoryCollaboratorsTeam struct { + // The permission of the outside collaborators for the repository. + // Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. + // Must be `push` for personal repositories. Defaults to `push`. + Permission *string `pulumi:"permission"` + // The GitHub team id or the GitHub team slug + TeamId string `pulumi:"teamId"` +} + +// RepositoryCollaboratorsTeamInput is an input type that accepts RepositoryCollaboratorsTeamArgs and RepositoryCollaboratorsTeamOutput values. +// You can construct a concrete instance of `RepositoryCollaboratorsTeamInput` via: +// +// RepositoryCollaboratorsTeamArgs{...} +type RepositoryCollaboratorsTeamInput interface { + pulumi.Input + + ToRepositoryCollaboratorsTeamOutput() RepositoryCollaboratorsTeamOutput + ToRepositoryCollaboratorsTeamOutputWithContext(context.Context) RepositoryCollaboratorsTeamOutput +} + +type RepositoryCollaboratorsTeamArgs struct { + // The permission of the outside collaborators for the repository. + // Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. + // Must be `push` for personal repositories. Defaults to `push`. + Permission pulumi.StringPtrInput `pulumi:"permission"` + // The GitHub team id or the GitHub team slug + TeamId pulumi.StringInput `pulumi:"teamId"` +} + +func (RepositoryCollaboratorsTeamArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryCollaboratorsTeam)(nil)).Elem() +} + +func (i RepositoryCollaboratorsTeamArgs) ToRepositoryCollaboratorsTeamOutput() RepositoryCollaboratorsTeamOutput { + return i.ToRepositoryCollaboratorsTeamOutputWithContext(context.Background()) +} + +func (i RepositoryCollaboratorsTeamArgs) ToRepositoryCollaboratorsTeamOutputWithContext(ctx context.Context) RepositoryCollaboratorsTeamOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryCollaboratorsTeamOutput) +} + +func (i RepositoryCollaboratorsTeamArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryCollaboratorsTeam] { + return pulumix.Output[RepositoryCollaboratorsTeam]{ + OutputState: i.ToRepositoryCollaboratorsTeamOutputWithContext(ctx).OutputState, + } +} + +// RepositoryCollaboratorsTeamArrayInput is an input type that accepts RepositoryCollaboratorsTeamArray and RepositoryCollaboratorsTeamArrayOutput values. +// You can construct a concrete instance of `RepositoryCollaboratorsTeamArrayInput` via: +// +// RepositoryCollaboratorsTeamArray{ RepositoryCollaboratorsTeamArgs{...} } +type RepositoryCollaboratorsTeamArrayInput interface { + pulumi.Input + + ToRepositoryCollaboratorsTeamArrayOutput() RepositoryCollaboratorsTeamArrayOutput + ToRepositoryCollaboratorsTeamArrayOutputWithContext(context.Context) RepositoryCollaboratorsTeamArrayOutput +} + +type RepositoryCollaboratorsTeamArray []RepositoryCollaboratorsTeamInput + +func (RepositoryCollaboratorsTeamArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryCollaboratorsTeam)(nil)).Elem() +} + +func (i RepositoryCollaboratorsTeamArray) ToRepositoryCollaboratorsTeamArrayOutput() RepositoryCollaboratorsTeamArrayOutput { + return i.ToRepositoryCollaboratorsTeamArrayOutputWithContext(context.Background()) +} + +func (i RepositoryCollaboratorsTeamArray) ToRepositoryCollaboratorsTeamArrayOutputWithContext(ctx context.Context) RepositoryCollaboratorsTeamArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryCollaboratorsTeamArrayOutput) +} + +func (i RepositoryCollaboratorsTeamArray) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryCollaboratorsTeam] { + return pulumix.Output[[]RepositoryCollaboratorsTeam]{ + OutputState: i.ToRepositoryCollaboratorsTeamArrayOutputWithContext(ctx).OutputState, + } +} + +type RepositoryCollaboratorsTeamOutput struct{ *pulumi.OutputState } + +func (RepositoryCollaboratorsTeamOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryCollaboratorsTeam)(nil)).Elem() +} + +func (o RepositoryCollaboratorsTeamOutput) ToRepositoryCollaboratorsTeamOutput() RepositoryCollaboratorsTeamOutput { + return o +} + +func (o RepositoryCollaboratorsTeamOutput) ToRepositoryCollaboratorsTeamOutputWithContext(ctx context.Context) RepositoryCollaboratorsTeamOutput { + return o +} + +func (o RepositoryCollaboratorsTeamOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryCollaboratorsTeam] { + return pulumix.Output[RepositoryCollaboratorsTeam]{ + OutputState: o.OutputState, + } +} + +// The permission of the outside collaborators for the repository. +// Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. +// Must be `push` for personal repositories. Defaults to `push`. +func (o RepositoryCollaboratorsTeamOutput) Permission() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryCollaboratorsTeam) *string { return v.Permission }).(pulumi.StringPtrOutput) +} + +// The GitHub team id or the GitHub team slug +func (o RepositoryCollaboratorsTeamOutput) TeamId() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryCollaboratorsTeam) string { return v.TeamId }).(pulumi.StringOutput) +} + +type RepositoryCollaboratorsTeamArrayOutput struct{ *pulumi.OutputState } + +func (RepositoryCollaboratorsTeamArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryCollaboratorsTeam)(nil)).Elem() +} + +func (o RepositoryCollaboratorsTeamArrayOutput) ToRepositoryCollaboratorsTeamArrayOutput() RepositoryCollaboratorsTeamArrayOutput { + return o +} + +func (o RepositoryCollaboratorsTeamArrayOutput) ToRepositoryCollaboratorsTeamArrayOutputWithContext(ctx context.Context) RepositoryCollaboratorsTeamArrayOutput { + return o +} + +func (o RepositoryCollaboratorsTeamArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryCollaboratorsTeam] { + return pulumix.Output[[]RepositoryCollaboratorsTeam]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryCollaboratorsTeamArrayOutput) Index(i pulumi.IntInput) RepositoryCollaboratorsTeamOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) RepositoryCollaboratorsTeam { + return vs[0].([]RepositoryCollaboratorsTeam)[vs[1].(int)] + }).(RepositoryCollaboratorsTeamOutput) +} + +type RepositoryCollaboratorsUser struct { + // The permission of the outside collaborators for the repository. + // Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. + // Must be `push` for personal repositories. Defaults to `push`. + Permission *string `pulumi:"permission"` + Username string `pulumi:"username"` +} + +// RepositoryCollaboratorsUserInput is an input type that accepts RepositoryCollaboratorsUserArgs and RepositoryCollaboratorsUserOutput values. +// You can construct a concrete instance of `RepositoryCollaboratorsUserInput` via: +// +// RepositoryCollaboratorsUserArgs{...} +type RepositoryCollaboratorsUserInput interface { + pulumi.Input + + ToRepositoryCollaboratorsUserOutput() RepositoryCollaboratorsUserOutput + ToRepositoryCollaboratorsUserOutputWithContext(context.Context) RepositoryCollaboratorsUserOutput +} + +type RepositoryCollaboratorsUserArgs struct { + // The permission of the outside collaborators for the repository. + // Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. + // Must be `push` for personal repositories. Defaults to `push`. + Permission pulumi.StringPtrInput `pulumi:"permission"` + Username pulumi.StringInput `pulumi:"username"` +} + +func (RepositoryCollaboratorsUserArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryCollaboratorsUser)(nil)).Elem() +} + +func (i RepositoryCollaboratorsUserArgs) ToRepositoryCollaboratorsUserOutput() RepositoryCollaboratorsUserOutput { + return i.ToRepositoryCollaboratorsUserOutputWithContext(context.Background()) +} + +func (i RepositoryCollaboratorsUserArgs) ToRepositoryCollaboratorsUserOutputWithContext(ctx context.Context) RepositoryCollaboratorsUserOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryCollaboratorsUserOutput) +} + +func (i RepositoryCollaboratorsUserArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryCollaboratorsUser] { + return pulumix.Output[RepositoryCollaboratorsUser]{ + OutputState: i.ToRepositoryCollaboratorsUserOutputWithContext(ctx).OutputState, + } +} + +// RepositoryCollaboratorsUserArrayInput is an input type that accepts RepositoryCollaboratorsUserArray and RepositoryCollaboratorsUserArrayOutput values. +// You can construct a concrete instance of `RepositoryCollaboratorsUserArrayInput` via: +// +// RepositoryCollaboratorsUserArray{ RepositoryCollaboratorsUserArgs{...} } +type RepositoryCollaboratorsUserArrayInput interface { + pulumi.Input + + ToRepositoryCollaboratorsUserArrayOutput() RepositoryCollaboratorsUserArrayOutput + ToRepositoryCollaboratorsUserArrayOutputWithContext(context.Context) RepositoryCollaboratorsUserArrayOutput +} + +type RepositoryCollaboratorsUserArray []RepositoryCollaboratorsUserInput + +func (RepositoryCollaboratorsUserArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryCollaboratorsUser)(nil)).Elem() +} + +func (i RepositoryCollaboratorsUserArray) ToRepositoryCollaboratorsUserArrayOutput() RepositoryCollaboratorsUserArrayOutput { + return i.ToRepositoryCollaboratorsUserArrayOutputWithContext(context.Background()) +} + +func (i RepositoryCollaboratorsUserArray) ToRepositoryCollaboratorsUserArrayOutputWithContext(ctx context.Context) RepositoryCollaboratorsUserArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryCollaboratorsUserArrayOutput) +} + +func (i RepositoryCollaboratorsUserArray) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryCollaboratorsUser] { + return pulumix.Output[[]RepositoryCollaboratorsUser]{ + OutputState: i.ToRepositoryCollaboratorsUserArrayOutputWithContext(ctx).OutputState, + } +} + +type RepositoryCollaboratorsUserOutput struct{ *pulumi.OutputState } + +func (RepositoryCollaboratorsUserOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryCollaboratorsUser)(nil)).Elem() +} + +func (o RepositoryCollaboratorsUserOutput) ToRepositoryCollaboratorsUserOutput() RepositoryCollaboratorsUserOutput { + return o +} + +func (o RepositoryCollaboratorsUserOutput) ToRepositoryCollaboratorsUserOutputWithContext(ctx context.Context) RepositoryCollaboratorsUserOutput { + return o +} + +func (o RepositoryCollaboratorsUserOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryCollaboratorsUser] { + return pulumix.Output[RepositoryCollaboratorsUser]{ + OutputState: o.OutputState, + } +} + +// The permission of the outside collaborators for the repository. +// Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. +// Must be `push` for personal repositories. Defaults to `push`. +func (o RepositoryCollaboratorsUserOutput) Permission() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryCollaboratorsUser) *string { return v.Permission }).(pulumi.StringPtrOutput) +} + +func (o RepositoryCollaboratorsUserOutput) Username() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryCollaboratorsUser) string { return v.Username }).(pulumi.StringOutput) +} + +type RepositoryCollaboratorsUserArrayOutput struct{ *pulumi.OutputState } + +func (RepositoryCollaboratorsUserArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryCollaboratorsUser)(nil)).Elem() +} + +func (o RepositoryCollaboratorsUserArrayOutput) ToRepositoryCollaboratorsUserArrayOutput() RepositoryCollaboratorsUserArrayOutput { + return o +} + +func (o RepositoryCollaboratorsUserArrayOutput) ToRepositoryCollaboratorsUserArrayOutputWithContext(ctx context.Context) RepositoryCollaboratorsUserArrayOutput { + return o +} + +func (o RepositoryCollaboratorsUserArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryCollaboratorsUser] { + return pulumix.Output[[]RepositoryCollaboratorsUser]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryCollaboratorsUserArrayOutput) Index(i pulumi.IntInput) RepositoryCollaboratorsUserOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) RepositoryCollaboratorsUser { + return vs[0].([]RepositoryCollaboratorsUser)[vs[1].(int)] + }).(RepositoryCollaboratorsUserOutput) +} + +type RepositoryEnvironmentDeploymentBranchPolicy struct { + // Whether only branches that match the specified name patterns can deploy to this environment. + CustomBranchPolicies bool `pulumi:"customBranchPolicies"` + // Whether only branches with branch protection rules can deploy to this environment. + ProtectedBranches bool `pulumi:"protectedBranches"` +} + +// RepositoryEnvironmentDeploymentBranchPolicyInput is an input type that accepts RepositoryEnvironmentDeploymentBranchPolicyArgs and RepositoryEnvironmentDeploymentBranchPolicyOutput values. +// You can construct a concrete instance of `RepositoryEnvironmentDeploymentBranchPolicyInput` via: +// +// RepositoryEnvironmentDeploymentBranchPolicyArgs{...} +type RepositoryEnvironmentDeploymentBranchPolicyInput interface { + pulumi.Input + + ToRepositoryEnvironmentDeploymentBranchPolicyOutput() RepositoryEnvironmentDeploymentBranchPolicyOutput + ToRepositoryEnvironmentDeploymentBranchPolicyOutputWithContext(context.Context) RepositoryEnvironmentDeploymentBranchPolicyOutput +} + +type RepositoryEnvironmentDeploymentBranchPolicyArgs struct { + // Whether only branches that match the specified name patterns can deploy to this environment. + CustomBranchPolicies pulumi.BoolInput `pulumi:"customBranchPolicies"` + // Whether only branches with branch protection rules can deploy to this environment. + ProtectedBranches pulumi.BoolInput `pulumi:"protectedBranches"` +} + +func (RepositoryEnvironmentDeploymentBranchPolicyArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryEnvironmentDeploymentBranchPolicy)(nil)).Elem() +} + +func (i RepositoryEnvironmentDeploymentBranchPolicyArgs) ToRepositoryEnvironmentDeploymentBranchPolicyOutput() RepositoryEnvironmentDeploymentBranchPolicyOutput { + return i.ToRepositoryEnvironmentDeploymentBranchPolicyOutputWithContext(context.Background()) +} + +func (i RepositoryEnvironmentDeploymentBranchPolicyArgs) ToRepositoryEnvironmentDeploymentBranchPolicyOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryEnvironmentDeploymentBranchPolicyOutput) +} + +func (i RepositoryEnvironmentDeploymentBranchPolicyArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryEnvironmentDeploymentBranchPolicy] { + return pulumix.Output[RepositoryEnvironmentDeploymentBranchPolicy]{ + OutputState: i.ToRepositoryEnvironmentDeploymentBranchPolicyOutputWithContext(ctx).OutputState, + } +} + +func (i RepositoryEnvironmentDeploymentBranchPolicyArgs) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutput() RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { + return i.ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(context.Background()) +} + +func (i RepositoryEnvironmentDeploymentBranchPolicyArgs) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryEnvironmentDeploymentBranchPolicyOutput).ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx) +} + +// RepositoryEnvironmentDeploymentBranchPolicyPtrInput is an input type that accepts RepositoryEnvironmentDeploymentBranchPolicyArgs, RepositoryEnvironmentDeploymentBranchPolicyPtr and RepositoryEnvironmentDeploymentBranchPolicyPtrOutput values. +// You can construct a concrete instance of `RepositoryEnvironmentDeploymentBranchPolicyPtrInput` via: +// +// RepositoryEnvironmentDeploymentBranchPolicyArgs{...} +// +// or: +// +// nil +type RepositoryEnvironmentDeploymentBranchPolicyPtrInput interface { + pulumi.Input + + ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutput() RepositoryEnvironmentDeploymentBranchPolicyPtrOutput + ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(context.Context) RepositoryEnvironmentDeploymentBranchPolicyPtrOutput +} + +type repositoryEnvironmentDeploymentBranchPolicyPtrType RepositoryEnvironmentDeploymentBranchPolicyArgs + +func RepositoryEnvironmentDeploymentBranchPolicyPtr(v *RepositoryEnvironmentDeploymentBranchPolicyArgs) RepositoryEnvironmentDeploymentBranchPolicyPtrInput { + return (*repositoryEnvironmentDeploymentBranchPolicyPtrType)(v) +} + +func (*repositoryEnvironmentDeploymentBranchPolicyPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryEnvironmentDeploymentBranchPolicy)(nil)).Elem() +} + +func (i *repositoryEnvironmentDeploymentBranchPolicyPtrType) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutput() RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { + return i.ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(context.Background()) +} + +func (i *repositoryEnvironmentDeploymentBranchPolicyPtrType) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) +} + +func (i *repositoryEnvironmentDeploymentBranchPolicyPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryEnvironmentDeploymentBranchPolicy] { + return pulumix.Output[*RepositoryEnvironmentDeploymentBranchPolicy]{ + OutputState: i.ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx).OutputState, + } +} + +type RepositoryEnvironmentDeploymentBranchPolicyOutput struct{ *pulumi.OutputState } + +func (RepositoryEnvironmentDeploymentBranchPolicyOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryEnvironmentDeploymentBranchPolicy)(nil)).Elem() +} + +func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ToRepositoryEnvironmentDeploymentBranchPolicyOutput() RepositoryEnvironmentDeploymentBranchPolicyOutput { + return o +} + +func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ToRepositoryEnvironmentDeploymentBranchPolicyOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyOutput { + return o +} + +func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutput() RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { + return o.ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(context.Background()) +} + +func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryEnvironmentDeploymentBranchPolicy) *RepositoryEnvironmentDeploymentBranchPolicy { + return &v + }).(RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) +} + +func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryEnvironmentDeploymentBranchPolicy] { + return pulumix.Output[RepositoryEnvironmentDeploymentBranchPolicy]{ + OutputState: o.OutputState, + } +} + +// Whether only branches that match the specified name patterns can deploy to this environment. +func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) CustomBranchPolicies() pulumi.BoolOutput { + return o.ApplyT(func(v RepositoryEnvironmentDeploymentBranchPolicy) bool { return v.CustomBranchPolicies }).(pulumi.BoolOutput) +} + +// Whether only branches with branch protection rules can deploy to this environment. +func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ProtectedBranches() pulumi.BoolOutput { + return o.ApplyT(func(v RepositoryEnvironmentDeploymentBranchPolicy) bool { return v.ProtectedBranches }).(pulumi.BoolOutput) +} + +type RepositoryEnvironmentDeploymentBranchPolicyPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryEnvironmentDeploymentBranchPolicy)(nil)).Elem() +} + +func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutput() RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { + return o +} + +func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { + return o +} + +func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryEnvironmentDeploymentBranchPolicy] { + return pulumix.Output[*RepositoryEnvironmentDeploymentBranchPolicy]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) Elem() RepositoryEnvironmentDeploymentBranchPolicyOutput { + return o.ApplyT(func(v *RepositoryEnvironmentDeploymentBranchPolicy) RepositoryEnvironmentDeploymentBranchPolicy { + if v != nil { + return *v + } + var ret RepositoryEnvironmentDeploymentBranchPolicy + return ret + }).(RepositoryEnvironmentDeploymentBranchPolicyOutput) +} + +// Whether only branches that match the specified name patterns can deploy to this environment. +func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) CustomBranchPolicies() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryEnvironmentDeploymentBranchPolicy) *bool { + if v == nil { + return nil + } + return &v.CustomBranchPolicies + }).(pulumi.BoolPtrOutput) +} + +// Whether only branches with branch protection rules can deploy to this environment. +func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) ProtectedBranches() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryEnvironmentDeploymentBranchPolicy) *bool { + if v == nil { + return nil + } + return &v.ProtectedBranches + }).(pulumi.BoolPtrOutput) +} + +type RepositoryEnvironmentReviewer struct { + // Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + Teams []int `pulumi:"teams"` + // Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + Users []int `pulumi:"users"` +} + +// RepositoryEnvironmentReviewerInput is an input type that accepts RepositoryEnvironmentReviewerArgs and RepositoryEnvironmentReviewerOutput values. +// You can construct a concrete instance of `RepositoryEnvironmentReviewerInput` via: +// +// RepositoryEnvironmentReviewerArgs{...} +type RepositoryEnvironmentReviewerInput interface { + pulumi.Input + + ToRepositoryEnvironmentReviewerOutput() RepositoryEnvironmentReviewerOutput + ToRepositoryEnvironmentReviewerOutputWithContext(context.Context) RepositoryEnvironmentReviewerOutput +} + +type RepositoryEnvironmentReviewerArgs struct { + // Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + Teams pulumi.IntArrayInput `pulumi:"teams"` + // Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + Users pulumi.IntArrayInput `pulumi:"users"` +} + +func (RepositoryEnvironmentReviewerArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryEnvironmentReviewer)(nil)).Elem() +} + +func (i RepositoryEnvironmentReviewerArgs) ToRepositoryEnvironmentReviewerOutput() RepositoryEnvironmentReviewerOutput { + return i.ToRepositoryEnvironmentReviewerOutputWithContext(context.Background()) +} + +func (i RepositoryEnvironmentReviewerArgs) ToRepositoryEnvironmentReviewerOutputWithContext(ctx context.Context) RepositoryEnvironmentReviewerOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryEnvironmentReviewerOutput) +} + +func (i RepositoryEnvironmentReviewerArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryEnvironmentReviewer] { + return pulumix.Output[RepositoryEnvironmentReviewer]{ + OutputState: i.ToRepositoryEnvironmentReviewerOutputWithContext(ctx).OutputState, + } +} + +// RepositoryEnvironmentReviewerArrayInput is an input type that accepts RepositoryEnvironmentReviewerArray and RepositoryEnvironmentReviewerArrayOutput values. +// You can construct a concrete instance of `RepositoryEnvironmentReviewerArrayInput` via: +// +// RepositoryEnvironmentReviewerArray{ RepositoryEnvironmentReviewerArgs{...} } +type RepositoryEnvironmentReviewerArrayInput interface { + pulumi.Input + + ToRepositoryEnvironmentReviewerArrayOutput() RepositoryEnvironmentReviewerArrayOutput + ToRepositoryEnvironmentReviewerArrayOutputWithContext(context.Context) RepositoryEnvironmentReviewerArrayOutput +} + +type RepositoryEnvironmentReviewerArray []RepositoryEnvironmentReviewerInput + +func (RepositoryEnvironmentReviewerArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryEnvironmentReviewer)(nil)).Elem() +} + +func (i RepositoryEnvironmentReviewerArray) ToRepositoryEnvironmentReviewerArrayOutput() RepositoryEnvironmentReviewerArrayOutput { + return i.ToRepositoryEnvironmentReviewerArrayOutputWithContext(context.Background()) +} + +func (i RepositoryEnvironmentReviewerArray) ToRepositoryEnvironmentReviewerArrayOutputWithContext(ctx context.Context) RepositoryEnvironmentReviewerArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryEnvironmentReviewerArrayOutput) +} + +func (i RepositoryEnvironmentReviewerArray) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryEnvironmentReviewer] { + return pulumix.Output[[]RepositoryEnvironmentReviewer]{ + OutputState: i.ToRepositoryEnvironmentReviewerArrayOutputWithContext(ctx).OutputState, + } +} + +type RepositoryEnvironmentReviewerOutput struct{ *pulumi.OutputState } + +func (RepositoryEnvironmentReviewerOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryEnvironmentReviewer)(nil)).Elem() +} + +func (o RepositoryEnvironmentReviewerOutput) ToRepositoryEnvironmentReviewerOutput() RepositoryEnvironmentReviewerOutput { + return o +} + +func (o RepositoryEnvironmentReviewerOutput) ToRepositoryEnvironmentReviewerOutputWithContext(ctx context.Context) RepositoryEnvironmentReviewerOutput { + return o +} + +func (o RepositoryEnvironmentReviewerOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryEnvironmentReviewer] { + return pulumix.Output[RepositoryEnvironmentReviewer]{ + OutputState: o.OutputState, + } +} + +// Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. +func (o RepositoryEnvironmentReviewerOutput) Teams() pulumi.IntArrayOutput { + return o.ApplyT(func(v RepositoryEnvironmentReviewer) []int { return v.Teams }).(pulumi.IntArrayOutput) +} + +// Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. +func (o RepositoryEnvironmentReviewerOutput) Users() pulumi.IntArrayOutput { + return o.ApplyT(func(v RepositoryEnvironmentReviewer) []int { return v.Users }).(pulumi.IntArrayOutput) +} + +type RepositoryEnvironmentReviewerArrayOutput struct{ *pulumi.OutputState } + +func (RepositoryEnvironmentReviewerArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryEnvironmentReviewer)(nil)).Elem() +} + +func (o RepositoryEnvironmentReviewerArrayOutput) ToRepositoryEnvironmentReviewerArrayOutput() RepositoryEnvironmentReviewerArrayOutput { + return o +} + +func (o RepositoryEnvironmentReviewerArrayOutput) ToRepositoryEnvironmentReviewerArrayOutputWithContext(ctx context.Context) RepositoryEnvironmentReviewerArrayOutput { + return o +} + +func (o RepositoryEnvironmentReviewerArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryEnvironmentReviewer] { + return pulumix.Output[[]RepositoryEnvironmentReviewer]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryEnvironmentReviewerArrayOutput) Index(i pulumi.IntInput) RepositoryEnvironmentReviewerOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) RepositoryEnvironmentReviewer { + return vs[0].([]RepositoryEnvironmentReviewer)[vs[1].(int)] + }).(RepositoryEnvironmentReviewerOutput) +} + +type RepositoryPages struct { + // The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. + BuildType *string `pulumi:"buildType"` + // The custom domain for the repository. This can only be set after the repository has been created. + Cname *string `pulumi:"cname"` + // Whether the rendered GitHub Pages site has a custom 404 page. + Custom404 *bool `pulumi:"custom404"` + // The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. + HtmlUrl *string `pulumi:"htmlUrl"` + // The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + Source *RepositoryPagesSource `pulumi:"source"` + // Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. + Status *string `pulumi:"status"` + Url *string `pulumi:"url"` +} + +// RepositoryPagesInput is an input type that accepts RepositoryPagesArgs and RepositoryPagesOutput values. +// You can construct a concrete instance of `RepositoryPagesInput` via: +// +// RepositoryPagesArgs{...} +type RepositoryPagesInput interface { + pulumi.Input + + ToRepositoryPagesOutput() RepositoryPagesOutput + ToRepositoryPagesOutputWithContext(context.Context) RepositoryPagesOutput +} + +type RepositoryPagesArgs struct { + // The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. + BuildType pulumi.StringPtrInput `pulumi:"buildType"` + // The custom domain for the repository. This can only be set after the repository has been created. + Cname pulumi.StringPtrInput `pulumi:"cname"` + // Whether the rendered GitHub Pages site has a custom 404 page. + Custom404 pulumi.BoolPtrInput `pulumi:"custom404"` + // The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. + HtmlUrl pulumi.StringPtrInput `pulumi:"htmlUrl"` + // The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + Source RepositoryPagesSourcePtrInput `pulumi:"source"` + // Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. + Status pulumi.StringPtrInput `pulumi:"status"` + Url pulumi.StringPtrInput `pulumi:"url"` +} + +func (RepositoryPagesArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryPages)(nil)).Elem() +} + +func (i RepositoryPagesArgs) ToRepositoryPagesOutput() RepositoryPagesOutput { + return i.ToRepositoryPagesOutputWithContext(context.Background()) +} + +func (i RepositoryPagesArgs) ToRepositoryPagesOutputWithContext(ctx context.Context) RepositoryPagesOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesOutput) +} + +func (i RepositoryPagesArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryPages] { + return pulumix.Output[RepositoryPages]{ + OutputState: i.ToRepositoryPagesOutputWithContext(ctx).OutputState, + } +} + +func (i RepositoryPagesArgs) ToRepositoryPagesPtrOutput() RepositoryPagesPtrOutput { + return i.ToRepositoryPagesPtrOutputWithContext(context.Background()) +} + +func (i RepositoryPagesArgs) ToRepositoryPagesPtrOutputWithContext(ctx context.Context) RepositoryPagesPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesOutput).ToRepositoryPagesPtrOutputWithContext(ctx) +} + +// RepositoryPagesPtrInput is an input type that accepts RepositoryPagesArgs, RepositoryPagesPtr and RepositoryPagesPtrOutput values. +// You can construct a concrete instance of `RepositoryPagesPtrInput` via: +// +// RepositoryPagesArgs{...} +// +// or: +// +// nil +type RepositoryPagesPtrInput interface { + pulumi.Input + + ToRepositoryPagesPtrOutput() RepositoryPagesPtrOutput + ToRepositoryPagesPtrOutputWithContext(context.Context) RepositoryPagesPtrOutput +} + +type repositoryPagesPtrType RepositoryPagesArgs + +func RepositoryPagesPtr(v *RepositoryPagesArgs) RepositoryPagesPtrInput { + return (*repositoryPagesPtrType)(v) +} + +func (*repositoryPagesPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryPages)(nil)).Elem() +} + +func (i *repositoryPagesPtrType) ToRepositoryPagesPtrOutput() RepositoryPagesPtrOutput { + return i.ToRepositoryPagesPtrOutputWithContext(context.Background()) +} + +func (i *repositoryPagesPtrType) ToRepositoryPagesPtrOutputWithContext(ctx context.Context) RepositoryPagesPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesPtrOutput) +} + +func (i *repositoryPagesPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryPages] { + return pulumix.Output[*RepositoryPages]{ + OutputState: i.ToRepositoryPagesPtrOutputWithContext(ctx).OutputState, + } +} + +type RepositoryPagesOutput struct{ *pulumi.OutputState } + +func (RepositoryPagesOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryPages)(nil)).Elem() +} + +func (o RepositoryPagesOutput) ToRepositoryPagesOutput() RepositoryPagesOutput { + return o +} + +func (o RepositoryPagesOutput) ToRepositoryPagesOutputWithContext(ctx context.Context) RepositoryPagesOutput { + return o +} + +func (o RepositoryPagesOutput) ToRepositoryPagesPtrOutput() RepositoryPagesPtrOutput { + return o.ToRepositoryPagesPtrOutputWithContext(context.Background()) +} + +func (o RepositoryPagesOutput) ToRepositoryPagesPtrOutputWithContext(ctx context.Context) RepositoryPagesPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryPages) *RepositoryPages { + return &v + }).(RepositoryPagesPtrOutput) +} + +func (o RepositoryPagesOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryPages] { + return pulumix.Output[RepositoryPages]{ + OutputState: o.OutputState, + } +} + +// The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. +func (o RepositoryPagesOutput) BuildType() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryPages) *string { return v.BuildType }).(pulumi.StringPtrOutput) +} + +// The custom domain for the repository. This can only be set after the repository has been created. +func (o RepositoryPagesOutput) Cname() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryPages) *string { return v.Cname }).(pulumi.StringPtrOutput) +} + +// Whether the rendered GitHub Pages site has a custom 404 page. +func (o RepositoryPagesOutput) Custom404() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryPages) *bool { return v.Custom404 }).(pulumi.BoolPtrOutput) +} + +// The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. +func (o RepositoryPagesOutput) HtmlUrl() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryPages) *string { return v.HtmlUrl }).(pulumi.StringPtrOutput) +} + +// The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. +func (o RepositoryPagesOutput) Source() RepositoryPagesSourcePtrOutput { + return o.ApplyT(func(v RepositoryPages) *RepositoryPagesSource { return v.Source }).(RepositoryPagesSourcePtrOutput) +} + +// Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. +func (o RepositoryPagesOutput) Status() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryPages) *string { return v.Status }).(pulumi.StringPtrOutput) +} + +func (o RepositoryPagesOutput) Url() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryPages) *string { return v.Url }).(pulumi.StringPtrOutput) +} + +type RepositoryPagesPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryPagesPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryPages)(nil)).Elem() +} + +func (o RepositoryPagesPtrOutput) ToRepositoryPagesPtrOutput() RepositoryPagesPtrOutput { + return o +} + +func (o RepositoryPagesPtrOutput) ToRepositoryPagesPtrOutputWithContext(ctx context.Context) RepositoryPagesPtrOutput { + return o +} + +func (o RepositoryPagesPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryPages] { + return pulumix.Output[*RepositoryPages]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryPagesPtrOutput) Elem() RepositoryPagesOutput { + return o.ApplyT(func(v *RepositoryPages) RepositoryPages { + if v != nil { + return *v + } + var ret RepositoryPages + return ret + }).(RepositoryPagesOutput) +} + +// The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. +func (o RepositoryPagesPtrOutput) BuildType() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryPages) *string { + if v == nil { + return nil + } + return v.BuildType + }).(pulumi.StringPtrOutput) +} + +// The custom domain for the repository. This can only be set after the repository has been created. +func (o RepositoryPagesPtrOutput) Cname() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryPages) *string { + if v == nil { + return nil + } + return v.Cname + }).(pulumi.StringPtrOutput) +} + +// Whether the rendered GitHub Pages site has a custom 404 page. +func (o RepositoryPagesPtrOutput) Custom404() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryPages) *bool { + if v == nil { + return nil + } + return v.Custom404 + }).(pulumi.BoolPtrOutput) +} + +// The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. +func (o RepositoryPagesPtrOutput) HtmlUrl() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryPages) *string { + if v == nil { + return nil + } + return v.HtmlUrl + }).(pulumi.StringPtrOutput) +} + +// The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. +func (o RepositoryPagesPtrOutput) Source() RepositoryPagesSourcePtrOutput { + return o.ApplyT(func(v *RepositoryPages) *RepositoryPagesSource { + if v == nil { + return nil + } + return v.Source + }).(RepositoryPagesSourcePtrOutput) +} + +// Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. +func (o RepositoryPagesPtrOutput) Status() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryPages) *string { + if v == nil { + return nil + } + return v.Status + }).(pulumi.StringPtrOutput) +} + +func (o RepositoryPagesPtrOutput) Url() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryPages) *string { + if v == nil { + return nil + } + return v.Url + }).(pulumi.StringPtrOutput) +} + +type RepositoryPagesSource struct { + // The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. + Branch string `pulumi:"branch"` + // The repository directory from which the site publishes (Default: `/`). + Path *string `pulumi:"path"` +} + +// RepositoryPagesSourceInput is an input type that accepts RepositoryPagesSourceArgs and RepositoryPagesSourceOutput values. +// You can construct a concrete instance of `RepositoryPagesSourceInput` via: +// +// RepositoryPagesSourceArgs{...} +type RepositoryPagesSourceInput interface { + pulumi.Input + + ToRepositoryPagesSourceOutput() RepositoryPagesSourceOutput + ToRepositoryPagesSourceOutputWithContext(context.Context) RepositoryPagesSourceOutput +} + +type RepositoryPagesSourceArgs struct { + // The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. + Branch pulumi.StringInput `pulumi:"branch"` + // The repository directory from which the site publishes (Default: `/`). + Path pulumi.StringPtrInput `pulumi:"path"` +} + +func (RepositoryPagesSourceArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryPagesSource)(nil)).Elem() +} + +func (i RepositoryPagesSourceArgs) ToRepositoryPagesSourceOutput() RepositoryPagesSourceOutput { + return i.ToRepositoryPagesSourceOutputWithContext(context.Background()) +} + +func (i RepositoryPagesSourceArgs) ToRepositoryPagesSourceOutputWithContext(ctx context.Context) RepositoryPagesSourceOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesSourceOutput) +} + +func (i RepositoryPagesSourceArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryPagesSource] { + return pulumix.Output[RepositoryPagesSource]{ + OutputState: i.ToRepositoryPagesSourceOutputWithContext(ctx).OutputState, + } +} + +func (i RepositoryPagesSourceArgs) ToRepositoryPagesSourcePtrOutput() RepositoryPagesSourcePtrOutput { + return i.ToRepositoryPagesSourcePtrOutputWithContext(context.Background()) +} + +func (i RepositoryPagesSourceArgs) ToRepositoryPagesSourcePtrOutputWithContext(ctx context.Context) RepositoryPagesSourcePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesSourceOutput).ToRepositoryPagesSourcePtrOutputWithContext(ctx) +} + +// RepositoryPagesSourcePtrInput is an input type that accepts RepositoryPagesSourceArgs, RepositoryPagesSourcePtr and RepositoryPagesSourcePtrOutput values. +// You can construct a concrete instance of `RepositoryPagesSourcePtrInput` via: +// +// RepositoryPagesSourceArgs{...} +// +// or: +// +// nil +type RepositoryPagesSourcePtrInput interface { + pulumi.Input + + ToRepositoryPagesSourcePtrOutput() RepositoryPagesSourcePtrOutput + ToRepositoryPagesSourcePtrOutputWithContext(context.Context) RepositoryPagesSourcePtrOutput +} + +type repositoryPagesSourcePtrType RepositoryPagesSourceArgs + +func RepositoryPagesSourcePtr(v *RepositoryPagesSourceArgs) RepositoryPagesSourcePtrInput { + return (*repositoryPagesSourcePtrType)(v) +} + +func (*repositoryPagesSourcePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryPagesSource)(nil)).Elem() +} + +func (i *repositoryPagesSourcePtrType) ToRepositoryPagesSourcePtrOutput() RepositoryPagesSourcePtrOutput { + return i.ToRepositoryPagesSourcePtrOutputWithContext(context.Background()) +} + +func (i *repositoryPagesSourcePtrType) ToRepositoryPagesSourcePtrOutputWithContext(ctx context.Context) RepositoryPagesSourcePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesSourcePtrOutput) +} + +func (i *repositoryPagesSourcePtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryPagesSource] { + return pulumix.Output[*RepositoryPagesSource]{ + OutputState: i.ToRepositoryPagesSourcePtrOutputWithContext(ctx).OutputState, + } +} + +type RepositoryPagesSourceOutput struct{ *pulumi.OutputState } + +func (RepositoryPagesSourceOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryPagesSource)(nil)).Elem() +} + +func (o RepositoryPagesSourceOutput) ToRepositoryPagesSourceOutput() RepositoryPagesSourceOutput { + return o +} + +func (o RepositoryPagesSourceOutput) ToRepositoryPagesSourceOutputWithContext(ctx context.Context) RepositoryPagesSourceOutput { + return o +} + +func (o RepositoryPagesSourceOutput) ToRepositoryPagesSourcePtrOutput() RepositoryPagesSourcePtrOutput { + return o.ToRepositoryPagesSourcePtrOutputWithContext(context.Background()) +} + +func (o RepositoryPagesSourceOutput) ToRepositoryPagesSourcePtrOutputWithContext(ctx context.Context) RepositoryPagesSourcePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryPagesSource) *RepositoryPagesSource { + return &v + }).(RepositoryPagesSourcePtrOutput) +} + +func (o RepositoryPagesSourceOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryPagesSource] { + return pulumix.Output[RepositoryPagesSource]{ + OutputState: o.OutputState, + } +} + +// The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. +func (o RepositoryPagesSourceOutput) Branch() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryPagesSource) string { return v.Branch }).(pulumi.StringOutput) +} + +// The repository directory from which the site publishes (Default: `/`). +func (o RepositoryPagesSourceOutput) Path() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryPagesSource) *string { return v.Path }).(pulumi.StringPtrOutput) +} + +type RepositoryPagesSourcePtrOutput struct{ *pulumi.OutputState } + +func (RepositoryPagesSourcePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryPagesSource)(nil)).Elem() +} + +func (o RepositoryPagesSourcePtrOutput) ToRepositoryPagesSourcePtrOutput() RepositoryPagesSourcePtrOutput { + return o +} + +func (o RepositoryPagesSourcePtrOutput) ToRepositoryPagesSourcePtrOutputWithContext(ctx context.Context) RepositoryPagesSourcePtrOutput { + return o +} + +func (o RepositoryPagesSourcePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryPagesSource] { + return pulumix.Output[*RepositoryPagesSource]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryPagesSourcePtrOutput) Elem() RepositoryPagesSourceOutput { + return o.ApplyT(func(v *RepositoryPagesSource) RepositoryPagesSource { + if v != nil { + return *v + } + var ret RepositoryPagesSource + return ret + }).(RepositoryPagesSourceOutput) +} + +// The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. +func (o RepositoryPagesSourcePtrOutput) Branch() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryPagesSource) *string { + if v == nil { + return nil + } + return &v.Branch + }).(pulumi.StringPtrOutput) +} + +// The repository directory from which the site publishes (Default: `/`). +func (o RepositoryPagesSourcePtrOutput) Path() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryPagesSource) *string { + if v == nil { + return nil + } + return v.Path + }).(pulumi.StringPtrOutput) +} + +type RepositoryRulesetBypassActor struct { + // (Number) The ID of the actor that can bypass a ruleset + ActorId int `pulumi:"actorId"` + // The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + ActorType string `pulumi:"actorType"` + // (String) When the specified actor can bypass the ruleset. pullRequest means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pullRequest`. + BypassMode *string `pulumi:"bypassMode"` +} + +// RepositoryRulesetBypassActorInput is an input type that accepts RepositoryRulesetBypassActorArgs and RepositoryRulesetBypassActorOutput values. +// You can construct a concrete instance of `RepositoryRulesetBypassActorInput` via: +// +// RepositoryRulesetBypassActorArgs{...} +type RepositoryRulesetBypassActorInput interface { + pulumi.Input + + ToRepositoryRulesetBypassActorOutput() RepositoryRulesetBypassActorOutput + ToRepositoryRulesetBypassActorOutputWithContext(context.Context) RepositoryRulesetBypassActorOutput +} + +type RepositoryRulesetBypassActorArgs struct { + // (Number) The ID of the actor that can bypass a ruleset + ActorId pulumi.IntInput `pulumi:"actorId"` + // The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + ActorType pulumi.StringInput `pulumi:"actorType"` + // (String) When the specified actor can bypass the ruleset. pullRequest means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pullRequest`. + BypassMode pulumi.StringPtrInput `pulumi:"bypassMode"` +} + +func (RepositoryRulesetBypassActorArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetBypassActor)(nil)).Elem() +} + +func (i RepositoryRulesetBypassActorArgs) ToRepositoryRulesetBypassActorOutput() RepositoryRulesetBypassActorOutput { + return i.ToRepositoryRulesetBypassActorOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetBypassActorArgs) ToRepositoryRulesetBypassActorOutputWithContext(ctx context.Context) RepositoryRulesetBypassActorOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetBypassActorOutput) +} + +func (i RepositoryRulesetBypassActorArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetBypassActor] { + return pulumix.Output[RepositoryRulesetBypassActor]{ + OutputState: i.ToRepositoryRulesetBypassActorOutputWithContext(ctx).OutputState, + } +} + +// RepositoryRulesetBypassActorArrayInput is an input type that accepts RepositoryRulesetBypassActorArray and RepositoryRulesetBypassActorArrayOutput values. +// You can construct a concrete instance of `RepositoryRulesetBypassActorArrayInput` via: +// +// RepositoryRulesetBypassActorArray{ RepositoryRulesetBypassActorArgs{...} } +type RepositoryRulesetBypassActorArrayInput interface { + pulumi.Input + + ToRepositoryRulesetBypassActorArrayOutput() RepositoryRulesetBypassActorArrayOutput + ToRepositoryRulesetBypassActorArrayOutputWithContext(context.Context) RepositoryRulesetBypassActorArrayOutput +} + +type RepositoryRulesetBypassActorArray []RepositoryRulesetBypassActorInput + +func (RepositoryRulesetBypassActorArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryRulesetBypassActor)(nil)).Elem() +} + +func (i RepositoryRulesetBypassActorArray) ToRepositoryRulesetBypassActorArrayOutput() RepositoryRulesetBypassActorArrayOutput { + return i.ToRepositoryRulesetBypassActorArrayOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetBypassActorArray) ToRepositoryRulesetBypassActorArrayOutputWithContext(ctx context.Context) RepositoryRulesetBypassActorArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetBypassActorArrayOutput) +} + +func (i RepositoryRulesetBypassActorArray) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryRulesetBypassActor] { + return pulumix.Output[[]RepositoryRulesetBypassActor]{ + OutputState: i.ToRepositoryRulesetBypassActorArrayOutputWithContext(ctx).OutputState, + } +} + +type RepositoryRulesetBypassActorOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetBypassActorOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetBypassActor)(nil)).Elem() +} + +func (o RepositoryRulesetBypassActorOutput) ToRepositoryRulesetBypassActorOutput() RepositoryRulesetBypassActorOutput { + return o +} + +func (o RepositoryRulesetBypassActorOutput) ToRepositoryRulesetBypassActorOutputWithContext(ctx context.Context) RepositoryRulesetBypassActorOutput { + return o +} + +func (o RepositoryRulesetBypassActorOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetBypassActor] { + return pulumix.Output[RepositoryRulesetBypassActor]{ + OutputState: o.OutputState, + } +} + +// (Number) The ID of the actor that can bypass a ruleset +func (o RepositoryRulesetBypassActorOutput) ActorId() pulumi.IntOutput { + return o.ApplyT(func(v RepositoryRulesetBypassActor) int { return v.ActorId }).(pulumi.IntOutput) +} + +// The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. +func (o RepositoryRulesetBypassActorOutput) ActorType() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetBypassActor) string { return v.ActorType }).(pulumi.StringOutput) +} + +// (String) When the specified actor can bypass the ruleset. pullRequest means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pullRequest`. +func (o RepositoryRulesetBypassActorOutput) BypassMode() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryRulesetBypassActor) *string { return v.BypassMode }).(pulumi.StringPtrOutput) +} + +type RepositoryRulesetBypassActorArrayOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetBypassActorArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryRulesetBypassActor)(nil)).Elem() +} + +func (o RepositoryRulesetBypassActorArrayOutput) ToRepositoryRulesetBypassActorArrayOutput() RepositoryRulesetBypassActorArrayOutput { + return o +} + +func (o RepositoryRulesetBypassActorArrayOutput) ToRepositoryRulesetBypassActorArrayOutputWithContext(ctx context.Context) RepositoryRulesetBypassActorArrayOutput { + return o +} + +func (o RepositoryRulesetBypassActorArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryRulesetBypassActor] { + return pulumix.Output[[]RepositoryRulesetBypassActor]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryRulesetBypassActorArrayOutput) Index(i pulumi.IntInput) RepositoryRulesetBypassActorOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) RepositoryRulesetBypassActor { + return vs[0].([]RepositoryRulesetBypassActor)[vs[1].(int)] + }).(RepositoryRulesetBypassActorOutput) +} + +type RepositoryRulesetConditions struct { + // (Block List, Min: 1, Max: 1) (see below for nested schema) + RefName RepositoryRulesetConditionsRefName `pulumi:"refName"` +} + +// RepositoryRulesetConditionsInput is an input type that accepts RepositoryRulesetConditionsArgs and RepositoryRulesetConditionsOutput values. +// You can construct a concrete instance of `RepositoryRulesetConditionsInput` via: +// +// RepositoryRulesetConditionsArgs{...} +type RepositoryRulesetConditionsInput interface { + pulumi.Input + + ToRepositoryRulesetConditionsOutput() RepositoryRulesetConditionsOutput + ToRepositoryRulesetConditionsOutputWithContext(context.Context) RepositoryRulesetConditionsOutput +} + +type RepositoryRulesetConditionsArgs struct { + // (Block List, Min: 1, Max: 1) (see below for nested schema) + RefName RepositoryRulesetConditionsRefNameInput `pulumi:"refName"` +} + +func (RepositoryRulesetConditionsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetConditions)(nil)).Elem() +} + +func (i RepositoryRulesetConditionsArgs) ToRepositoryRulesetConditionsOutput() RepositoryRulesetConditionsOutput { + return i.ToRepositoryRulesetConditionsOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetConditionsArgs) ToRepositoryRulesetConditionsOutputWithContext(ctx context.Context) RepositoryRulesetConditionsOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetConditionsOutput) +} + +func (i RepositoryRulesetConditionsArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetConditions] { + return pulumix.Output[RepositoryRulesetConditions]{ + OutputState: i.ToRepositoryRulesetConditionsOutputWithContext(ctx).OutputState, + } +} + +func (i RepositoryRulesetConditionsArgs) ToRepositoryRulesetConditionsPtrOutput() RepositoryRulesetConditionsPtrOutput { + return i.ToRepositoryRulesetConditionsPtrOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetConditionsArgs) ToRepositoryRulesetConditionsPtrOutputWithContext(ctx context.Context) RepositoryRulesetConditionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetConditionsOutput).ToRepositoryRulesetConditionsPtrOutputWithContext(ctx) +} + +// RepositoryRulesetConditionsPtrInput is an input type that accepts RepositoryRulesetConditionsArgs, RepositoryRulesetConditionsPtr and RepositoryRulesetConditionsPtrOutput values. +// You can construct a concrete instance of `RepositoryRulesetConditionsPtrInput` via: +// +// RepositoryRulesetConditionsArgs{...} +// +// or: +// +// nil +type RepositoryRulesetConditionsPtrInput interface { + pulumi.Input + + ToRepositoryRulesetConditionsPtrOutput() RepositoryRulesetConditionsPtrOutput + ToRepositoryRulesetConditionsPtrOutputWithContext(context.Context) RepositoryRulesetConditionsPtrOutput +} + +type repositoryRulesetConditionsPtrType RepositoryRulesetConditionsArgs + +func RepositoryRulesetConditionsPtr(v *RepositoryRulesetConditionsArgs) RepositoryRulesetConditionsPtrInput { + return (*repositoryRulesetConditionsPtrType)(v) +} + +func (*repositoryRulesetConditionsPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetConditions)(nil)).Elem() +} + +func (i *repositoryRulesetConditionsPtrType) ToRepositoryRulesetConditionsPtrOutput() RepositoryRulesetConditionsPtrOutput { + return i.ToRepositoryRulesetConditionsPtrOutputWithContext(context.Background()) +} + +func (i *repositoryRulesetConditionsPtrType) ToRepositoryRulesetConditionsPtrOutputWithContext(ctx context.Context) RepositoryRulesetConditionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetConditionsPtrOutput) +} + +func (i *repositoryRulesetConditionsPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetConditions] { + return pulumix.Output[*RepositoryRulesetConditions]{ + OutputState: i.ToRepositoryRulesetConditionsPtrOutputWithContext(ctx).OutputState, + } +} + +type RepositoryRulesetConditionsOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetConditionsOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetConditions)(nil)).Elem() +} + +func (o RepositoryRulesetConditionsOutput) ToRepositoryRulesetConditionsOutput() RepositoryRulesetConditionsOutput { + return o +} + +func (o RepositoryRulesetConditionsOutput) ToRepositoryRulesetConditionsOutputWithContext(ctx context.Context) RepositoryRulesetConditionsOutput { + return o +} + +func (o RepositoryRulesetConditionsOutput) ToRepositoryRulesetConditionsPtrOutput() RepositoryRulesetConditionsPtrOutput { + return o.ToRepositoryRulesetConditionsPtrOutputWithContext(context.Background()) +} + +func (o RepositoryRulesetConditionsOutput) ToRepositoryRulesetConditionsPtrOutputWithContext(ctx context.Context) RepositoryRulesetConditionsPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryRulesetConditions) *RepositoryRulesetConditions { + return &v + }).(RepositoryRulesetConditionsPtrOutput) +} + +func (o RepositoryRulesetConditionsOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetConditions] { + return pulumix.Output[RepositoryRulesetConditions]{ + OutputState: o.OutputState, + } +} + +// (Block List, Min: 1, Max: 1) (see below for nested schema) +func (o RepositoryRulesetConditionsOutput) RefName() RepositoryRulesetConditionsRefNameOutput { + return o.ApplyT(func(v RepositoryRulesetConditions) RepositoryRulesetConditionsRefName { return v.RefName }).(RepositoryRulesetConditionsRefNameOutput) +} + +type RepositoryRulesetConditionsPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetConditionsPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetConditions)(nil)).Elem() +} + +func (o RepositoryRulesetConditionsPtrOutput) ToRepositoryRulesetConditionsPtrOutput() RepositoryRulesetConditionsPtrOutput { + return o +} + +func (o RepositoryRulesetConditionsPtrOutput) ToRepositoryRulesetConditionsPtrOutputWithContext(ctx context.Context) RepositoryRulesetConditionsPtrOutput { + return o +} + +func (o RepositoryRulesetConditionsPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetConditions] { + return pulumix.Output[*RepositoryRulesetConditions]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryRulesetConditionsPtrOutput) Elem() RepositoryRulesetConditionsOutput { + return o.ApplyT(func(v *RepositoryRulesetConditions) RepositoryRulesetConditions { + if v != nil { + return *v + } + var ret RepositoryRulesetConditions + return ret + }).(RepositoryRulesetConditionsOutput) +} + +// (Block List, Min: 1, Max: 1) (see below for nested schema) +func (o RepositoryRulesetConditionsPtrOutput) RefName() RepositoryRulesetConditionsRefNamePtrOutput { + return o.ApplyT(func(v *RepositoryRulesetConditions) *RepositoryRulesetConditionsRefName { + if v == nil { + return nil + } + return &v.RefName + }).(RepositoryRulesetConditionsRefNamePtrOutput) +} + +type RepositoryRulesetConditionsRefName struct { + // (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + Excludes []string `pulumi:"excludes"` + // (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + Includes []string `pulumi:"includes"` +} + +// RepositoryRulesetConditionsRefNameInput is an input type that accepts RepositoryRulesetConditionsRefNameArgs and RepositoryRulesetConditionsRefNameOutput values. +// You can construct a concrete instance of `RepositoryRulesetConditionsRefNameInput` via: +// +// RepositoryRulesetConditionsRefNameArgs{...} +type RepositoryRulesetConditionsRefNameInput interface { + pulumi.Input + + ToRepositoryRulesetConditionsRefNameOutput() RepositoryRulesetConditionsRefNameOutput + ToRepositoryRulesetConditionsRefNameOutputWithContext(context.Context) RepositoryRulesetConditionsRefNameOutput +} + +type RepositoryRulesetConditionsRefNameArgs struct { + // (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + Excludes pulumi.StringArrayInput `pulumi:"excludes"` + // (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + Includes pulumi.StringArrayInput `pulumi:"includes"` +} + +func (RepositoryRulesetConditionsRefNameArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetConditionsRefName)(nil)).Elem() +} + +func (i RepositoryRulesetConditionsRefNameArgs) ToRepositoryRulesetConditionsRefNameOutput() RepositoryRulesetConditionsRefNameOutput { + return i.ToRepositoryRulesetConditionsRefNameOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetConditionsRefNameArgs) ToRepositoryRulesetConditionsRefNameOutputWithContext(ctx context.Context) RepositoryRulesetConditionsRefNameOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetConditionsRefNameOutput) +} + +func (i RepositoryRulesetConditionsRefNameArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetConditionsRefName] { + return pulumix.Output[RepositoryRulesetConditionsRefName]{ + OutputState: i.ToRepositoryRulesetConditionsRefNameOutputWithContext(ctx).OutputState, + } +} + +func (i RepositoryRulesetConditionsRefNameArgs) ToRepositoryRulesetConditionsRefNamePtrOutput() RepositoryRulesetConditionsRefNamePtrOutput { + return i.ToRepositoryRulesetConditionsRefNamePtrOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetConditionsRefNameArgs) ToRepositoryRulesetConditionsRefNamePtrOutputWithContext(ctx context.Context) RepositoryRulesetConditionsRefNamePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetConditionsRefNameOutput).ToRepositoryRulesetConditionsRefNamePtrOutputWithContext(ctx) +} + +// RepositoryRulesetConditionsRefNamePtrInput is an input type that accepts RepositoryRulesetConditionsRefNameArgs, RepositoryRulesetConditionsRefNamePtr and RepositoryRulesetConditionsRefNamePtrOutput values. +// You can construct a concrete instance of `RepositoryRulesetConditionsRefNamePtrInput` via: +// +// RepositoryRulesetConditionsRefNameArgs{...} +// +// or: +// +// nil +type RepositoryRulesetConditionsRefNamePtrInput interface { + pulumi.Input + + ToRepositoryRulesetConditionsRefNamePtrOutput() RepositoryRulesetConditionsRefNamePtrOutput + ToRepositoryRulesetConditionsRefNamePtrOutputWithContext(context.Context) RepositoryRulesetConditionsRefNamePtrOutput +} + +type repositoryRulesetConditionsRefNamePtrType RepositoryRulesetConditionsRefNameArgs + +func RepositoryRulesetConditionsRefNamePtr(v *RepositoryRulesetConditionsRefNameArgs) RepositoryRulesetConditionsRefNamePtrInput { + return (*repositoryRulesetConditionsRefNamePtrType)(v) +} + +func (*repositoryRulesetConditionsRefNamePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetConditionsRefName)(nil)).Elem() +} + +func (i *repositoryRulesetConditionsRefNamePtrType) ToRepositoryRulesetConditionsRefNamePtrOutput() RepositoryRulesetConditionsRefNamePtrOutput { + return i.ToRepositoryRulesetConditionsRefNamePtrOutputWithContext(context.Background()) +} + +func (i *repositoryRulesetConditionsRefNamePtrType) ToRepositoryRulesetConditionsRefNamePtrOutputWithContext(ctx context.Context) RepositoryRulesetConditionsRefNamePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetConditionsRefNamePtrOutput) +} + +func (i *repositoryRulesetConditionsRefNamePtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetConditionsRefName] { + return pulumix.Output[*RepositoryRulesetConditionsRefName]{ + OutputState: i.ToRepositoryRulesetConditionsRefNamePtrOutputWithContext(ctx).OutputState, + } +} + +type RepositoryRulesetConditionsRefNameOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetConditionsRefNameOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetConditionsRefName)(nil)).Elem() +} + +func (o RepositoryRulesetConditionsRefNameOutput) ToRepositoryRulesetConditionsRefNameOutput() RepositoryRulesetConditionsRefNameOutput { + return o +} + +func (o RepositoryRulesetConditionsRefNameOutput) ToRepositoryRulesetConditionsRefNameOutputWithContext(ctx context.Context) RepositoryRulesetConditionsRefNameOutput { + return o +} + +func (o RepositoryRulesetConditionsRefNameOutput) ToRepositoryRulesetConditionsRefNamePtrOutput() RepositoryRulesetConditionsRefNamePtrOutput { + return o.ToRepositoryRulesetConditionsRefNamePtrOutputWithContext(context.Background()) +} + +func (o RepositoryRulesetConditionsRefNameOutput) ToRepositoryRulesetConditionsRefNamePtrOutputWithContext(ctx context.Context) RepositoryRulesetConditionsRefNamePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryRulesetConditionsRefName) *RepositoryRulesetConditionsRefName { + return &v + }).(RepositoryRulesetConditionsRefNamePtrOutput) +} + +func (o RepositoryRulesetConditionsRefNameOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetConditionsRefName] { + return pulumix.Output[RepositoryRulesetConditionsRefName]{ + OutputState: o.OutputState, + } +} + +// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. +func (o RepositoryRulesetConditionsRefNameOutput) Excludes() pulumi.StringArrayOutput { + return o.ApplyT(func(v RepositoryRulesetConditionsRefName) []string { return v.Excludes }).(pulumi.StringArrayOutput) +} + +// (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. +func (o RepositoryRulesetConditionsRefNameOutput) Includes() pulumi.StringArrayOutput { + return o.ApplyT(func(v RepositoryRulesetConditionsRefName) []string { return v.Includes }).(pulumi.StringArrayOutput) +} + +type RepositoryRulesetConditionsRefNamePtrOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetConditionsRefNamePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetConditionsRefName)(nil)).Elem() +} + +func (o RepositoryRulesetConditionsRefNamePtrOutput) ToRepositoryRulesetConditionsRefNamePtrOutput() RepositoryRulesetConditionsRefNamePtrOutput { + return o +} + +func (o RepositoryRulesetConditionsRefNamePtrOutput) ToRepositoryRulesetConditionsRefNamePtrOutputWithContext(ctx context.Context) RepositoryRulesetConditionsRefNamePtrOutput { + return o +} + +func (o RepositoryRulesetConditionsRefNamePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetConditionsRefName] { + return pulumix.Output[*RepositoryRulesetConditionsRefName]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryRulesetConditionsRefNamePtrOutput) Elem() RepositoryRulesetConditionsRefNameOutput { + return o.ApplyT(func(v *RepositoryRulesetConditionsRefName) RepositoryRulesetConditionsRefName { + if v != nil { + return *v + } + var ret RepositoryRulesetConditionsRefName + return ret + }).(RepositoryRulesetConditionsRefNameOutput) +} + +// (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. +func (o RepositoryRulesetConditionsRefNamePtrOutput) Excludes() pulumi.StringArrayOutput { + return o.ApplyT(func(v *RepositoryRulesetConditionsRefName) []string { + if v == nil { + return nil + } + return v.Excludes + }).(pulumi.StringArrayOutput) +} + +// (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. +func (o RepositoryRulesetConditionsRefNamePtrOutput) Includes() pulumi.StringArrayOutput { + return o.ApplyT(func(v *RepositoryRulesetConditionsRefName) []string { + if v == nil { + return nil + } + return v.Includes + }).(pulumi.StringArrayOutput) +} + +type RepositoryRulesetRules struct { + // (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + BranchNamePattern *RepositoryRulesetRulesBranchNamePattern `pulumi:"branchNamePattern"` + // (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitAuthorEmailPattern *RepositoryRulesetRulesCommitAuthorEmailPattern `pulumi:"commitAuthorEmailPattern"` + // (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitMessagePattern *RepositoryRulesetRulesCommitMessagePattern `pulumi:"commitMessagePattern"` + // (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitterEmailPattern *RepositoryRulesetRulesCommitterEmailPattern `pulumi:"committerEmailPattern"` + // (Boolean) Only allow users with bypass permission to create matching refs. + Creation *bool `pulumi:"creation"` + // (Boolean) Only allow users with bypass permissions to delete matching refs. + Deletion *bool `pulumi:"deletion"` + // (Boolean) Prevent users with push access from force pushing to branches. + NonFastForward *bool `pulumi:"nonFastForward"` + // (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + PullRequest *RepositoryRulesetRulesPullRequest `pulumi:"pullRequest"` + // (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + RequiredDeployments *RepositoryRulesetRulesRequiredDeployments `pulumi:"requiredDeployments"` + // (Boolean) Prevent merge commits from being pushed to matching branches. + RequiredLinearHistory *bool `pulumi:"requiredLinearHistory"` + // (Boolean) Commits pushed to matching branches must have verified signatures. + RequiredSignatures *bool `pulumi:"requiredSignatures"` + // (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + RequiredStatusChecks *RepositoryRulesetRulesRequiredStatusChecks `pulumi:"requiredStatusChecks"` + // (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + TagNamePattern *RepositoryRulesetRulesTagNamePattern `pulumi:"tagNamePattern"` + // (Boolean) Only allow users with bypass permission to update matching refs. + Update *bool `pulumi:"update"` + // (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + UpdateAllowsFetchAndMerge *bool `pulumi:"updateAllowsFetchAndMerge"` +} + +// RepositoryRulesetRulesInput is an input type that accepts RepositoryRulesetRulesArgs and RepositoryRulesetRulesOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesInput` via: +// +// RepositoryRulesetRulesArgs{...} +type RepositoryRulesetRulesInput interface { + pulumi.Input + + ToRepositoryRulesetRulesOutput() RepositoryRulesetRulesOutput + ToRepositoryRulesetRulesOutputWithContext(context.Context) RepositoryRulesetRulesOutput +} + +type RepositoryRulesetRulesArgs struct { + // (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + BranchNamePattern RepositoryRulesetRulesBranchNamePatternPtrInput `pulumi:"branchNamePattern"` + // (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitAuthorEmailPattern RepositoryRulesetRulesCommitAuthorEmailPatternPtrInput `pulumi:"commitAuthorEmailPattern"` + // (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitMessagePattern RepositoryRulesetRulesCommitMessagePatternPtrInput `pulumi:"commitMessagePattern"` + // (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + CommitterEmailPattern RepositoryRulesetRulesCommitterEmailPatternPtrInput `pulumi:"committerEmailPattern"` + // (Boolean) Only allow users with bypass permission to create matching refs. + Creation pulumi.BoolPtrInput `pulumi:"creation"` + // (Boolean) Only allow users with bypass permissions to delete matching refs. + Deletion pulumi.BoolPtrInput `pulumi:"deletion"` + // (Boolean) Prevent users with push access from force pushing to branches. + NonFastForward pulumi.BoolPtrInput `pulumi:"nonFastForward"` + // (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + PullRequest RepositoryRulesetRulesPullRequestPtrInput `pulumi:"pullRequest"` + // (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + RequiredDeployments RepositoryRulesetRulesRequiredDeploymentsPtrInput `pulumi:"requiredDeployments"` + // (Boolean) Prevent merge commits from being pushed to matching branches. + RequiredLinearHistory pulumi.BoolPtrInput `pulumi:"requiredLinearHistory"` + // (Boolean) Commits pushed to matching branches must have verified signatures. + RequiredSignatures pulumi.BoolPtrInput `pulumi:"requiredSignatures"` + // (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + RequiredStatusChecks RepositoryRulesetRulesRequiredStatusChecksPtrInput `pulumi:"requiredStatusChecks"` + // (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + TagNamePattern RepositoryRulesetRulesTagNamePatternPtrInput `pulumi:"tagNamePattern"` + // (Boolean) Only allow users with bypass permission to update matching refs. + Update pulumi.BoolPtrInput `pulumi:"update"` + // (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + UpdateAllowsFetchAndMerge pulumi.BoolPtrInput `pulumi:"updateAllowsFetchAndMerge"` +} + +func (RepositoryRulesetRulesArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRules)(nil)).Elem() +} + +func (i RepositoryRulesetRulesArgs) ToRepositoryRulesetRulesOutput() RepositoryRulesetRulesOutput { + return i.ToRepositoryRulesetRulesOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesArgs) ToRepositoryRulesetRulesOutputWithContext(ctx context.Context) RepositoryRulesetRulesOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesOutput) +} + +func (i RepositoryRulesetRulesArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRules] { + return pulumix.Output[RepositoryRulesetRules]{ + OutputState: i.ToRepositoryRulesetRulesOutputWithContext(ctx).OutputState, + } +} + +func (i RepositoryRulesetRulesArgs) ToRepositoryRulesetRulesPtrOutput() RepositoryRulesetRulesPtrOutput { + return i.ToRepositoryRulesetRulesPtrOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesArgs) ToRepositoryRulesetRulesPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesOutput).ToRepositoryRulesetRulesPtrOutputWithContext(ctx) +} + +// RepositoryRulesetRulesPtrInput is an input type that accepts RepositoryRulesetRulesArgs, RepositoryRulesetRulesPtr and RepositoryRulesetRulesPtrOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesPtrInput` via: +// +// RepositoryRulesetRulesArgs{...} +// +// or: +// +// nil +type RepositoryRulesetRulesPtrInput interface { + pulumi.Input + + ToRepositoryRulesetRulesPtrOutput() RepositoryRulesetRulesPtrOutput + ToRepositoryRulesetRulesPtrOutputWithContext(context.Context) RepositoryRulesetRulesPtrOutput +} + +type repositoryRulesetRulesPtrType RepositoryRulesetRulesArgs + +func RepositoryRulesetRulesPtr(v *RepositoryRulesetRulesArgs) RepositoryRulesetRulesPtrInput { + return (*repositoryRulesetRulesPtrType)(v) +} + +func (*repositoryRulesetRulesPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRules)(nil)).Elem() +} + +func (i *repositoryRulesetRulesPtrType) ToRepositoryRulesetRulesPtrOutput() RepositoryRulesetRulesPtrOutput { + return i.ToRepositoryRulesetRulesPtrOutputWithContext(context.Background()) +} + +func (i *repositoryRulesetRulesPtrType) ToRepositoryRulesetRulesPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesPtrOutput) +} + +func (i *repositoryRulesetRulesPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRules] { + return pulumix.Output[*RepositoryRulesetRules]{ + OutputState: i.ToRepositoryRulesetRulesPtrOutputWithContext(ctx).OutputState, + } +} + +type RepositoryRulesetRulesOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRules)(nil)).Elem() +} + +func (o RepositoryRulesetRulesOutput) ToRepositoryRulesetRulesOutput() RepositoryRulesetRulesOutput { + return o +} + +func (o RepositoryRulesetRulesOutput) ToRepositoryRulesetRulesOutputWithContext(ctx context.Context) RepositoryRulesetRulesOutput { + return o +} + +func (o RepositoryRulesetRulesOutput) ToRepositoryRulesetRulesPtrOutput() RepositoryRulesetRulesPtrOutput { + return o.ToRepositoryRulesetRulesPtrOutputWithContext(context.Background()) +} + +func (o RepositoryRulesetRulesOutput) ToRepositoryRulesetRulesPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryRulesetRules) *RepositoryRulesetRules { + return &v + }).(RepositoryRulesetRulesPtrOutput) +} + +func (o RepositoryRulesetRulesOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRules] { + return pulumix.Output[RepositoryRulesetRules]{ + OutputState: o.OutputState, + } +} + +// (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applied to rulesets with target `branch`. (see below for nested schema) +func (o RepositoryRulesetRulesOutput) BranchNamePattern() RepositoryRulesetRulesBranchNamePatternPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *RepositoryRulesetRulesBranchNamePattern { return v.BranchNamePattern }).(RepositoryRulesetRulesBranchNamePatternPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o RepositoryRulesetRulesOutput) CommitAuthorEmailPattern() RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *RepositoryRulesetRulesCommitAuthorEmailPattern { + return v.CommitAuthorEmailPattern + }).(RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o RepositoryRulesetRulesOutput) CommitMessagePattern() RepositoryRulesetRulesCommitMessagePatternPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *RepositoryRulesetRulesCommitMessagePattern { + return v.CommitMessagePattern + }).(RepositoryRulesetRulesCommitMessagePatternPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o RepositoryRulesetRulesOutput) CommitterEmailPattern() RepositoryRulesetRulesCommitterEmailPatternPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *RepositoryRulesetRulesCommitterEmailPattern { + return v.CommitterEmailPattern + }).(RepositoryRulesetRulesCommitterEmailPatternPtrOutput) +} + +// (Boolean) Only allow users with bypass permission to create matching refs. +func (o RepositoryRulesetRulesOutput) Creation() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *bool { return v.Creation }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Only allow users with bypass permissions to delete matching refs. +func (o RepositoryRulesetRulesOutput) Deletion() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *bool { return v.Deletion }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Prevent users with push access from force pushing to branches. +func (o RepositoryRulesetRulesOutput) NonFastForward() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *bool { return v.NonFastForward }).(pulumi.BoolPtrOutput) +} + +// (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) +func (o RepositoryRulesetRulesOutput) PullRequest() RepositoryRulesetRulesPullRequestPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *RepositoryRulesetRulesPullRequest { return v.PullRequest }).(RepositoryRulesetRulesPullRequestPtrOutput) +} + +// (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) +func (o RepositoryRulesetRulesOutput) RequiredDeployments() RepositoryRulesetRulesRequiredDeploymentsPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *RepositoryRulesetRulesRequiredDeployments { + return v.RequiredDeployments + }).(RepositoryRulesetRulesRequiredDeploymentsPtrOutput) +} + +// (Boolean) Prevent merge commits from being pushed to matching branches. +func (o RepositoryRulesetRulesOutput) RequiredLinearHistory() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *bool { return v.RequiredLinearHistory }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Commits pushed to matching branches must have verified signatures. +func (o RepositoryRulesetRulesOutput) RequiredSignatures() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *bool { return v.RequiredSignatures }).(pulumi.BoolPtrOutput) +} + +// (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) +func (o RepositoryRulesetRulesOutput) RequiredStatusChecks() RepositoryRulesetRulesRequiredStatusChecksPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *RepositoryRulesetRulesRequiredStatusChecks { + return v.RequiredStatusChecks + }).(RepositoryRulesetRulesRequiredStatusChecksPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applied to rulesets with target `tag`. (see below for nested schema) +func (o RepositoryRulesetRulesOutput) TagNamePattern() RepositoryRulesetRulesTagNamePatternPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *RepositoryRulesetRulesTagNamePattern { return v.TagNamePattern }).(RepositoryRulesetRulesTagNamePatternPtrOutput) +} + +// (Boolean) Only allow users with bypass permission to update matching refs. +func (o RepositoryRulesetRulesOutput) Update() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *bool { return v.Update }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. +func (o RepositoryRulesetRulesOutput) UpdateAllowsFetchAndMerge() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRules) *bool { return v.UpdateAllowsFetchAndMerge }).(pulumi.BoolPtrOutput) +} + +type RepositoryRulesetRulesPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRules)(nil)).Elem() +} + +func (o RepositoryRulesetRulesPtrOutput) ToRepositoryRulesetRulesPtrOutput() RepositoryRulesetRulesPtrOutput { + return o +} + +func (o RepositoryRulesetRulesPtrOutput) ToRepositoryRulesetRulesPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesPtrOutput { + return o +} + +func (o RepositoryRulesetRulesPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRules] { + return pulumix.Output[*RepositoryRulesetRules]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryRulesetRulesPtrOutput) Elem() RepositoryRulesetRulesOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) RepositoryRulesetRules { + if v != nil { + return *v + } + var ret RepositoryRulesetRules + return ret + }).(RepositoryRulesetRulesOutput) +} + +// (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applied to rulesets with target `branch`. (see below for nested schema) +func (o RepositoryRulesetRulesPtrOutput) BranchNamePattern() RepositoryRulesetRulesBranchNamePatternPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *RepositoryRulesetRulesBranchNamePattern { + if v == nil { + return nil + } + return v.BranchNamePattern + }).(RepositoryRulesetRulesBranchNamePatternPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o RepositoryRulesetRulesPtrOutput) CommitAuthorEmailPattern() RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *RepositoryRulesetRulesCommitAuthorEmailPattern { + if v == nil { + return nil + } + return v.CommitAuthorEmailPattern + }).(RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o RepositoryRulesetRulesPtrOutput) CommitMessagePattern() RepositoryRulesetRulesCommitMessagePatternPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *RepositoryRulesetRulesCommitMessagePattern { + if v == nil { + return nil + } + return v.CommitMessagePattern + }).(RepositoryRulesetRulesCommitMessagePatternPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) +func (o RepositoryRulesetRulesPtrOutput) CommitterEmailPattern() RepositoryRulesetRulesCommitterEmailPatternPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *RepositoryRulesetRulesCommitterEmailPattern { + if v == nil { + return nil + } + return v.CommitterEmailPattern + }).(RepositoryRulesetRulesCommitterEmailPatternPtrOutput) +} + +// (Boolean) Only allow users with bypass permission to create matching refs. +func (o RepositoryRulesetRulesPtrOutput) Creation() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *bool { + if v == nil { + return nil + } + return v.Creation + }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Only allow users with bypass permissions to delete matching refs. +func (o RepositoryRulesetRulesPtrOutput) Deletion() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *bool { + if v == nil { + return nil + } + return v.Deletion + }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Prevent users with push access from force pushing to branches. +func (o RepositoryRulesetRulesPtrOutput) NonFastForward() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *bool { + if v == nil { + return nil + } + return v.NonFastForward + }).(pulumi.BoolPtrOutput) +} + +// (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) +func (o RepositoryRulesetRulesPtrOutput) PullRequest() RepositoryRulesetRulesPullRequestPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *RepositoryRulesetRulesPullRequest { + if v == nil { + return nil + } + return v.PullRequest + }).(RepositoryRulesetRulesPullRequestPtrOutput) +} + +// (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) +func (o RepositoryRulesetRulesPtrOutput) RequiredDeployments() RepositoryRulesetRulesRequiredDeploymentsPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *RepositoryRulesetRulesRequiredDeployments { + if v == nil { + return nil + } + return v.RequiredDeployments + }).(RepositoryRulesetRulesRequiredDeploymentsPtrOutput) +} + +// (Boolean) Prevent merge commits from being pushed to matching branches. +func (o RepositoryRulesetRulesPtrOutput) RequiredLinearHistory() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *bool { + if v == nil { + return nil + } + return v.RequiredLinearHistory + }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Commits pushed to matching branches must have verified signatures. +func (o RepositoryRulesetRulesPtrOutput) RequiredSignatures() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *bool { + if v == nil { + return nil + } + return v.RequiredSignatures + }).(pulumi.BoolPtrOutput) +} + +// (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) +func (o RepositoryRulesetRulesPtrOutput) RequiredStatusChecks() RepositoryRulesetRulesRequiredStatusChecksPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *RepositoryRulesetRulesRequiredStatusChecks { + if v == nil { + return nil + } + return v.RequiredStatusChecks + }).(RepositoryRulesetRulesRequiredStatusChecksPtrOutput) +} + +// (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applied to rulesets with target `tag`. (see below for nested schema) +func (o RepositoryRulesetRulesPtrOutput) TagNamePattern() RepositoryRulesetRulesTagNamePatternPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *RepositoryRulesetRulesTagNamePattern { + if v == nil { + return nil + } + return v.TagNamePattern + }).(RepositoryRulesetRulesTagNamePatternPtrOutput) +} + +// (Boolean) Only allow users with bypass permission to update matching refs. +func (o RepositoryRulesetRulesPtrOutput) Update() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *bool { + if v == nil { + return nil + } + return v.Update + }).(pulumi.BoolPtrOutput) +} + +// (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. +func (o RepositoryRulesetRulesPtrOutput) UpdateAllowsFetchAndMerge() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRules) *bool { + if v == nil { + return nil + } + return v.UpdateAllowsFetchAndMerge + }).(pulumi.BoolPtrOutput) +} + +type RepositoryRulesetRulesBranchNamePattern struct { + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate *bool `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator string `pulumi:"operator"` + // (String) The pattern to match with. + Pattern string `pulumi:"pattern"` +} + +// RepositoryRulesetRulesBranchNamePatternInput is an input type that accepts RepositoryRulesetRulesBranchNamePatternArgs and RepositoryRulesetRulesBranchNamePatternOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesBranchNamePatternInput` via: +// +// RepositoryRulesetRulesBranchNamePatternArgs{...} +type RepositoryRulesetRulesBranchNamePatternInput interface { + pulumi.Input + + ToRepositoryRulesetRulesBranchNamePatternOutput() RepositoryRulesetRulesBranchNamePatternOutput + ToRepositoryRulesetRulesBranchNamePatternOutputWithContext(context.Context) RepositoryRulesetRulesBranchNamePatternOutput +} + +type RepositoryRulesetRulesBranchNamePatternArgs struct { + // (String) The name of the ruleset. + Name pulumi.StringPtrInput `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate pulumi.BoolPtrInput `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator pulumi.StringInput `pulumi:"operator"` + // (String) The pattern to match with. + Pattern pulumi.StringInput `pulumi:"pattern"` +} + +func (RepositoryRulesetRulesBranchNamePatternArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesBranchNamePattern)(nil)).Elem() +} + +func (i RepositoryRulesetRulesBranchNamePatternArgs) ToRepositoryRulesetRulesBranchNamePatternOutput() RepositoryRulesetRulesBranchNamePatternOutput { + return i.ToRepositoryRulesetRulesBranchNamePatternOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesBranchNamePatternArgs) ToRepositoryRulesetRulesBranchNamePatternOutputWithContext(ctx context.Context) RepositoryRulesetRulesBranchNamePatternOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesBranchNamePatternOutput) +} + +func (i RepositoryRulesetRulesBranchNamePatternArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesBranchNamePattern] { + return pulumix.Output[RepositoryRulesetRulesBranchNamePattern]{ + OutputState: i.ToRepositoryRulesetRulesBranchNamePatternOutputWithContext(ctx).OutputState, + } +} + +func (i RepositoryRulesetRulesBranchNamePatternArgs) ToRepositoryRulesetRulesBranchNamePatternPtrOutput() RepositoryRulesetRulesBranchNamePatternPtrOutput { + return i.ToRepositoryRulesetRulesBranchNamePatternPtrOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesBranchNamePatternArgs) ToRepositoryRulesetRulesBranchNamePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesBranchNamePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesBranchNamePatternOutput).ToRepositoryRulesetRulesBranchNamePatternPtrOutputWithContext(ctx) +} + +// RepositoryRulesetRulesBranchNamePatternPtrInput is an input type that accepts RepositoryRulesetRulesBranchNamePatternArgs, RepositoryRulesetRulesBranchNamePatternPtr and RepositoryRulesetRulesBranchNamePatternPtrOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesBranchNamePatternPtrInput` via: +// +// RepositoryRulesetRulesBranchNamePatternArgs{...} +// +// or: +// +// nil +type RepositoryRulesetRulesBranchNamePatternPtrInput interface { + pulumi.Input + + ToRepositoryRulesetRulesBranchNamePatternPtrOutput() RepositoryRulesetRulesBranchNamePatternPtrOutput + ToRepositoryRulesetRulesBranchNamePatternPtrOutputWithContext(context.Context) RepositoryRulesetRulesBranchNamePatternPtrOutput +} + +type repositoryRulesetRulesBranchNamePatternPtrType RepositoryRulesetRulesBranchNamePatternArgs + +func RepositoryRulesetRulesBranchNamePatternPtr(v *RepositoryRulesetRulesBranchNamePatternArgs) RepositoryRulesetRulesBranchNamePatternPtrInput { + return (*repositoryRulesetRulesBranchNamePatternPtrType)(v) +} + +func (*repositoryRulesetRulesBranchNamePatternPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesBranchNamePattern)(nil)).Elem() +} + +func (i *repositoryRulesetRulesBranchNamePatternPtrType) ToRepositoryRulesetRulesBranchNamePatternPtrOutput() RepositoryRulesetRulesBranchNamePatternPtrOutput { + return i.ToRepositoryRulesetRulesBranchNamePatternPtrOutputWithContext(context.Background()) +} + +func (i *repositoryRulesetRulesBranchNamePatternPtrType) ToRepositoryRulesetRulesBranchNamePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesBranchNamePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesBranchNamePatternPtrOutput) +} + +func (i *repositoryRulesetRulesBranchNamePatternPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesBranchNamePattern] { + return pulumix.Output[*RepositoryRulesetRulesBranchNamePattern]{ + OutputState: i.ToRepositoryRulesetRulesBranchNamePatternPtrOutputWithContext(ctx).OutputState, + } +} + +type RepositoryRulesetRulesBranchNamePatternOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesBranchNamePatternOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesBranchNamePattern)(nil)).Elem() +} + +func (o RepositoryRulesetRulesBranchNamePatternOutput) ToRepositoryRulesetRulesBranchNamePatternOutput() RepositoryRulesetRulesBranchNamePatternOutput { + return o +} + +func (o RepositoryRulesetRulesBranchNamePatternOutput) ToRepositoryRulesetRulesBranchNamePatternOutputWithContext(ctx context.Context) RepositoryRulesetRulesBranchNamePatternOutput { + return o +} + +func (o RepositoryRulesetRulesBranchNamePatternOutput) ToRepositoryRulesetRulesBranchNamePatternPtrOutput() RepositoryRulesetRulesBranchNamePatternPtrOutput { + return o.ToRepositoryRulesetRulesBranchNamePatternPtrOutputWithContext(context.Background()) +} + +func (o RepositoryRulesetRulesBranchNamePatternOutput) ToRepositoryRulesetRulesBranchNamePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesBranchNamePatternPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryRulesetRulesBranchNamePattern) *RepositoryRulesetRulesBranchNamePattern { + return &v + }).(RepositoryRulesetRulesBranchNamePatternPtrOutput) +} + +func (o RepositoryRulesetRulesBranchNamePatternOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesBranchNamePattern] { + return pulumix.Output[RepositoryRulesetRulesBranchNamePattern]{ + OutputState: o.OutputState, + } +} + +// (String) The name of the ruleset. +func (o RepositoryRulesetRulesBranchNamePatternOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesBranchNamePattern) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o RepositoryRulesetRulesBranchNamePatternOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesBranchNamePattern) *bool { return v.Negate }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o RepositoryRulesetRulesBranchNamePatternOutput) Operator() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetRulesBranchNamePattern) string { return v.Operator }).(pulumi.StringOutput) +} + +// (String) The pattern to match with. +func (o RepositoryRulesetRulesBranchNamePatternOutput) Pattern() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetRulesBranchNamePattern) string { return v.Pattern }).(pulumi.StringOutput) +} + +type RepositoryRulesetRulesBranchNamePatternPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesBranchNamePatternPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesBranchNamePattern)(nil)).Elem() +} + +func (o RepositoryRulesetRulesBranchNamePatternPtrOutput) ToRepositoryRulesetRulesBranchNamePatternPtrOutput() RepositoryRulesetRulesBranchNamePatternPtrOutput { + return o +} + +func (o RepositoryRulesetRulesBranchNamePatternPtrOutput) ToRepositoryRulesetRulesBranchNamePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesBranchNamePatternPtrOutput { + return o +} + +func (o RepositoryRulesetRulesBranchNamePatternPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesBranchNamePattern] { + return pulumix.Output[*RepositoryRulesetRulesBranchNamePattern]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryRulesetRulesBranchNamePatternPtrOutput) Elem() RepositoryRulesetRulesBranchNamePatternOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesBranchNamePattern) RepositoryRulesetRulesBranchNamePattern { + if v != nil { + return *v + } + var ret RepositoryRulesetRulesBranchNamePattern + return ret + }).(RepositoryRulesetRulesBranchNamePatternOutput) +} + +// (String) The name of the ruleset. +func (o RepositoryRulesetRulesBranchNamePatternPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesBranchNamePattern) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o RepositoryRulesetRulesBranchNamePatternPtrOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesBranchNamePattern) *bool { + if v == nil { + return nil + } + return v.Negate + }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o RepositoryRulesetRulesBranchNamePatternPtrOutput) Operator() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesBranchNamePattern) *string { + if v == nil { + return nil + } + return &v.Operator + }).(pulumi.StringPtrOutput) +} + +// (String) The pattern to match with. +func (o RepositoryRulesetRulesBranchNamePatternPtrOutput) Pattern() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesBranchNamePattern) *string { + if v == nil { + return nil + } + return &v.Pattern + }).(pulumi.StringPtrOutput) +} + +type RepositoryRulesetRulesCommitAuthorEmailPattern struct { + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate *bool `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator string `pulumi:"operator"` + // (String) The pattern to match with. + Pattern string `pulumi:"pattern"` +} + +// RepositoryRulesetRulesCommitAuthorEmailPatternInput is an input type that accepts RepositoryRulesetRulesCommitAuthorEmailPatternArgs and RepositoryRulesetRulesCommitAuthorEmailPatternOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesCommitAuthorEmailPatternInput` via: +// +// RepositoryRulesetRulesCommitAuthorEmailPatternArgs{...} +type RepositoryRulesetRulesCommitAuthorEmailPatternInput interface { + pulumi.Input + + ToRepositoryRulesetRulesCommitAuthorEmailPatternOutput() RepositoryRulesetRulesCommitAuthorEmailPatternOutput + ToRepositoryRulesetRulesCommitAuthorEmailPatternOutputWithContext(context.Context) RepositoryRulesetRulesCommitAuthorEmailPatternOutput +} + +type RepositoryRulesetRulesCommitAuthorEmailPatternArgs struct { + // (String) The name of the ruleset. + Name pulumi.StringPtrInput `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate pulumi.BoolPtrInput `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator pulumi.StringInput `pulumi:"operator"` + // (String) The pattern to match with. + Pattern pulumi.StringInput `pulumi:"pattern"` +} + +func (RepositoryRulesetRulesCommitAuthorEmailPatternArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesCommitAuthorEmailPattern)(nil)).Elem() +} + +func (i RepositoryRulesetRulesCommitAuthorEmailPatternArgs) ToRepositoryRulesetRulesCommitAuthorEmailPatternOutput() RepositoryRulesetRulesCommitAuthorEmailPatternOutput { + return i.ToRepositoryRulesetRulesCommitAuthorEmailPatternOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesCommitAuthorEmailPatternArgs) ToRepositoryRulesetRulesCommitAuthorEmailPatternOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitAuthorEmailPatternOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesCommitAuthorEmailPatternOutput) +} + +func (i RepositoryRulesetRulesCommitAuthorEmailPatternArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesCommitAuthorEmailPattern] { + return pulumix.Output[RepositoryRulesetRulesCommitAuthorEmailPattern]{ + OutputState: i.ToRepositoryRulesetRulesCommitAuthorEmailPatternOutputWithContext(ctx).OutputState, + } +} + +func (i RepositoryRulesetRulesCommitAuthorEmailPatternArgs) ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput() RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput { + return i.ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesCommitAuthorEmailPatternArgs) ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesCommitAuthorEmailPatternOutput).ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx) +} + +// RepositoryRulesetRulesCommitAuthorEmailPatternPtrInput is an input type that accepts RepositoryRulesetRulesCommitAuthorEmailPatternArgs, RepositoryRulesetRulesCommitAuthorEmailPatternPtr and RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesCommitAuthorEmailPatternPtrInput` via: +// +// RepositoryRulesetRulesCommitAuthorEmailPatternArgs{...} +// +// or: +// +// nil +type RepositoryRulesetRulesCommitAuthorEmailPatternPtrInput interface { + pulumi.Input + + ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput() RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput + ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(context.Context) RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput +} + +type repositoryRulesetRulesCommitAuthorEmailPatternPtrType RepositoryRulesetRulesCommitAuthorEmailPatternArgs + +func RepositoryRulesetRulesCommitAuthorEmailPatternPtr(v *RepositoryRulesetRulesCommitAuthorEmailPatternArgs) RepositoryRulesetRulesCommitAuthorEmailPatternPtrInput { + return (*repositoryRulesetRulesCommitAuthorEmailPatternPtrType)(v) +} + +func (*repositoryRulesetRulesCommitAuthorEmailPatternPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesCommitAuthorEmailPattern)(nil)).Elem() +} + +func (i *repositoryRulesetRulesCommitAuthorEmailPatternPtrType) ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput() RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput { + return i.ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(context.Background()) +} + +func (i *repositoryRulesetRulesCommitAuthorEmailPatternPtrType) ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) +} + +func (i *repositoryRulesetRulesCommitAuthorEmailPatternPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesCommitAuthorEmailPattern] { + return pulumix.Output[*RepositoryRulesetRulesCommitAuthorEmailPattern]{ + OutputState: i.ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx).OutputState, + } +} + +type RepositoryRulesetRulesCommitAuthorEmailPatternOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesCommitAuthorEmailPatternOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesCommitAuthorEmailPattern)(nil)).Elem() +} + +func (o RepositoryRulesetRulesCommitAuthorEmailPatternOutput) ToRepositoryRulesetRulesCommitAuthorEmailPatternOutput() RepositoryRulesetRulesCommitAuthorEmailPatternOutput { + return o +} + +func (o RepositoryRulesetRulesCommitAuthorEmailPatternOutput) ToRepositoryRulesetRulesCommitAuthorEmailPatternOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitAuthorEmailPatternOutput { + return o +} + +func (o RepositoryRulesetRulesCommitAuthorEmailPatternOutput) ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput() RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o.ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(context.Background()) +} + +func (o RepositoryRulesetRulesCommitAuthorEmailPatternOutput) ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryRulesetRulesCommitAuthorEmailPattern) *RepositoryRulesetRulesCommitAuthorEmailPattern { + return &v + }).(RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) +} + +func (o RepositoryRulesetRulesCommitAuthorEmailPatternOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesCommitAuthorEmailPattern] { + return pulumix.Output[RepositoryRulesetRulesCommitAuthorEmailPattern]{ + OutputState: o.OutputState, + } +} + +// (String) The name of the ruleset. +func (o RepositoryRulesetRulesCommitAuthorEmailPatternOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitAuthorEmailPattern) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o RepositoryRulesetRulesCommitAuthorEmailPatternOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitAuthorEmailPattern) *bool { return v.Negate }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o RepositoryRulesetRulesCommitAuthorEmailPatternOutput) Operator() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitAuthorEmailPattern) string { return v.Operator }).(pulumi.StringOutput) +} + +// (String) The pattern to match with. +func (o RepositoryRulesetRulesCommitAuthorEmailPatternOutput) Pattern() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitAuthorEmailPattern) string { return v.Pattern }).(pulumi.StringOutput) +} + +type RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesCommitAuthorEmailPattern)(nil)).Elem() +} + +func (o RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput() RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o +} + +func (o RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) ToRepositoryRulesetRulesCommitAuthorEmailPatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput { + return o +} + +func (o RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesCommitAuthorEmailPattern] { + return pulumix.Output[*RepositoryRulesetRulesCommitAuthorEmailPattern]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) Elem() RepositoryRulesetRulesCommitAuthorEmailPatternOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitAuthorEmailPattern) RepositoryRulesetRulesCommitAuthorEmailPattern { + if v != nil { + return *v + } + var ret RepositoryRulesetRulesCommitAuthorEmailPattern + return ret + }).(RepositoryRulesetRulesCommitAuthorEmailPatternOutput) +} + +// (String) The name of the ruleset. +func (o RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitAuthorEmailPattern) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitAuthorEmailPattern) *bool { + if v == nil { + return nil + } + return v.Negate + }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) Operator() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitAuthorEmailPattern) *string { + if v == nil { + return nil + } + return &v.Operator + }).(pulumi.StringPtrOutput) +} + +// (String) The pattern to match with. +func (o RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput) Pattern() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitAuthorEmailPattern) *string { + if v == nil { + return nil + } + return &v.Pattern + }).(pulumi.StringPtrOutput) +} + +type RepositoryRulesetRulesCommitMessagePattern struct { + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate *bool `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator string `pulumi:"operator"` + // (String) The pattern to match with. + Pattern string `pulumi:"pattern"` +} + +// RepositoryRulesetRulesCommitMessagePatternInput is an input type that accepts RepositoryRulesetRulesCommitMessagePatternArgs and RepositoryRulesetRulesCommitMessagePatternOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesCommitMessagePatternInput` via: +// +// RepositoryRulesetRulesCommitMessagePatternArgs{...} +type RepositoryRulesetRulesCommitMessagePatternInput interface { + pulumi.Input + + ToRepositoryRulesetRulesCommitMessagePatternOutput() RepositoryRulesetRulesCommitMessagePatternOutput + ToRepositoryRulesetRulesCommitMessagePatternOutputWithContext(context.Context) RepositoryRulesetRulesCommitMessagePatternOutput +} + +type RepositoryRulesetRulesCommitMessagePatternArgs struct { + // (String) The name of the ruleset. + Name pulumi.StringPtrInput `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate pulumi.BoolPtrInput `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator pulumi.StringInput `pulumi:"operator"` + // (String) The pattern to match with. + Pattern pulumi.StringInput `pulumi:"pattern"` +} + +func (RepositoryRulesetRulesCommitMessagePatternArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesCommitMessagePattern)(nil)).Elem() +} + +func (i RepositoryRulesetRulesCommitMessagePatternArgs) ToRepositoryRulesetRulesCommitMessagePatternOutput() RepositoryRulesetRulesCommitMessagePatternOutput { + return i.ToRepositoryRulesetRulesCommitMessagePatternOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesCommitMessagePatternArgs) ToRepositoryRulesetRulesCommitMessagePatternOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitMessagePatternOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesCommitMessagePatternOutput) +} + +func (i RepositoryRulesetRulesCommitMessagePatternArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesCommitMessagePattern] { + return pulumix.Output[RepositoryRulesetRulesCommitMessagePattern]{ + OutputState: i.ToRepositoryRulesetRulesCommitMessagePatternOutputWithContext(ctx).OutputState, + } +} + +func (i RepositoryRulesetRulesCommitMessagePatternArgs) ToRepositoryRulesetRulesCommitMessagePatternPtrOutput() RepositoryRulesetRulesCommitMessagePatternPtrOutput { + return i.ToRepositoryRulesetRulesCommitMessagePatternPtrOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesCommitMessagePatternArgs) ToRepositoryRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitMessagePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesCommitMessagePatternOutput).ToRepositoryRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx) +} + +// RepositoryRulesetRulesCommitMessagePatternPtrInput is an input type that accepts RepositoryRulesetRulesCommitMessagePatternArgs, RepositoryRulesetRulesCommitMessagePatternPtr and RepositoryRulesetRulesCommitMessagePatternPtrOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesCommitMessagePatternPtrInput` via: +// +// RepositoryRulesetRulesCommitMessagePatternArgs{...} +// +// or: +// +// nil +type RepositoryRulesetRulesCommitMessagePatternPtrInput interface { + pulumi.Input + + ToRepositoryRulesetRulesCommitMessagePatternPtrOutput() RepositoryRulesetRulesCommitMessagePatternPtrOutput + ToRepositoryRulesetRulesCommitMessagePatternPtrOutputWithContext(context.Context) RepositoryRulesetRulesCommitMessagePatternPtrOutput +} + +type repositoryRulesetRulesCommitMessagePatternPtrType RepositoryRulesetRulesCommitMessagePatternArgs + +func RepositoryRulesetRulesCommitMessagePatternPtr(v *RepositoryRulesetRulesCommitMessagePatternArgs) RepositoryRulesetRulesCommitMessagePatternPtrInput { + return (*repositoryRulesetRulesCommitMessagePatternPtrType)(v) +} + +func (*repositoryRulesetRulesCommitMessagePatternPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesCommitMessagePattern)(nil)).Elem() +} + +func (i *repositoryRulesetRulesCommitMessagePatternPtrType) ToRepositoryRulesetRulesCommitMessagePatternPtrOutput() RepositoryRulesetRulesCommitMessagePatternPtrOutput { + return i.ToRepositoryRulesetRulesCommitMessagePatternPtrOutputWithContext(context.Background()) +} + +func (i *repositoryRulesetRulesCommitMessagePatternPtrType) ToRepositoryRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitMessagePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesCommitMessagePatternPtrOutput) +} + +func (i *repositoryRulesetRulesCommitMessagePatternPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesCommitMessagePattern] { + return pulumix.Output[*RepositoryRulesetRulesCommitMessagePattern]{ + OutputState: i.ToRepositoryRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx).OutputState, + } +} + +type RepositoryRulesetRulesCommitMessagePatternOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesCommitMessagePatternOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesCommitMessagePattern)(nil)).Elem() +} + +func (o RepositoryRulesetRulesCommitMessagePatternOutput) ToRepositoryRulesetRulesCommitMessagePatternOutput() RepositoryRulesetRulesCommitMessagePatternOutput { + return o +} + +func (o RepositoryRulesetRulesCommitMessagePatternOutput) ToRepositoryRulesetRulesCommitMessagePatternOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitMessagePatternOutput { + return o +} + +func (o RepositoryRulesetRulesCommitMessagePatternOutput) ToRepositoryRulesetRulesCommitMessagePatternPtrOutput() RepositoryRulesetRulesCommitMessagePatternPtrOutput { + return o.ToRepositoryRulesetRulesCommitMessagePatternPtrOutputWithContext(context.Background()) +} + +func (o RepositoryRulesetRulesCommitMessagePatternOutput) ToRepositoryRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitMessagePatternPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryRulesetRulesCommitMessagePattern) *RepositoryRulesetRulesCommitMessagePattern { + return &v + }).(RepositoryRulesetRulesCommitMessagePatternPtrOutput) +} + +func (o RepositoryRulesetRulesCommitMessagePatternOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesCommitMessagePattern] { + return pulumix.Output[RepositoryRulesetRulesCommitMessagePattern]{ + OutputState: o.OutputState, + } +} + +// (String) The name of the ruleset. +func (o RepositoryRulesetRulesCommitMessagePatternOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitMessagePattern) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o RepositoryRulesetRulesCommitMessagePatternOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitMessagePattern) *bool { return v.Negate }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o RepositoryRulesetRulesCommitMessagePatternOutput) Operator() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitMessagePattern) string { return v.Operator }).(pulumi.StringOutput) +} + +// (String) The pattern to match with. +func (o RepositoryRulesetRulesCommitMessagePatternOutput) Pattern() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitMessagePattern) string { return v.Pattern }).(pulumi.StringOutput) +} + +type RepositoryRulesetRulesCommitMessagePatternPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesCommitMessagePatternPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesCommitMessagePattern)(nil)).Elem() +} + +func (o RepositoryRulesetRulesCommitMessagePatternPtrOutput) ToRepositoryRulesetRulesCommitMessagePatternPtrOutput() RepositoryRulesetRulesCommitMessagePatternPtrOutput { + return o +} + +func (o RepositoryRulesetRulesCommitMessagePatternPtrOutput) ToRepositoryRulesetRulesCommitMessagePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitMessagePatternPtrOutput { + return o +} + +func (o RepositoryRulesetRulesCommitMessagePatternPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesCommitMessagePattern] { + return pulumix.Output[*RepositoryRulesetRulesCommitMessagePattern]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryRulesetRulesCommitMessagePatternPtrOutput) Elem() RepositoryRulesetRulesCommitMessagePatternOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitMessagePattern) RepositoryRulesetRulesCommitMessagePattern { + if v != nil { + return *v + } + var ret RepositoryRulesetRulesCommitMessagePattern + return ret + }).(RepositoryRulesetRulesCommitMessagePatternOutput) +} + +// (String) The name of the ruleset. +func (o RepositoryRulesetRulesCommitMessagePatternPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitMessagePattern) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o RepositoryRulesetRulesCommitMessagePatternPtrOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitMessagePattern) *bool { + if v == nil { + return nil + } + return v.Negate + }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o RepositoryRulesetRulesCommitMessagePatternPtrOutput) Operator() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitMessagePattern) *string { + if v == nil { + return nil + } + return &v.Operator + }).(pulumi.StringPtrOutput) +} + +// (String) The pattern to match with. +func (o RepositoryRulesetRulesCommitMessagePatternPtrOutput) Pattern() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitMessagePattern) *string { + if v == nil { + return nil + } + return &v.Pattern + }).(pulumi.StringPtrOutput) +} + +type RepositoryRulesetRulesCommitterEmailPattern struct { + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate *bool `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator string `pulumi:"operator"` + // (String) The pattern to match with. + Pattern string `pulumi:"pattern"` +} + +// RepositoryRulesetRulesCommitterEmailPatternInput is an input type that accepts RepositoryRulesetRulesCommitterEmailPatternArgs and RepositoryRulesetRulesCommitterEmailPatternOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesCommitterEmailPatternInput` via: +// +// RepositoryRulesetRulesCommitterEmailPatternArgs{...} +type RepositoryRulesetRulesCommitterEmailPatternInput interface { + pulumi.Input + + ToRepositoryRulesetRulesCommitterEmailPatternOutput() RepositoryRulesetRulesCommitterEmailPatternOutput + ToRepositoryRulesetRulesCommitterEmailPatternOutputWithContext(context.Context) RepositoryRulesetRulesCommitterEmailPatternOutput +} + +type RepositoryRulesetRulesCommitterEmailPatternArgs struct { + // (String) The name of the ruleset. + Name pulumi.StringPtrInput `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate pulumi.BoolPtrInput `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator pulumi.StringInput `pulumi:"operator"` + // (String) The pattern to match with. + Pattern pulumi.StringInput `pulumi:"pattern"` +} + +func (RepositoryRulesetRulesCommitterEmailPatternArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesCommitterEmailPattern)(nil)).Elem() +} + +func (i RepositoryRulesetRulesCommitterEmailPatternArgs) ToRepositoryRulesetRulesCommitterEmailPatternOutput() RepositoryRulesetRulesCommitterEmailPatternOutput { + return i.ToRepositoryRulesetRulesCommitterEmailPatternOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesCommitterEmailPatternArgs) ToRepositoryRulesetRulesCommitterEmailPatternOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitterEmailPatternOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesCommitterEmailPatternOutput) +} + +func (i RepositoryRulesetRulesCommitterEmailPatternArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesCommitterEmailPattern] { + return pulumix.Output[RepositoryRulesetRulesCommitterEmailPattern]{ + OutputState: i.ToRepositoryRulesetRulesCommitterEmailPatternOutputWithContext(ctx).OutputState, + } +} + +func (i RepositoryRulesetRulesCommitterEmailPatternArgs) ToRepositoryRulesetRulesCommitterEmailPatternPtrOutput() RepositoryRulesetRulesCommitterEmailPatternPtrOutput { + return i.ToRepositoryRulesetRulesCommitterEmailPatternPtrOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesCommitterEmailPatternArgs) ToRepositoryRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitterEmailPatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesCommitterEmailPatternOutput).ToRepositoryRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx) +} + +// RepositoryRulesetRulesCommitterEmailPatternPtrInput is an input type that accepts RepositoryRulesetRulesCommitterEmailPatternArgs, RepositoryRulesetRulesCommitterEmailPatternPtr and RepositoryRulesetRulesCommitterEmailPatternPtrOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesCommitterEmailPatternPtrInput` via: +// +// RepositoryRulesetRulesCommitterEmailPatternArgs{...} +// +// or: +// +// nil +type RepositoryRulesetRulesCommitterEmailPatternPtrInput interface { + pulumi.Input + + ToRepositoryRulesetRulesCommitterEmailPatternPtrOutput() RepositoryRulesetRulesCommitterEmailPatternPtrOutput + ToRepositoryRulesetRulesCommitterEmailPatternPtrOutputWithContext(context.Context) RepositoryRulesetRulesCommitterEmailPatternPtrOutput +} + +type repositoryRulesetRulesCommitterEmailPatternPtrType RepositoryRulesetRulesCommitterEmailPatternArgs + +func RepositoryRulesetRulesCommitterEmailPatternPtr(v *RepositoryRulesetRulesCommitterEmailPatternArgs) RepositoryRulesetRulesCommitterEmailPatternPtrInput { + return (*repositoryRulesetRulesCommitterEmailPatternPtrType)(v) +} + +func (*repositoryRulesetRulesCommitterEmailPatternPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesCommitterEmailPattern)(nil)).Elem() +} + +func (i *repositoryRulesetRulesCommitterEmailPatternPtrType) ToRepositoryRulesetRulesCommitterEmailPatternPtrOutput() RepositoryRulesetRulesCommitterEmailPatternPtrOutput { + return i.ToRepositoryRulesetRulesCommitterEmailPatternPtrOutputWithContext(context.Background()) +} + +func (i *repositoryRulesetRulesCommitterEmailPatternPtrType) ToRepositoryRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitterEmailPatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesCommitterEmailPatternPtrOutput) +} + +func (i *repositoryRulesetRulesCommitterEmailPatternPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesCommitterEmailPattern] { + return pulumix.Output[*RepositoryRulesetRulesCommitterEmailPattern]{ + OutputState: i.ToRepositoryRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx).OutputState, + } +} + +type RepositoryRulesetRulesCommitterEmailPatternOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesCommitterEmailPatternOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesCommitterEmailPattern)(nil)).Elem() +} + +func (o RepositoryRulesetRulesCommitterEmailPatternOutput) ToRepositoryRulesetRulesCommitterEmailPatternOutput() RepositoryRulesetRulesCommitterEmailPatternOutput { + return o +} + +func (o RepositoryRulesetRulesCommitterEmailPatternOutput) ToRepositoryRulesetRulesCommitterEmailPatternOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitterEmailPatternOutput { + return o +} + +func (o RepositoryRulesetRulesCommitterEmailPatternOutput) ToRepositoryRulesetRulesCommitterEmailPatternPtrOutput() RepositoryRulesetRulesCommitterEmailPatternPtrOutput { + return o.ToRepositoryRulesetRulesCommitterEmailPatternPtrOutputWithContext(context.Background()) +} + +func (o RepositoryRulesetRulesCommitterEmailPatternOutput) ToRepositoryRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitterEmailPatternPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryRulesetRulesCommitterEmailPattern) *RepositoryRulesetRulesCommitterEmailPattern { + return &v + }).(RepositoryRulesetRulesCommitterEmailPatternPtrOutput) +} + +func (o RepositoryRulesetRulesCommitterEmailPatternOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesCommitterEmailPattern] { + return pulumix.Output[RepositoryRulesetRulesCommitterEmailPattern]{ + OutputState: o.OutputState, + } +} + +// (String) The name of the ruleset. +func (o RepositoryRulesetRulesCommitterEmailPatternOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitterEmailPattern) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o RepositoryRulesetRulesCommitterEmailPatternOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitterEmailPattern) *bool { return v.Negate }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o RepositoryRulesetRulesCommitterEmailPatternOutput) Operator() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitterEmailPattern) string { return v.Operator }).(pulumi.StringOutput) +} + +// (String) The pattern to match with. +func (o RepositoryRulesetRulesCommitterEmailPatternOutput) Pattern() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetRulesCommitterEmailPattern) string { return v.Pattern }).(pulumi.StringOutput) +} + +type RepositoryRulesetRulesCommitterEmailPatternPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesCommitterEmailPatternPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesCommitterEmailPattern)(nil)).Elem() +} + +func (o RepositoryRulesetRulesCommitterEmailPatternPtrOutput) ToRepositoryRulesetRulesCommitterEmailPatternPtrOutput() RepositoryRulesetRulesCommitterEmailPatternPtrOutput { + return o +} + +func (o RepositoryRulesetRulesCommitterEmailPatternPtrOutput) ToRepositoryRulesetRulesCommitterEmailPatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesCommitterEmailPatternPtrOutput { + return o +} + +func (o RepositoryRulesetRulesCommitterEmailPatternPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesCommitterEmailPattern] { + return pulumix.Output[*RepositoryRulesetRulesCommitterEmailPattern]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryRulesetRulesCommitterEmailPatternPtrOutput) Elem() RepositoryRulesetRulesCommitterEmailPatternOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitterEmailPattern) RepositoryRulesetRulesCommitterEmailPattern { + if v != nil { + return *v + } + var ret RepositoryRulesetRulesCommitterEmailPattern + return ret + }).(RepositoryRulesetRulesCommitterEmailPatternOutput) +} + +// (String) The name of the ruleset. +func (o RepositoryRulesetRulesCommitterEmailPatternPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitterEmailPattern) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +// (Boolean) If true, the rule will fail if the pattern matches. +func (o RepositoryRulesetRulesCommitterEmailPatternPtrOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitterEmailPattern) *bool { + if v == nil { + return nil + } + return v.Negate + }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o RepositoryRulesetRulesCommitterEmailPatternPtrOutput) Operator() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitterEmailPattern) *string { + if v == nil { + return nil + } + return &v.Operator + }).(pulumi.StringPtrOutput) +} + +// (String) The pattern to match with. +func (o RepositoryRulesetRulesCommitterEmailPatternPtrOutput) Pattern() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesCommitterEmailPattern) *string { + if v == nil { + return nil + } + return &v.Pattern + }).(pulumi.StringPtrOutput) +} + +type RepositoryRulesetRulesPullRequest struct { + // (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + DismissStaleReviewsOnPush *bool `pulumi:"dismissStaleReviewsOnPush"` + // (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + RequireCodeOwnerReview *bool `pulumi:"requireCodeOwnerReview"` + // (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + RequireLastPushApproval *bool `pulumi:"requireLastPushApproval"` + // (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + RequiredApprovingReviewCount *int `pulumi:"requiredApprovingReviewCount"` + // (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + RequiredReviewThreadResolution *bool `pulumi:"requiredReviewThreadResolution"` +} + +// RepositoryRulesetRulesPullRequestInput is an input type that accepts RepositoryRulesetRulesPullRequestArgs and RepositoryRulesetRulesPullRequestOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesPullRequestInput` via: +// +// RepositoryRulesetRulesPullRequestArgs{...} +type RepositoryRulesetRulesPullRequestInput interface { + pulumi.Input + + ToRepositoryRulesetRulesPullRequestOutput() RepositoryRulesetRulesPullRequestOutput + ToRepositoryRulesetRulesPullRequestOutputWithContext(context.Context) RepositoryRulesetRulesPullRequestOutput +} + +type RepositoryRulesetRulesPullRequestArgs struct { + // (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + DismissStaleReviewsOnPush pulumi.BoolPtrInput `pulumi:"dismissStaleReviewsOnPush"` + // (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + RequireCodeOwnerReview pulumi.BoolPtrInput `pulumi:"requireCodeOwnerReview"` + // (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + RequireLastPushApproval pulumi.BoolPtrInput `pulumi:"requireLastPushApproval"` + // (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + RequiredApprovingReviewCount pulumi.IntPtrInput `pulumi:"requiredApprovingReviewCount"` + // (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + RequiredReviewThreadResolution pulumi.BoolPtrInput `pulumi:"requiredReviewThreadResolution"` +} + +func (RepositoryRulesetRulesPullRequestArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesPullRequest)(nil)).Elem() +} + +func (i RepositoryRulesetRulesPullRequestArgs) ToRepositoryRulesetRulesPullRequestOutput() RepositoryRulesetRulesPullRequestOutput { + return i.ToRepositoryRulesetRulesPullRequestOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesPullRequestArgs) ToRepositoryRulesetRulesPullRequestOutputWithContext(ctx context.Context) RepositoryRulesetRulesPullRequestOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesPullRequestOutput) +} + +func (i RepositoryRulesetRulesPullRequestArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesPullRequest] { + return pulumix.Output[RepositoryRulesetRulesPullRequest]{ + OutputState: i.ToRepositoryRulesetRulesPullRequestOutputWithContext(ctx).OutputState, + } +} + +func (i RepositoryRulesetRulesPullRequestArgs) ToRepositoryRulesetRulesPullRequestPtrOutput() RepositoryRulesetRulesPullRequestPtrOutput { + return i.ToRepositoryRulesetRulesPullRequestPtrOutputWithContext(context.Background()) } -func (i RepositoryEnvironmentDeploymentBranchPolicyArgs) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryEnvironmentDeploymentBranchPolicyOutput).ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx) +func (i RepositoryRulesetRulesPullRequestArgs) ToRepositoryRulesetRulesPullRequestPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesPullRequestPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesPullRequestOutput).ToRepositoryRulesetRulesPullRequestPtrOutputWithContext(ctx) } -// RepositoryEnvironmentDeploymentBranchPolicyPtrInput is an input type that accepts RepositoryEnvironmentDeploymentBranchPolicyArgs, RepositoryEnvironmentDeploymentBranchPolicyPtr and RepositoryEnvironmentDeploymentBranchPolicyPtrOutput values. -// You can construct a concrete instance of `RepositoryEnvironmentDeploymentBranchPolicyPtrInput` via: +// RepositoryRulesetRulesPullRequestPtrInput is an input type that accepts RepositoryRulesetRulesPullRequestArgs, RepositoryRulesetRulesPullRequestPtr and RepositoryRulesetRulesPullRequestPtrOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesPullRequestPtrInput` via: // -// RepositoryEnvironmentDeploymentBranchPolicyArgs{...} +// RepositoryRulesetRulesPullRequestArgs{...} // // or: // // nil -type RepositoryEnvironmentDeploymentBranchPolicyPtrInput interface { +type RepositoryRulesetRulesPullRequestPtrInput interface { pulumi.Input - ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutput() RepositoryEnvironmentDeploymentBranchPolicyPtrOutput - ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(context.Context) RepositoryEnvironmentDeploymentBranchPolicyPtrOutput + ToRepositoryRulesetRulesPullRequestPtrOutput() RepositoryRulesetRulesPullRequestPtrOutput + ToRepositoryRulesetRulesPullRequestPtrOutputWithContext(context.Context) RepositoryRulesetRulesPullRequestPtrOutput } -type repositoryEnvironmentDeploymentBranchPolicyPtrType RepositoryEnvironmentDeploymentBranchPolicyArgs +type repositoryRulesetRulesPullRequestPtrType RepositoryRulesetRulesPullRequestArgs -func RepositoryEnvironmentDeploymentBranchPolicyPtr(v *RepositoryEnvironmentDeploymentBranchPolicyArgs) RepositoryEnvironmentDeploymentBranchPolicyPtrInput { - return (*repositoryEnvironmentDeploymentBranchPolicyPtrType)(v) +func RepositoryRulesetRulesPullRequestPtr(v *RepositoryRulesetRulesPullRequestArgs) RepositoryRulesetRulesPullRequestPtrInput { + return (*repositoryRulesetRulesPullRequestPtrType)(v) } -func (*repositoryEnvironmentDeploymentBranchPolicyPtrType) ElementType() reflect.Type { - return reflect.TypeOf((**RepositoryEnvironmentDeploymentBranchPolicy)(nil)).Elem() +func (*repositoryRulesetRulesPullRequestPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesPullRequest)(nil)).Elem() } -func (i *repositoryEnvironmentDeploymentBranchPolicyPtrType) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutput() RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { - return i.ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(context.Background()) +func (i *repositoryRulesetRulesPullRequestPtrType) ToRepositoryRulesetRulesPullRequestPtrOutput() RepositoryRulesetRulesPullRequestPtrOutput { + return i.ToRepositoryRulesetRulesPullRequestPtrOutputWithContext(context.Background()) } -func (i *repositoryEnvironmentDeploymentBranchPolicyPtrType) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) +func (i *repositoryRulesetRulesPullRequestPtrType) ToRepositoryRulesetRulesPullRequestPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesPullRequestPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesPullRequestPtrOutput) } -func (i *repositoryEnvironmentDeploymentBranchPolicyPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryEnvironmentDeploymentBranchPolicy] { - return pulumix.Output[*RepositoryEnvironmentDeploymentBranchPolicy]{ - OutputState: i.ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx).OutputState, +func (i *repositoryRulesetRulesPullRequestPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesPullRequest] { + return pulumix.Output[*RepositoryRulesetRulesPullRequest]{ + OutputState: i.ToRepositoryRulesetRulesPullRequestPtrOutputWithContext(ctx).OutputState, } } -type RepositoryEnvironmentDeploymentBranchPolicyOutput struct{ *pulumi.OutputState } +type RepositoryRulesetRulesPullRequestOutput struct{ *pulumi.OutputState } -func (RepositoryEnvironmentDeploymentBranchPolicyOutput) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryEnvironmentDeploymentBranchPolicy)(nil)).Elem() +func (RepositoryRulesetRulesPullRequestOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesPullRequest)(nil)).Elem() } -func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ToRepositoryEnvironmentDeploymentBranchPolicyOutput() RepositoryEnvironmentDeploymentBranchPolicyOutput { +func (o RepositoryRulesetRulesPullRequestOutput) ToRepositoryRulesetRulesPullRequestOutput() RepositoryRulesetRulesPullRequestOutput { return o } -func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ToRepositoryEnvironmentDeploymentBranchPolicyOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyOutput { +func (o RepositoryRulesetRulesPullRequestOutput) ToRepositoryRulesetRulesPullRequestOutputWithContext(ctx context.Context) RepositoryRulesetRulesPullRequestOutput { return o } -func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutput() RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { - return o.ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(context.Background()) +func (o RepositoryRulesetRulesPullRequestOutput) ToRepositoryRulesetRulesPullRequestPtrOutput() RepositoryRulesetRulesPullRequestPtrOutput { + return o.ToRepositoryRulesetRulesPullRequestPtrOutputWithContext(context.Background()) } -func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { - return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryEnvironmentDeploymentBranchPolicy) *RepositoryEnvironmentDeploymentBranchPolicy { +func (o RepositoryRulesetRulesPullRequestOutput) ToRepositoryRulesetRulesPullRequestPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesPullRequestPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryRulesetRulesPullRequest) *RepositoryRulesetRulesPullRequest { return &v - }).(RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) + }).(RepositoryRulesetRulesPullRequestPtrOutput) } -func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryEnvironmentDeploymentBranchPolicy] { - return pulumix.Output[RepositoryEnvironmentDeploymentBranchPolicy]{ +func (o RepositoryRulesetRulesPullRequestOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesPullRequest] { + return pulumix.Output[RepositoryRulesetRulesPullRequest]{ OutputState: o.OutputState, } } -// Whether only branches that match the specified name patterns can deploy to this environment. -func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) CustomBranchPolicies() pulumi.BoolOutput { - return o.ApplyT(func(v RepositoryEnvironmentDeploymentBranchPolicy) bool { return v.CustomBranchPolicies }).(pulumi.BoolOutput) +// (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. +func (o RepositoryRulesetRulesPullRequestOutput) DismissStaleReviewsOnPush() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesPullRequest) *bool { return v.DismissStaleReviewsOnPush }).(pulumi.BoolPtrOutput) } -// Whether only branches with branch protection rules can deploy to this environment. -func (o RepositoryEnvironmentDeploymentBranchPolicyOutput) ProtectedBranches() pulumi.BoolOutput { - return o.ApplyT(func(v RepositoryEnvironmentDeploymentBranchPolicy) bool { return v.ProtectedBranches }).(pulumi.BoolOutput) +// (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. +func (o RepositoryRulesetRulesPullRequestOutput) RequireCodeOwnerReview() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesPullRequest) *bool { return v.RequireCodeOwnerReview }).(pulumi.BoolPtrOutput) } -type RepositoryEnvironmentDeploymentBranchPolicyPtrOutput struct{ *pulumi.OutputState } +// (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. +func (o RepositoryRulesetRulesPullRequestOutput) RequireLastPushApproval() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesPullRequest) *bool { return v.RequireLastPushApproval }).(pulumi.BoolPtrOutput) +} -func (RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) ElementType() reflect.Type { - return reflect.TypeOf((**RepositoryEnvironmentDeploymentBranchPolicy)(nil)).Elem() +// (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. +func (o RepositoryRulesetRulesPullRequestOutput) RequiredApprovingReviewCount() pulumi.IntPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesPullRequest) *int { return v.RequiredApprovingReviewCount }).(pulumi.IntPtrOutput) } -func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutput() RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { +// (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. +func (o RepositoryRulesetRulesPullRequestOutput) RequiredReviewThreadResolution() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesPullRequest) *bool { return v.RequiredReviewThreadResolution }).(pulumi.BoolPtrOutput) +} + +type RepositoryRulesetRulesPullRequestPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesPullRequestPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesPullRequest)(nil)).Elem() +} + +func (o RepositoryRulesetRulesPullRequestPtrOutput) ToRepositoryRulesetRulesPullRequestPtrOutput() RepositoryRulesetRulesPullRequestPtrOutput { return o } -func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) ToRepositoryEnvironmentDeploymentBranchPolicyPtrOutputWithContext(ctx context.Context) RepositoryEnvironmentDeploymentBranchPolicyPtrOutput { +func (o RepositoryRulesetRulesPullRequestPtrOutput) ToRepositoryRulesetRulesPullRequestPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesPullRequestPtrOutput { return o } -func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryEnvironmentDeploymentBranchPolicy] { - return pulumix.Output[*RepositoryEnvironmentDeploymentBranchPolicy]{ +func (o RepositoryRulesetRulesPullRequestPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesPullRequest] { + return pulumix.Output[*RepositoryRulesetRulesPullRequest]{ OutputState: o.OutputState, } } -func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) Elem() RepositoryEnvironmentDeploymentBranchPolicyOutput { - return o.ApplyT(func(v *RepositoryEnvironmentDeploymentBranchPolicy) RepositoryEnvironmentDeploymentBranchPolicy { +func (o RepositoryRulesetRulesPullRequestPtrOutput) Elem() RepositoryRulesetRulesPullRequestOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesPullRequest) RepositoryRulesetRulesPullRequest { if v != nil { return *v } - var ret RepositoryEnvironmentDeploymentBranchPolicy + var ret RepositoryRulesetRulesPullRequest return ret - }).(RepositoryEnvironmentDeploymentBranchPolicyOutput) + }).(RepositoryRulesetRulesPullRequestOutput) } -// Whether only branches that match the specified name patterns can deploy to this environment. -func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) CustomBranchPolicies() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *RepositoryEnvironmentDeploymentBranchPolicy) *bool { +// (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. +func (o RepositoryRulesetRulesPullRequestPtrOutput) DismissStaleReviewsOnPush() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesPullRequest) *bool { if v == nil { return nil } - return &v.CustomBranchPolicies + return v.DismissStaleReviewsOnPush }).(pulumi.BoolPtrOutput) } -// Whether only branches with branch protection rules can deploy to this environment. -func (o RepositoryEnvironmentDeploymentBranchPolicyPtrOutput) ProtectedBranches() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *RepositoryEnvironmentDeploymentBranchPolicy) *bool { +// (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. +func (o RepositoryRulesetRulesPullRequestPtrOutput) RequireCodeOwnerReview() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesPullRequest) *bool { if v == nil { return nil } - return &v.ProtectedBranches + return v.RequireCodeOwnerReview }).(pulumi.BoolPtrOutput) } -type RepositoryEnvironmentReviewer struct { - // Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. - Teams []int `pulumi:"teams"` - // Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. - Users []int `pulumi:"users"` +// (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. +func (o RepositoryRulesetRulesPullRequestPtrOutput) RequireLastPushApproval() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesPullRequest) *bool { + if v == nil { + return nil + } + return v.RequireLastPushApproval + }).(pulumi.BoolPtrOutput) } -// RepositoryEnvironmentReviewerInput is an input type that accepts RepositoryEnvironmentReviewerArgs and RepositoryEnvironmentReviewerOutput values. -// You can construct a concrete instance of `RepositoryEnvironmentReviewerInput` via: +// (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. +func (o RepositoryRulesetRulesPullRequestPtrOutput) RequiredApprovingReviewCount() pulumi.IntPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesPullRequest) *int { + if v == nil { + return nil + } + return v.RequiredApprovingReviewCount + }).(pulumi.IntPtrOutput) +} + +// (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. +func (o RepositoryRulesetRulesPullRequestPtrOutput) RequiredReviewThreadResolution() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesPullRequest) *bool { + if v == nil { + return nil + } + return v.RequiredReviewThreadResolution + }).(pulumi.BoolPtrOutput) +} + +type RepositoryRulesetRulesRequiredDeployments struct { + // (List of String) The environments that must be successfully deployed to before branches can be merged. + RequiredDeploymentEnvironments []string `pulumi:"requiredDeploymentEnvironments"` +} + +// RepositoryRulesetRulesRequiredDeploymentsInput is an input type that accepts RepositoryRulesetRulesRequiredDeploymentsArgs and RepositoryRulesetRulesRequiredDeploymentsOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesRequiredDeploymentsInput` via: // -// RepositoryEnvironmentReviewerArgs{...} -type RepositoryEnvironmentReviewerInput interface { +// RepositoryRulesetRulesRequiredDeploymentsArgs{...} +type RepositoryRulesetRulesRequiredDeploymentsInput interface { pulumi.Input - ToRepositoryEnvironmentReviewerOutput() RepositoryEnvironmentReviewerOutput - ToRepositoryEnvironmentReviewerOutputWithContext(context.Context) RepositoryEnvironmentReviewerOutput + ToRepositoryRulesetRulesRequiredDeploymentsOutput() RepositoryRulesetRulesRequiredDeploymentsOutput + ToRepositoryRulesetRulesRequiredDeploymentsOutputWithContext(context.Context) RepositoryRulesetRulesRequiredDeploymentsOutput } -type RepositoryEnvironmentReviewerArgs struct { - // Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. - Teams pulumi.IntArrayInput `pulumi:"teams"` - // Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. - Users pulumi.IntArrayInput `pulumi:"users"` +type RepositoryRulesetRulesRequiredDeploymentsArgs struct { + // (List of String) The environments that must be successfully deployed to before branches can be merged. + RequiredDeploymentEnvironments pulumi.StringArrayInput `pulumi:"requiredDeploymentEnvironments"` } -func (RepositoryEnvironmentReviewerArgs) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryEnvironmentReviewer)(nil)).Elem() +func (RepositoryRulesetRulesRequiredDeploymentsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesRequiredDeployments)(nil)).Elem() } -func (i RepositoryEnvironmentReviewerArgs) ToRepositoryEnvironmentReviewerOutput() RepositoryEnvironmentReviewerOutput { - return i.ToRepositoryEnvironmentReviewerOutputWithContext(context.Background()) +func (i RepositoryRulesetRulesRequiredDeploymentsArgs) ToRepositoryRulesetRulesRequiredDeploymentsOutput() RepositoryRulesetRulesRequiredDeploymentsOutput { + return i.ToRepositoryRulesetRulesRequiredDeploymentsOutputWithContext(context.Background()) } -func (i RepositoryEnvironmentReviewerArgs) ToRepositoryEnvironmentReviewerOutputWithContext(ctx context.Context) RepositoryEnvironmentReviewerOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryEnvironmentReviewerOutput) +func (i RepositoryRulesetRulesRequiredDeploymentsArgs) ToRepositoryRulesetRulesRequiredDeploymentsOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredDeploymentsOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesRequiredDeploymentsOutput) } -func (i RepositoryEnvironmentReviewerArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryEnvironmentReviewer] { - return pulumix.Output[RepositoryEnvironmentReviewer]{ - OutputState: i.ToRepositoryEnvironmentReviewerOutputWithContext(ctx).OutputState, +func (i RepositoryRulesetRulesRequiredDeploymentsArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesRequiredDeployments] { + return pulumix.Output[RepositoryRulesetRulesRequiredDeployments]{ + OutputState: i.ToRepositoryRulesetRulesRequiredDeploymentsOutputWithContext(ctx).OutputState, } } -// RepositoryEnvironmentReviewerArrayInput is an input type that accepts RepositoryEnvironmentReviewerArray and RepositoryEnvironmentReviewerArrayOutput values. -// You can construct a concrete instance of `RepositoryEnvironmentReviewerArrayInput` via: +func (i RepositoryRulesetRulesRequiredDeploymentsArgs) ToRepositoryRulesetRulesRequiredDeploymentsPtrOutput() RepositoryRulesetRulesRequiredDeploymentsPtrOutput { + return i.ToRepositoryRulesetRulesRequiredDeploymentsPtrOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetRulesRequiredDeploymentsArgs) ToRepositoryRulesetRulesRequiredDeploymentsPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredDeploymentsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesRequiredDeploymentsOutput).ToRepositoryRulesetRulesRequiredDeploymentsPtrOutputWithContext(ctx) +} + +// RepositoryRulesetRulesRequiredDeploymentsPtrInput is an input type that accepts RepositoryRulesetRulesRequiredDeploymentsArgs, RepositoryRulesetRulesRequiredDeploymentsPtr and RepositoryRulesetRulesRequiredDeploymentsPtrOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesRequiredDeploymentsPtrInput` via: // -// RepositoryEnvironmentReviewerArray{ RepositoryEnvironmentReviewerArgs{...} } -type RepositoryEnvironmentReviewerArrayInput interface { +// RepositoryRulesetRulesRequiredDeploymentsArgs{...} +// +// or: +// +// nil +type RepositoryRulesetRulesRequiredDeploymentsPtrInput interface { pulumi.Input - ToRepositoryEnvironmentReviewerArrayOutput() RepositoryEnvironmentReviewerArrayOutput - ToRepositoryEnvironmentReviewerArrayOutputWithContext(context.Context) RepositoryEnvironmentReviewerArrayOutput + ToRepositoryRulesetRulesRequiredDeploymentsPtrOutput() RepositoryRulesetRulesRequiredDeploymentsPtrOutput + ToRepositoryRulesetRulesRequiredDeploymentsPtrOutputWithContext(context.Context) RepositoryRulesetRulesRequiredDeploymentsPtrOutput } -type RepositoryEnvironmentReviewerArray []RepositoryEnvironmentReviewerInput +type repositoryRulesetRulesRequiredDeploymentsPtrType RepositoryRulesetRulesRequiredDeploymentsArgs -func (RepositoryEnvironmentReviewerArray) ElementType() reflect.Type { - return reflect.TypeOf((*[]RepositoryEnvironmentReviewer)(nil)).Elem() +func RepositoryRulesetRulesRequiredDeploymentsPtr(v *RepositoryRulesetRulesRequiredDeploymentsArgs) RepositoryRulesetRulesRequiredDeploymentsPtrInput { + return (*repositoryRulesetRulesRequiredDeploymentsPtrType)(v) } -func (i RepositoryEnvironmentReviewerArray) ToRepositoryEnvironmentReviewerArrayOutput() RepositoryEnvironmentReviewerArrayOutput { - return i.ToRepositoryEnvironmentReviewerArrayOutputWithContext(context.Background()) +func (*repositoryRulesetRulesRequiredDeploymentsPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesRequiredDeployments)(nil)).Elem() } -func (i RepositoryEnvironmentReviewerArray) ToRepositoryEnvironmentReviewerArrayOutputWithContext(ctx context.Context) RepositoryEnvironmentReviewerArrayOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryEnvironmentReviewerArrayOutput) +func (i *repositoryRulesetRulesRequiredDeploymentsPtrType) ToRepositoryRulesetRulesRequiredDeploymentsPtrOutput() RepositoryRulesetRulesRequiredDeploymentsPtrOutput { + return i.ToRepositoryRulesetRulesRequiredDeploymentsPtrOutputWithContext(context.Background()) } -func (i RepositoryEnvironmentReviewerArray) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryEnvironmentReviewer] { - return pulumix.Output[[]RepositoryEnvironmentReviewer]{ - OutputState: i.ToRepositoryEnvironmentReviewerArrayOutputWithContext(ctx).OutputState, +func (i *repositoryRulesetRulesRequiredDeploymentsPtrType) ToRepositoryRulesetRulesRequiredDeploymentsPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredDeploymentsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesRequiredDeploymentsPtrOutput) +} + +func (i *repositoryRulesetRulesRequiredDeploymentsPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesRequiredDeployments] { + return pulumix.Output[*RepositoryRulesetRulesRequiredDeployments]{ + OutputState: i.ToRepositoryRulesetRulesRequiredDeploymentsPtrOutputWithContext(ctx).OutputState, } } -type RepositoryEnvironmentReviewerOutput struct{ *pulumi.OutputState } +type RepositoryRulesetRulesRequiredDeploymentsOutput struct{ *pulumi.OutputState } -func (RepositoryEnvironmentReviewerOutput) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryEnvironmentReviewer)(nil)).Elem() +func (RepositoryRulesetRulesRequiredDeploymentsOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesRequiredDeployments)(nil)).Elem() } -func (o RepositoryEnvironmentReviewerOutput) ToRepositoryEnvironmentReviewerOutput() RepositoryEnvironmentReviewerOutput { +func (o RepositoryRulesetRulesRequiredDeploymentsOutput) ToRepositoryRulesetRulesRequiredDeploymentsOutput() RepositoryRulesetRulesRequiredDeploymentsOutput { return o } -func (o RepositoryEnvironmentReviewerOutput) ToRepositoryEnvironmentReviewerOutputWithContext(ctx context.Context) RepositoryEnvironmentReviewerOutput { +func (o RepositoryRulesetRulesRequiredDeploymentsOutput) ToRepositoryRulesetRulesRequiredDeploymentsOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredDeploymentsOutput { return o } -func (o RepositoryEnvironmentReviewerOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryEnvironmentReviewer] { - return pulumix.Output[RepositoryEnvironmentReviewer]{ - OutputState: o.OutputState, - } +func (o RepositoryRulesetRulesRequiredDeploymentsOutput) ToRepositoryRulesetRulesRequiredDeploymentsPtrOutput() RepositoryRulesetRulesRequiredDeploymentsPtrOutput { + return o.ToRepositoryRulesetRulesRequiredDeploymentsPtrOutputWithContext(context.Background()) } -// Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. -func (o RepositoryEnvironmentReviewerOutput) Teams() pulumi.IntArrayOutput { - return o.ApplyT(func(v RepositoryEnvironmentReviewer) []int { return v.Teams }).(pulumi.IntArrayOutput) +func (o RepositoryRulesetRulesRequiredDeploymentsOutput) ToRepositoryRulesetRulesRequiredDeploymentsPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredDeploymentsPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryRulesetRulesRequiredDeployments) *RepositoryRulesetRulesRequiredDeployments { + return &v + }).(RepositoryRulesetRulesRequiredDeploymentsPtrOutput) } -// Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. -func (o RepositoryEnvironmentReviewerOutput) Users() pulumi.IntArrayOutput { - return o.ApplyT(func(v RepositoryEnvironmentReviewer) []int { return v.Users }).(pulumi.IntArrayOutput) +func (o RepositoryRulesetRulesRequiredDeploymentsOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesRequiredDeployments] { + return pulumix.Output[RepositoryRulesetRulesRequiredDeployments]{ + OutputState: o.OutputState, + } } -type RepositoryEnvironmentReviewerArrayOutput struct{ *pulumi.OutputState } +// (List of String) The environments that must be successfully deployed to before branches can be merged. +func (o RepositoryRulesetRulesRequiredDeploymentsOutput) RequiredDeploymentEnvironments() pulumi.StringArrayOutput { + return o.ApplyT(func(v RepositoryRulesetRulesRequiredDeployments) []string { return v.RequiredDeploymentEnvironments }).(pulumi.StringArrayOutput) +} -func (RepositoryEnvironmentReviewerArrayOutput) ElementType() reflect.Type { - return reflect.TypeOf((*[]RepositoryEnvironmentReviewer)(nil)).Elem() +type RepositoryRulesetRulesRequiredDeploymentsPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesRequiredDeploymentsPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesRequiredDeployments)(nil)).Elem() } -func (o RepositoryEnvironmentReviewerArrayOutput) ToRepositoryEnvironmentReviewerArrayOutput() RepositoryEnvironmentReviewerArrayOutput { +func (o RepositoryRulesetRulesRequiredDeploymentsPtrOutput) ToRepositoryRulesetRulesRequiredDeploymentsPtrOutput() RepositoryRulesetRulesRequiredDeploymentsPtrOutput { return o } -func (o RepositoryEnvironmentReviewerArrayOutput) ToRepositoryEnvironmentReviewerArrayOutputWithContext(ctx context.Context) RepositoryEnvironmentReviewerArrayOutput { +func (o RepositoryRulesetRulesRequiredDeploymentsPtrOutput) ToRepositoryRulesetRulesRequiredDeploymentsPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredDeploymentsPtrOutput { return o } -func (o RepositoryEnvironmentReviewerArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryEnvironmentReviewer] { - return pulumix.Output[[]RepositoryEnvironmentReviewer]{ +func (o RepositoryRulesetRulesRequiredDeploymentsPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesRequiredDeployments] { + return pulumix.Output[*RepositoryRulesetRulesRequiredDeployments]{ OutputState: o.OutputState, } } -func (o RepositoryEnvironmentReviewerArrayOutput) Index(i pulumi.IntInput) RepositoryEnvironmentReviewerOutput { - return pulumi.All(o, i).ApplyT(func(vs []interface{}) RepositoryEnvironmentReviewer { - return vs[0].([]RepositoryEnvironmentReviewer)[vs[1].(int)] - }).(RepositoryEnvironmentReviewerOutput) +func (o RepositoryRulesetRulesRequiredDeploymentsPtrOutput) Elem() RepositoryRulesetRulesRequiredDeploymentsOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesRequiredDeployments) RepositoryRulesetRulesRequiredDeployments { + if v != nil { + return *v + } + var ret RepositoryRulesetRulesRequiredDeployments + return ret + }).(RepositoryRulesetRulesRequiredDeploymentsOutput) } -type RepositoryPages struct { - // The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. - BuildType *string `pulumi:"buildType"` - // The custom domain for the repository. This can only be set after the repository has been created. - Cname *string `pulumi:"cname"` - // Whether the rendered GitHub Pages site has a custom 404 page. - Custom404 *bool `pulumi:"custom404"` - // The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. - HtmlUrl *string `pulumi:"htmlUrl"` - // The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. - Source *RepositoryPagesSource `pulumi:"source"` - // Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. - Status *string `pulumi:"status"` - Url *string `pulumi:"url"` +// (List of String) The environments that must be successfully deployed to before branches can be merged. +func (o RepositoryRulesetRulesRequiredDeploymentsPtrOutput) RequiredDeploymentEnvironments() pulumi.StringArrayOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesRequiredDeployments) []string { + if v == nil { + return nil + } + return v.RequiredDeploymentEnvironments + }).(pulumi.StringArrayOutput) } -// RepositoryPagesInput is an input type that accepts RepositoryPagesArgs and RepositoryPagesOutput values. -// You can construct a concrete instance of `RepositoryPagesInput` via: +type RepositoryRulesetRulesRequiredStatusChecks struct { + // (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + RequiredChecks []RepositoryRulesetRulesRequiredStatusChecksRequiredCheck `pulumi:"requiredChecks"` + // (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + StrictRequiredStatusChecksPolicy *bool `pulumi:"strictRequiredStatusChecksPolicy"` +} + +// RepositoryRulesetRulesRequiredStatusChecksInput is an input type that accepts RepositoryRulesetRulesRequiredStatusChecksArgs and RepositoryRulesetRulesRequiredStatusChecksOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesRequiredStatusChecksInput` via: // -// RepositoryPagesArgs{...} -type RepositoryPagesInput interface { +// RepositoryRulesetRulesRequiredStatusChecksArgs{...} +type RepositoryRulesetRulesRequiredStatusChecksInput interface { pulumi.Input - ToRepositoryPagesOutput() RepositoryPagesOutput - ToRepositoryPagesOutputWithContext(context.Context) RepositoryPagesOutput + ToRepositoryRulesetRulesRequiredStatusChecksOutput() RepositoryRulesetRulesRequiredStatusChecksOutput + ToRepositoryRulesetRulesRequiredStatusChecksOutputWithContext(context.Context) RepositoryRulesetRulesRequiredStatusChecksOutput } -type RepositoryPagesArgs struct { - // The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. - BuildType pulumi.StringPtrInput `pulumi:"buildType"` - // The custom domain for the repository. This can only be set after the repository has been created. - Cname pulumi.StringPtrInput `pulumi:"cname"` - // Whether the rendered GitHub Pages site has a custom 404 page. - Custom404 pulumi.BoolPtrInput `pulumi:"custom404"` - // The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. - HtmlUrl pulumi.StringPtrInput `pulumi:"htmlUrl"` - // The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. - Source RepositoryPagesSourcePtrInput `pulumi:"source"` - // Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. - Status pulumi.StringPtrInput `pulumi:"status"` - Url pulumi.StringPtrInput `pulumi:"url"` +type RepositoryRulesetRulesRequiredStatusChecksArgs struct { + // (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + RequiredChecks RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayInput `pulumi:"requiredChecks"` + // (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + StrictRequiredStatusChecksPolicy pulumi.BoolPtrInput `pulumi:"strictRequiredStatusChecksPolicy"` } -func (RepositoryPagesArgs) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryPages)(nil)).Elem() +func (RepositoryRulesetRulesRequiredStatusChecksArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesRequiredStatusChecks)(nil)).Elem() } -func (i RepositoryPagesArgs) ToRepositoryPagesOutput() RepositoryPagesOutput { - return i.ToRepositoryPagesOutputWithContext(context.Background()) +func (i RepositoryRulesetRulesRequiredStatusChecksArgs) ToRepositoryRulesetRulesRequiredStatusChecksOutput() RepositoryRulesetRulesRequiredStatusChecksOutput { + return i.ToRepositoryRulesetRulesRequiredStatusChecksOutputWithContext(context.Background()) } -func (i RepositoryPagesArgs) ToRepositoryPagesOutputWithContext(ctx context.Context) RepositoryPagesOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesOutput) +func (i RepositoryRulesetRulesRequiredStatusChecksArgs) ToRepositoryRulesetRulesRequiredStatusChecksOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredStatusChecksOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesRequiredStatusChecksOutput) } -func (i RepositoryPagesArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryPages] { - return pulumix.Output[RepositoryPages]{ - OutputState: i.ToRepositoryPagesOutputWithContext(ctx).OutputState, +func (i RepositoryRulesetRulesRequiredStatusChecksArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesRequiredStatusChecks] { + return pulumix.Output[RepositoryRulesetRulesRequiredStatusChecks]{ + OutputState: i.ToRepositoryRulesetRulesRequiredStatusChecksOutputWithContext(ctx).OutputState, } } -func (i RepositoryPagesArgs) ToRepositoryPagesPtrOutput() RepositoryPagesPtrOutput { - return i.ToRepositoryPagesPtrOutputWithContext(context.Background()) +func (i RepositoryRulesetRulesRequiredStatusChecksArgs) ToRepositoryRulesetRulesRequiredStatusChecksPtrOutput() RepositoryRulesetRulesRequiredStatusChecksPtrOutput { + return i.ToRepositoryRulesetRulesRequiredStatusChecksPtrOutputWithContext(context.Background()) } -func (i RepositoryPagesArgs) ToRepositoryPagesPtrOutputWithContext(ctx context.Context) RepositoryPagesPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesOutput).ToRepositoryPagesPtrOutputWithContext(ctx) +func (i RepositoryRulesetRulesRequiredStatusChecksArgs) ToRepositoryRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredStatusChecksPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesRequiredStatusChecksOutput).ToRepositoryRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx) } -// RepositoryPagesPtrInput is an input type that accepts RepositoryPagesArgs, RepositoryPagesPtr and RepositoryPagesPtrOutput values. -// You can construct a concrete instance of `RepositoryPagesPtrInput` via: +// RepositoryRulesetRulesRequiredStatusChecksPtrInput is an input type that accepts RepositoryRulesetRulesRequiredStatusChecksArgs, RepositoryRulesetRulesRequiredStatusChecksPtr and RepositoryRulesetRulesRequiredStatusChecksPtrOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesRequiredStatusChecksPtrInput` via: // -// RepositoryPagesArgs{...} +// RepositoryRulesetRulesRequiredStatusChecksArgs{...} // // or: // // nil -type RepositoryPagesPtrInput interface { +type RepositoryRulesetRulesRequiredStatusChecksPtrInput interface { pulumi.Input - ToRepositoryPagesPtrOutput() RepositoryPagesPtrOutput - ToRepositoryPagesPtrOutputWithContext(context.Context) RepositoryPagesPtrOutput + ToRepositoryRulesetRulesRequiredStatusChecksPtrOutput() RepositoryRulesetRulesRequiredStatusChecksPtrOutput + ToRepositoryRulesetRulesRequiredStatusChecksPtrOutputWithContext(context.Context) RepositoryRulesetRulesRequiredStatusChecksPtrOutput +} + +type repositoryRulesetRulesRequiredStatusChecksPtrType RepositoryRulesetRulesRequiredStatusChecksArgs + +func RepositoryRulesetRulesRequiredStatusChecksPtr(v *RepositoryRulesetRulesRequiredStatusChecksArgs) RepositoryRulesetRulesRequiredStatusChecksPtrInput { + return (*repositoryRulesetRulesRequiredStatusChecksPtrType)(v) +} + +func (*repositoryRulesetRulesRequiredStatusChecksPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesRequiredStatusChecks)(nil)).Elem() +} + +func (i *repositoryRulesetRulesRequiredStatusChecksPtrType) ToRepositoryRulesetRulesRequiredStatusChecksPtrOutput() RepositoryRulesetRulesRequiredStatusChecksPtrOutput { + return i.ToRepositoryRulesetRulesRequiredStatusChecksPtrOutputWithContext(context.Background()) +} + +func (i *repositoryRulesetRulesRequiredStatusChecksPtrType) ToRepositoryRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredStatusChecksPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesRequiredStatusChecksPtrOutput) +} + +func (i *repositoryRulesetRulesRequiredStatusChecksPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesRequiredStatusChecks] { + return pulumix.Output[*RepositoryRulesetRulesRequiredStatusChecks]{ + OutputState: i.ToRepositoryRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx).OutputState, + } +} + +type RepositoryRulesetRulesRequiredStatusChecksOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesRequiredStatusChecksOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesRequiredStatusChecks)(nil)).Elem() +} + +func (o RepositoryRulesetRulesRequiredStatusChecksOutput) ToRepositoryRulesetRulesRequiredStatusChecksOutput() RepositoryRulesetRulesRequiredStatusChecksOutput { + return o +} + +func (o RepositoryRulesetRulesRequiredStatusChecksOutput) ToRepositoryRulesetRulesRequiredStatusChecksOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredStatusChecksOutput { + return o +} + +func (o RepositoryRulesetRulesRequiredStatusChecksOutput) ToRepositoryRulesetRulesRequiredStatusChecksPtrOutput() RepositoryRulesetRulesRequiredStatusChecksPtrOutput { + return o.ToRepositoryRulesetRulesRequiredStatusChecksPtrOutputWithContext(context.Background()) +} + +func (o RepositoryRulesetRulesRequiredStatusChecksOutput) ToRepositoryRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredStatusChecksPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryRulesetRulesRequiredStatusChecks) *RepositoryRulesetRulesRequiredStatusChecks { + return &v + }).(RepositoryRulesetRulesRequiredStatusChecksPtrOutput) +} + +func (o RepositoryRulesetRulesRequiredStatusChecksOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesRequiredStatusChecks] { + return pulumix.Output[RepositoryRulesetRulesRequiredStatusChecks]{ + OutputState: o.OutputState, + } } -type repositoryPagesPtrType RepositoryPagesArgs +// (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) +func (o RepositoryRulesetRulesRequiredStatusChecksOutput) RequiredChecks() RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return o.ApplyT(func(v RepositoryRulesetRulesRequiredStatusChecks) []RepositoryRulesetRulesRequiredStatusChecksRequiredCheck { + return v.RequiredChecks + }).(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) +} -func RepositoryPagesPtr(v *RepositoryPagesArgs) RepositoryPagesPtrInput { - return (*repositoryPagesPtrType)(v) +// (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. +func (o RepositoryRulesetRulesRequiredStatusChecksOutput) StrictRequiredStatusChecksPolicy() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesRequiredStatusChecks) *bool { return v.StrictRequiredStatusChecksPolicy }).(pulumi.BoolPtrOutput) } -func (*repositoryPagesPtrType) ElementType() reflect.Type { - return reflect.TypeOf((**RepositoryPages)(nil)).Elem() +type RepositoryRulesetRulesRequiredStatusChecksPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesRequiredStatusChecksPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesRequiredStatusChecks)(nil)).Elem() } -func (i *repositoryPagesPtrType) ToRepositoryPagesPtrOutput() RepositoryPagesPtrOutput { - return i.ToRepositoryPagesPtrOutputWithContext(context.Background()) +func (o RepositoryRulesetRulesRequiredStatusChecksPtrOutput) ToRepositoryRulesetRulesRequiredStatusChecksPtrOutput() RepositoryRulesetRulesRequiredStatusChecksPtrOutput { + return o } -func (i *repositoryPagesPtrType) ToRepositoryPagesPtrOutputWithContext(ctx context.Context) RepositoryPagesPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesPtrOutput) +func (o RepositoryRulesetRulesRequiredStatusChecksPtrOutput) ToRepositoryRulesetRulesRequiredStatusChecksPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredStatusChecksPtrOutput { + return o } -func (i *repositoryPagesPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryPages] { - return pulumix.Output[*RepositoryPages]{ - OutputState: i.ToRepositoryPagesPtrOutputWithContext(ctx).OutputState, +func (o RepositoryRulesetRulesRequiredStatusChecksPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesRequiredStatusChecks] { + return pulumix.Output[*RepositoryRulesetRulesRequiredStatusChecks]{ + OutputState: o.OutputState, } } -type RepositoryPagesOutput struct{ *pulumi.OutputState } +func (o RepositoryRulesetRulesRequiredStatusChecksPtrOutput) Elem() RepositoryRulesetRulesRequiredStatusChecksOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesRequiredStatusChecks) RepositoryRulesetRulesRequiredStatusChecks { + if v != nil { + return *v + } + var ret RepositoryRulesetRulesRequiredStatusChecks + return ret + }).(RepositoryRulesetRulesRequiredStatusChecksOutput) +} -func (RepositoryPagesOutput) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryPages)(nil)).Elem() +// (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) +func (o RepositoryRulesetRulesRequiredStatusChecksPtrOutput) RequiredChecks() RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesRequiredStatusChecks) []RepositoryRulesetRulesRequiredStatusChecksRequiredCheck { + if v == nil { + return nil + } + return v.RequiredChecks + }).(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) } -func (o RepositoryPagesOutput) ToRepositoryPagesOutput() RepositoryPagesOutput { - return o +// (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. +func (o RepositoryRulesetRulesRequiredStatusChecksPtrOutput) StrictRequiredStatusChecksPolicy() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesRequiredStatusChecks) *bool { + if v == nil { + return nil + } + return v.StrictRequiredStatusChecksPolicy + }).(pulumi.BoolPtrOutput) } -func (o RepositoryPagesOutput) ToRepositoryPagesOutputWithContext(ctx context.Context) RepositoryPagesOutput { - return o +type RepositoryRulesetRulesRequiredStatusChecksRequiredCheck struct { + // (String) The status check context name that must be present on the commit. + Context string `pulumi:"context"` + // (Number) The optional integration ID that this status check must originate from. + IntegrationId *int `pulumi:"integrationId"` } -func (o RepositoryPagesOutput) ToRepositoryPagesPtrOutput() RepositoryPagesPtrOutput { - return o.ToRepositoryPagesPtrOutputWithContext(context.Background()) +// RepositoryRulesetRulesRequiredStatusChecksRequiredCheckInput is an input type that accepts RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs and RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesRequiredStatusChecksRequiredCheckInput` via: +// +// RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs{...} +type RepositoryRulesetRulesRequiredStatusChecksRequiredCheckInput interface { + pulumi.Input + + ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput() RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput + ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutputWithContext(context.Context) RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput } -func (o RepositoryPagesOutput) ToRepositoryPagesPtrOutputWithContext(ctx context.Context) RepositoryPagesPtrOutput { - return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryPages) *RepositoryPages { - return &v - }).(RepositoryPagesPtrOutput) +type RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs struct { + // (String) The status check context name that must be present on the commit. + Context pulumi.StringInput `pulumi:"context"` + // (Number) The optional integration ID that this status check must originate from. + IntegrationId pulumi.IntPtrInput `pulumi:"integrationId"` } -func (o RepositoryPagesOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryPages] { - return pulumix.Output[RepositoryPages]{ - OutputState: o.OutputState, - } +func (RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesRequiredStatusChecksRequiredCheck)(nil)).Elem() } -// The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. -func (o RepositoryPagesOutput) BuildType() pulumi.StringPtrOutput { - return o.ApplyT(func(v RepositoryPages) *string { return v.BuildType }).(pulumi.StringPtrOutput) +func (i RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs) ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput() RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput { + return i.ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutputWithContext(context.Background()) } -// The custom domain for the repository. This can only be set after the repository has been created. -func (o RepositoryPagesOutput) Cname() pulumi.StringPtrOutput { - return o.ApplyT(func(v RepositoryPages) *string { return v.Cname }).(pulumi.StringPtrOutput) +func (i RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs) ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput) } -// Whether the rendered GitHub Pages site has a custom 404 page. -func (o RepositoryPagesOutput) Custom404() pulumi.BoolPtrOutput { - return o.ApplyT(func(v RepositoryPages) *bool { return v.Custom404 }).(pulumi.BoolPtrOutput) +func (i RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesRequiredStatusChecksRequiredCheck] { + return pulumix.Output[RepositoryRulesetRulesRequiredStatusChecksRequiredCheck]{ + OutputState: i.ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutputWithContext(ctx).OutputState, + } } -// The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. -func (o RepositoryPagesOutput) HtmlUrl() pulumi.StringPtrOutput { - return o.ApplyT(func(v RepositoryPages) *string { return v.HtmlUrl }).(pulumi.StringPtrOutput) +// RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayInput is an input type that accepts RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArray and RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayInput` via: +// +// RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArray{ RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs{...} } +type RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayInput interface { + pulumi.Input + + ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput() RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput + ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutputWithContext(context.Context) RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput } -// The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. -func (o RepositoryPagesOutput) Source() RepositoryPagesSourcePtrOutput { - return o.ApplyT(func(v RepositoryPages) *RepositoryPagesSource { return v.Source }).(RepositoryPagesSourcePtrOutput) +type RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArray []RepositoryRulesetRulesRequiredStatusChecksRequiredCheckInput + +func (RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryRulesetRulesRequiredStatusChecksRequiredCheck)(nil)).Elem() } -// Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. -func (o RepositoryPagesOutput) Status() pulumi.StringPtrOutput { - return o.ApplyT(func(v RepositoryPages) *string { return v.Status }).(pulumi.StringPtrOutput) +func (i RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArray) ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput() RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return i.ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutputWithContext(context.Background()) } -func (o RepositoryPagesOutput) Url() pulumi.StringPtrOutput { - return o.ApplyT(func(v RepositoryPages) *string { return v.Url }).(pulumi.StringPtrOutput) +func (i RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArray) ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) } -type RepositoryPagesPtrOutput struct{ *pulumi.OutputState } +func (i RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArray) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryRulesetRulesRequiredStatusChecksRequiredCheck] { + return pulumix.Output[[]RepositoryRulesetRulesRequiredStatusChecksRequiredCheck]{ + OutputState: i.ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutputWithContext(ctx).OutputState, + } +} -func (RepositoryPagesPtrOutput) ElementType() reflect.Type { - return reflect.TypeOf((**RepositoryPages)(nil)).Elem() +type RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesRequiredStatusChecksRequiredCheck)(nil)).Elem() } -func (o RepositoryPagesPtrOutput) ToRepositoryPagesPtrOutput() RepositoryPagesPtrOutput { +func (o RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput) ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput() RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput { return o } -func (o RepositoryPagesPtrOutput) ToRepositoryPagesPtrOutputWithContext(ctx context.Context) RepositoryPagesPtrOutput { +func (o RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput) ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput { return o } -func (o RepositoryPagesPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryPages] { - return pulumix.Output[*RepositoryPages]{ +func (o RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesRequiredStatusChecksRequiredCheck] { + return pulumix.Output[RepositoryRulesetRulesRequiredStatusChecksRequiredCheck]{ OutputState: o.OutputState, } } -func (o RepositoryPagesPtrOutput) Elem() RepositoryPagesOutput { - return o.ApplyT(func(v *RepositoryPages) RepositoryPages { - if v != nil { - return *v - } - var ret RepositoryPages - return ret - }).(RepositoryPagesOutput) +// (String) The status check context name that must be present on the commit. +func (o RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput) Context() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetRulesRequiredStatusChecksRequiredCheck) string { return v.Context }).(pulumi.StringOutput) } -// The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. -func (o RepositoryPagesPtrOutput) BuildType() pulumi.StringPtrOutput { - return o.ApplyT(func(v *RepositoryPages) *string { - if v == nil { - return nil - } - return v.BuildType - }).(pulumi.StringPtrOutput) +// (Number) The optional integration ID that this status check must originate from. +func (o RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput) IntegrationId() pulumi.IntPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesRequiredStatusChecksRequiredCheck) *int { return v.IntegrationId }).(pulumi.IntPtrOutput) } -// The custom domain for the repository. This can only be set after the repository has been created. -func (o RepositoryPagesPtrOutput) Cname() pulumi.StringPtrOutput { - return o.ApplyT(func(v *RepositoryPages) *string { - if v == nil { - return nil - } - return v.Cname - }).(pulumi.StringPtrOutput) -} +type RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput struct{ *pulumi.OutputState } -// Whether the rendered GitHub Pages site has a custom 404 page. -func (o RepositoryPagesPtrOutput) Custom404() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *RepositoryPages) *bool { - if v == nil { - return nil - } - return v.Custom404 - }).(pulumi.BoolPtrOutput) +func (RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]RepositoryRulesetRulesRequiredStatusChecksRequiredCheck)(nil)).Elem() } -// The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. -func (o RepositoryPagesPtrOutput) HtmlUrl() pulumi.StringPtrOutput { - return o.ApplyT(func(v *RepositoryPages) *string { - if v == nil { - return nil - } - return v.HtmlUrl - }).(pulumi.StringPtrOutput) +func (o RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput() RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return o } -// The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. -func (o RepositoryPagesPtrOutput) Source() RepositoryPagesSourcePtrOutput { - return o.ApplyT(func(v *RepositoryPages) *RepositoryPagesSource { - if v == nil { - return nil - } - return v.Source - }).(RepositoryPagesSourcePtrOutput) +func (o RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) ToRepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutputWithContext(ctx context.Context) RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput { + return o } -// Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. -func (o RepositoryPagesPtrOutput) Status() pulumi.StringPtrOutput { - return o.ApplyT(func(v *RepositoryPages) *string { - if v == nil { - return nil - } - return v.Status - }).(pulumi.StringPtrOutput) +func (o RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]RepositoryRulesetRulesRequiredStatusChecksRequiredCheck] { + return pulumix.Output[[]RepositoryRulesetRulesRequiredStatusChecksRequiredCheck]{ + OutputState: o.OutputState, + } } -func (o RepositoryPagesPtrOutput) Url() pulumi.StringPtrOutput { - return o.ApplyT(func(v *RepositoryPages) *string { - if v == nil { - return nil - } - return v.Url - }).(pulumi.StringPtrOutput) +func (o RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput) Index(i pulumi.IntInput) RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) RepositoryRulesetRulesRequiredStatusChecksRequiredCheck { + return vs[0].([]RepositoryRulesetRulesRequiredStatusChecksRequiredCheck)[vs[1].(int)] + }).(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput) } -type RepositoryPagesSource struct { - // The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. - Branch string `pulumi:"branch"` - // The repository directory from which the site publishes (Default: `/`). - Path *string `pulumi:"path"` +type RepositoryRulesetRulesTagNamePattern struct { + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate *bool `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator string `pulumi:"operator"` + // (String) The pattern to match with. + Pattern string `pulumi:"pattern"` } -// RepositoryPagesSourceInput is an input type that accepts RepositoryPagesSourceArgs and RepositoryPagesSourceOutput values. -// You can construct a concrete instance of `RepositoryPagesSourceInput` via: +// RepositoryRulesetRulesTagNamePatternInput is an input type that accepts RepositoryRulesetRulesTagNamePatternArgs and RepositoryRulesetRulesTagNamePatternOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesTagNamePatternInput` via: // -// RepositoryPagesSourceArgs{...} -type RepositoryPagesSourceInput interface { +// RepositoryRulesetRulesTagNamePatternArgs{...} +type RepositoryRulesetRulesTagNamePatternInput interface { pulumi.Input - ToRepositoryPagesSourceOutput() RepositoryPagesSourceOutput - ToRepositoryPagesSourceOutputWithContext(context.Context) RepositoryPagesSourceOutput + ToRepositoryRulesetRulesTagNamePatternOutput() RepositoryRulesetRulesTagNamePatternOutput + ToRepositoryRulesetRulesTagNamePatternOutputWithContext(context.Context) RepositoryRulesetRulesTagNamePatternOutput } -type RepositoryPagesSourceArgs struct { - // The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. - Branch pulumi.StringInput `pulumi:"branch"` - // The repository directory from which the site publishes (Default: `/`). - Path pulumi.StringPtrInput `pulumi:"path"` +type RepositoryRulesetRulesTagNamePatternArgs struct { + // (String) The name of the ruleset. + Name pulumi.StringPtrInput `pulumi:"name"` + // (Boolean) If true, the rule will fail if the pattern matches. + Negate pulumi.BoolPtrInput `pulumi:"negate"` + // (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + Operator pulumi.StringInput `pulumi:"operator"` + // (String) The pattern to match with. + Pattern pulumi.StringInput `pulumi:"pattern"` } -func (RepositoryPagesSourceArgs) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryPagesSource)(nil)).Elem() +func (RepositoryRulesetRulesTagNamePatternArgs) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesTagNamePattern)(nil)).Elem() } -func (i RepositoryPagesSourceArgs) ToRepositoryPagesSourceOutput() RepositoryPagesSourceOutput { - return i.ToRepositoryPagesSourceOutputWithContext(context.Background()) +func (i RepositoryRulesetRulesTagNamePatternArgs) ToRepositoryRulesetRulesTagNamePatternOutput() RepositoryRulesetRulesTagNamePatternOutput { + return i.ToRepositoryRulesetRulesTagNamePatternOutputWithContext(context.Background()) } -func (i RepositoryPagesSourceArgs) ToRepositoryPagesSourceOutputWithContext(ctx context.Context) RepositoryPagesSourceOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesSourceOutput) +func (i RepositoryRulesetRulesTagNamePatternArgs) ToRepositoryRulesetRulesTagNamePatternOutputWithContext(ctx context.Context) RepositoryRulesetRulesTagNamePatternOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesTagNamePatternOutput) } -func (i RepositoryPagesSourceArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryPagesSource] { - return pulumix.Output[RepositoryPagesSource]{ - OutputState: i.ToRepositoryPagesSourceOutputWithContext(ctx).OutputState, +func (i RepositoryRulesetRulesTagNamePatternArgs) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesTagNamePattern] { + return pulumix.Output[RepositoryRulesetRulesTagNamePattern]{ + OutputState: i.ToRepositoryRulesetRulesTagNamePatternOutputWithContext(ctx).OutputState, } } -func (i RepositoryPagesSourceArgs) ToRepositoryPagesSourcePtrOutput() RepositoryPagesSourcePtrOutput { - return i.ToRepositoryPagesSourcePtrOutputWithContext(context.Background()) +func (i RepositoryRulesetRulesTagNamePatternArgs) ToRepositoryRulesetRulesTagNamePatternPtrOutput() RepositoryRulesetRulesTagNamePatternPtrOutput { + return i.ToRepositoryRulesetRulesTagNamePatternPtrOutputWithContext(context.Background()) } -func (i RepositoryPagesSourceArgs) ToRepositoryPagesSourcePtrOutputWithContext(ctx context.Context) RepositoryPagesSourcePtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesSourceOutput).ToRepositoryPagesSourcePtrOutputWithContext(ctx) +func (i RepositoryRulesetRulesTagNamePatternArgs) ToRepositoryRulesetRulesTagNamePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesTagNamePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesTagNamePatternOutput).ToRepositoryRulesetRulesTagNamePatternPtrOutputWithContext(ctx) } -// RepositoryPagesSourcePtrInput is an input type that accepts RepositoryPagesSourceArgs, RepositoryPagesSourcePtr and RepositoryPagesSourcePtrOutput values. -// You can construct a concrete instance of `RepositoryPagesSourcePtrInput` via: +// RepositoryRulesetRulesTagNamePatternPtrInput is an input type that accepts RepositoryRulesetRulesTagNamePatternArgs, RepositoryRulesetRulesTagNamePatternPtr and RepositoryRulesetRulesTagNamePatternPtrOutput values. +// You can construct a concrete instance of `RepositoryRulesetRulesTagNamePatternPtrInput` via: // -// RepositoryPagesSourceArgs{...} +// RepositoryRulesetRulesTagNamePatternArgs{...} // // or: // // nil -type RepositoryPagesSourcePtrInput interface { +type RepositoryRulesetRulesTagNamePatternPtrInput interface { pulumi.Input - ToRepositoryPagesSourcePtrOutput() RepositoryPagesSourcePtrOutput - ToRepositoryPagesSourcePtrOutputWithContext(context.Context) RepositoryPagesSourcePtrOutput + ToRepositoryRulesetRulesTagNamePatternPtrOutput() RepositoryRulesetRulesTagNamePatternPtrOutput + ToRepositoryRulesetRulesTagNamePatternPtrOutputWithContext(context.Context) RepositoryRulesetRulesTagNamePatternPtrOutput } -type repositoryPagesSourcePtrType RepositoryPagesSourceArgs +type repositoryRulesetRulesTagNamePatternPtrType RepositoryRulesetRulesTagNamePatternArgs -func RepositoryPagesSourcePtr(v *RepositoryPagesSourceArgs) RepositoryPagesSourcePtrInput { - return (*repositoryPagesSourcePtrType)(v) +func RepositoryRulesetRulesTagNamePatternPtr(v *RepositoryRulesetRulesTagNamePatternArgs) RepositoryRulesetRulesTagNamePatternPtrInput { + return (*repositoryRulesetRulesTagNamePatternPtrType)(v) } -func (*repositoryPagesSourcePtrType) ElementType() reflect.Type { - return reflect.TypeOf((**RepositoryPagesSource)(nil)).Elem() +func (*repositoryRulesetRulesTagNamePatternPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesTagNamePattern)(nil)).Elem() } -func (i *repositoryPagesSourcePtrType) ToRepositoryPagesSourcePtrOutput() RepositoryPagesSourcePtrOutput { - return i.ToRepositoryPagesSourcePtrOutputWithContext(context.Background()) +func (i *repositoryRulesetRulesTagNamePatternPtrType) ToRepositoryRulesetRulesTagNamePatternPtrOutput() RepositoryRulesetRulesTagNamePatternPtrOutput { + return i.ToRepositoryRulesetRulesTagNamePatternPtrOutputWithContext(context.Background()) } -func (i *repositoryPagesSourcePtrType) ToRepositoryPagesSourcePtrOutputWithContext(ctx context.Context) RepositoryPagesSourcePtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(RepositoryPagesSourcePtrOutput) +func (i *repositoryRulesetRulesTagNamePatternPtrType) ToRepositoryRulesetRulesTagNamePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesTagNamePatternPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetRulesTagNamePatternPtrOutput) } -func (i *repositoryPagesSourcePtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryPagesSource] { - return pulumix.Output[*RepositoryPagesSource]{ - OutputState: i.ToRepositoryPagesSourcePtrOutputWithContext(ctx).OutputState, +func (i *repositoryRulesetRulesTagNamePatternPtrType) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesTagNamePattern] { + return pulumix.Output[*RepositoryRulesetRulesTagNamePattern]{ + OutputState: i.ToRepositoryRulesetRulesTagNamePatternPtrOutputWithContext(ctx).OutputState, } } -type RepositoryPagesSourceOutput struct{ *pulumi.OutputState } +type RepositoryRulesetRulesTagNamePatternOutput struct{ *pulumi.OutputState } -func (RepositoryPagesSourceOutput) ElementType() reflect.Type { - return reflect.TypeOf((*RepositoryPagesSource)(nil)).Elem() +func (RepositoryRulesetRulesTagNamePatternOutput) ElementType() reflect.Type { + return reflect.TypeOf((*RepositoryRulesetRulesTagNamePattern)(nil)).Elem() } -func (o RepositoryPagesSourceOutput) ToRepositoryPagesSourceOutput() RepositoryPagesSourceOutput { +func (o RepositoryRulesetRulesTagNamePatternOutput) ToRepositoryRulesetRulesTagNamePatternOutput() RepositoryRulesetRulesTagNamePatternOutput { return o } -func (o RepositoryPagesSourceOutput) ToRepositoryPagesSourceOutputWithContext(ctx context.Context) RepositoryPagesSourceOutput { +func (o RepositoryRulesetRulesTagNamePatternOutput) ToRepositoryRulesetRulesTagNamePatternOutputWithContext(ctx context.Context) RepositoryRulesetRulesTagNamePatternOutput { return o } -func (o RepositoryPagesSourceOutput) ToRepositoryPagesSourcePtrOutput() RepositoryPagesSourcePtrOutput { - return o.ToRepositoryPagesSourcePtrOutputWithContext(context.Background()) +func (o RepositoryRulesetRulesTagNamePatternOutput) ToRepositoryRulesetRulesTagNamePatternPtrOutput() RepositoryRulesetRulesTagNamePatternPtrOutput { + return o.ToRepositoryRulesetRulesTagNamePatternPtrOutputWithContext(context.Background()) } -func (o RepositoryPagesSourceOutput) ToRepositoryPagesSourcePtrOutputWithContext(ctx context.Context) RepositoryPagesSourcePtrOutput { - return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryPagesSource) *RepositoryPagesSource { +func (o RepositoryRulesetRulesTagNamePatternOutput) ToRepositoryRulesetRulesTagNamePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesTagNamePatternPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v RepositoryRulesetRulesTagNamePattern) *RepositoryRulesetRulesTagNamePattern { return &v - }).(RepositoryPagesSourcePtrOutput) + }).(RepositoryRulesetRulesTagNamePatternPtrOutput) } -func (o RepositoryPagesSourceOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryPagesSource] { - return pulumix.Output[RepositoryPagesSource]{ +func (o RepositoryRulesetRulesTagNamePatternOutput) ToOutput(ctx context.Context) pulumix.Output[RepositoryRulesetRulesTagNamePattern] { + return pulumix.Output[RepositoryRulesetRulesTagNamePattern]{ OutputState: o.OutputState, } } -// The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. -func (o RepositoryPagesSourceOutput) Branch() pulumi.StringOutput { - return o.ApplyT(func(v RepositoryPagesSource) string { return v.Branch }).(pulumi.StringOutput) +// (String) The name of the ruleset. +func (o RepositoryRulesetRulesTagNamePatternOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesTagNamePattern) *string { return v.Name }).(pulumi.StringPtrOutput) } -// The repository directory from which the site publishes (Default: `/`). -func (o RepositoryPagesSourceOutput) Path() pulumi.StringPtrOutput { - return o.ApplyT(func(v RepositoryPagesSource) *string { return v.Path }).(pulumi.StringPtrOutput) +// (Boolean) If true, the rule will fail if the pattern matches. +func (o RepositoryRulesetRulesTagNamePatternOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v RepositoryRulesetRulesTagNamePattern) *bool { return v.Negate }).(pulumi.BoolPtrOutput) } -type RepositoryPagesSourcePtrOutput struct{ *pulumi.OutputState } +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o RepositoryRulesetRulesTagNamePatternOutput) Operator() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetRulesTagNamePattern) string { return v.Operator }).(pulumi.StringOutput) +} -func (RepositoryPagesSourcePtrOutput) ElementType() reflect.Type { - return reflect.TypeOf((**RepositoryPagesSource)(nil)).Elem() +// (String) The pattern to match with. +func (o RepositoryRulesetRulesTagNamePatternOutput) Pattern() pulumi.StringOutput { + return o.ApplyT(func(v RepositoryRulesetRulesTagNamePattern) string { return v.Pattern }).(pulumi.StringOutput) } -func (o RepositoryPagesSourcePtrOutput) ToRepositoryPagesSourcePtrOutput() RepositoryPagesSourcePtrOutput { +type RepositoryRulesetRulesTagNamePatternPtrOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetRulesTagNamePatternPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRulesetRulesTagNamePattern)(nil)).Elem() +} + +func (o RepositoryRulesetRulesTagNamePatternPtrOutput) ToRepositoryRulesetRulesTagNamePatternPtrOutput() RepositoryRulesetRulesTagNamePatternPtrOutput { return o } -func (o RepositoryPagesSourcePtrOutput) ToRepositoryPagesSourcePtrOutputWithContext(ctx context.Context) RepositoryPagesSourcePtrOutput { +func (o RepositoryRulesetRulesTagNamePatternPtrOutput) ToRepositoryRulesetRulesTagNamePatternPtrOutputWithContext(ctx context.Context) RepositoryRulesetRulesTagNamePatternPtrOutput { return o } -func (o RepositoryPagesSourcePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryPagesSource] { - return pulumix.Output[*RepositoryPagesSource]{ +func (o RepositoryRulesetRulesTagNamePatternPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRulesetRulesTagNamePattern] { + return pulumix.Output[*RepositoryRulesetRulesTagNamePattern]{ OutputState: o.OutputState, } } -func (o RepositoryPagesSourcePtrOutput) Elem() RepositoryPagesSourceOutput { - return o.ApplyT(func(v *RepositoryPagesSource) RepositoryPagesSource { +func (o RepositoryRulesetRulesTagNamePatternPtrOutput) Elem() RepositoryRulesetRulesTagNamePatternOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesTagNamePattern) RepositoryRulesetRulesTagNamePattern { if v != nil { return *v } - var ret RepositoryPagesSource + var ret RepositoryRulesetRulesTagNamePattern return ret - }).(RepositoryPagesSourceOutput) + }).(RepositoryRulesetRulesTagNamePatternOutput) } -// The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. -func (o RepositoryPagesSourcePtrOutput) Branch() pulumi.StringPtrOutput { - return o.ApplyT(func(v *RepositoryPagesSource) *string { +// (String) The name of the ruleset. +func (o RepositoryRulesetRulesTagNamePatternPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesTagNamePattern) *string { if v == nil { return nil } - return &v.Branch + return v.Name }).(pulumi.StringPtrOutput) } -// The repository directory from which the site publishes (Default: `/`). -func (o RepositoryPagesSourcePtrOutput) Path() pulumi.StringPtrOutput { - return o.ApplyT(func(v *RepositoryPagesSource) *string { +// (Boolean) If true, the rule will fail if the pattern matches. +func (o RepositoryRulesetRulesTagNamePatternPtrOutput) Negate() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesTagNamePattern) *bool { if v == nil { return nil } - return v.Path + return v.Negate + }).(pulumi.BoolPtrOutput) +} + +// (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. +func (o RepositoryRulesetRulesTagNamePatternPtrOutput) Operator() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesTagNamePattern) *string { + if v == nil { + return nil + } + return &v.Operator + }).(pulumi.StringPtrOutput) +} + +// (String) The pattern to match with. +func (o RepositoryRulesetRulesTagNamePatternPtrOutput) Pattern() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRulesetRulesTagNamePattern) *string { + if v == nil { + return nil + } + return &v.Pattern }).(pulumi.StringPtrOutput) } @@ -9932,6 +15410,32 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*BranchProtectionV3RequiredStatusChecksPtrInput)(nil)).Elem(), BranchProtectionV3RequiredStatusChecksArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*BranchProtectionV3RestrictionsInput)(nil)).Elem(), BranchProtectionV3RestrictionsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*BranchProtectionV3RestrictionsPtrInput)(nil)).Elem(), BranchProtectionV3RestrictionsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetBypassActorInput)(nil)).Elem(), OrganizationRulesetBypassActorArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetBypassActorArrayInput)(nil)).Elem(), OrganizationRulesetBypassActorArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetConditionsInput)(nil)).Elem(), OrganizationRulesetConditionsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetConditionsPtrInput)(nil)).Elem(), OrganizationRulesetConditionsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetConditionsRefNameInput)(nil)).Elem(), OrganizationRulesetConditionsRefNameArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetConditionsRefNamePtrInput)(nil)).Elem(), OrganizationRulesetConditionsRefNameArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetConditionsRepositoryNameInput)(nil)).Elem(), OrganizationRulesetConditionsRepositoryNameArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetConditionsRepositoryNamePtrInput)(nil)).Elem(), OrganizationRulesetConditionsRepositoryNameArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesInput)(nil)).Elem(), OrganizationRulesetRulesArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesPtrInput)(nil)).Elem(), OrganizationRulesetRulesArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesBranchNamePatternInput)(nil)).Elem(), OrganizationRulesetRulesBranchNamePatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesBranchNamePatternPtrInput)(nil)).Elem(), OrganizationRulesetRulesBranchNamePatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesCommitAuthorEmailPatternInput)(nil)).Elem(), OrganizationRulesetRulesCommitAuthorEmailPatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesCommitAuthorEmailPatternPtrInput)(nil)).Elem(), OrganizationRulesetRulesCommitAuthorEmailPatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesCommitMessagePatternInput)(nil)).Elem(), OrganizationRulesetRulesCommitMessagePatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesCommitMessagePatternPtrInput)(nil)).Elem(), OrganizationRulesetRulesCommitMessagePatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesCommitterEmailPatternInput)(nil)).Elem(), OrganizationRulesetRulesCommitterEmailPatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesCommitterEmailPatternPtrInput)(nil)).Elem(), OrganizationRulesetRulesCommitterEmailPatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesPullRequestInput)(nil)).Elem(), OrganizationRulesetRulesPullRequestArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesPullRequestPtrInput)(nil)).Elem(), OrganizationRulesetRulesPullRequestArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesRequiredStatusChecksInput)(nil)).Elem(), OrganizationRulesetRulesRequiredStatusChecksArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesRequiredStatusChecksPtrInput)(nil)).Elem(), OrganizationRulesetRulesRequiredStatusChecksArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesRequiredStatusChecksRequiredCheckInput)(nil)).Elem(), OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayInput)(nil)).Elem(), OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesTagNamePatternInput)(nil)).Elem(), OrganizationRulesetRulesTagNamePatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*OrganizationRulesetRulesTagNamePatternPtrInput)(nil)).Elem(), OrganizationRulesetRulesTagNamePatternArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*OrganizationWebhookConfigurationInput)(nil)).Elem(), OrganizationWebhookConfigurationArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*OrganizationWebhookConfigurationPtrInput)(nil)).Elem(), OrganizationWebhookConfigurationArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProviderAppAuthInput)(nil)).Elem(), ProviderAppAuthArgs{}) @@ -9948,6 +15452,32 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*RepositoryPagesPtrInput)(nil)).Elem(), RepositoryPagesArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*RepositoryPagesSourceInput)(nil)).Elem(), RepositoryPagesSourceArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*RepositoryPagesSourcePtrInput)(nil)).Elem(), RepositoryPagesSourceArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetBypassActorInput)(nil)).Elem(), RepositoryRulesetBypassActorArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetBypassActorArrayInput)(nil)).Elem(), RepositoryRulesetBypassActorArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetConditionsInput)(nil)).Elem(), RepositoryRulesetConditionsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetConditionsPtrInput)(nil)).Elem(), RepositoryRulesetConditionsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetConditionsRefNameInput)(nil)).Elem(), RepositoryRulesetConditionsRefNameArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetConditionsRefNamePtrInput)(nil)).Elem(), RepositoryRulesetConditionsRefNameArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesInput)(nil)).Elem(), RepositoryRulesetRulesArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesPtrInput)(nil)).Elem(), RepositoryRulesetRulesArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesBranchNamePatternInput)(nil)).Elem(), RepositoryRulesetRulesBranchNamePatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesBranchNamePatternPtrInput)(nil)).Elem(), RepositoryRulesetRulesBranchNamePatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesCommitAuthorEmailPatternInput)(nil)).Elem(), RepositoryRulesetRulesCommitAuthorEmailPatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesCommitAuthorEmailPatternPtrInput)(nil)).Elem(), RepositoryRulesetRulesCommitAuthorEmailPatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesCommitMessagePatternInput)(nil)).Elem(), RepositoryRulesetRulesCommitMessagePatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesCommitMessagePatternPtrInput)(nil)).Elem(), RepositoryRulesetRulesCommitMessagePatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesCommitterEmailPatternInput)(nil)).Elem(), RepositoryRulesetRulesCommitterEmailPatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesCommitterEmailPatternPtrInput)(nil)).Elem(), RepositoryRulesetRulesCommitterEmailPatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesPullRequestInput)(nil)).Elem(), RepositoryRulesetRulesPullRequestArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesPullRequestPtrInput)(nil)).Elem(), RepositoryRulesetRulesPullRequestArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesRequiredDeploymentsInput)(nil)).Elem(), RepositoryRulesetRulesRequiredDeploymentsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesRequiredDeploymentsPtrInput)(nil)).Elem(), RepositoryRulesetRulesRequiredDeploymentsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesRequiredStatusChecksInput)(nil)).Elem(), RepositoryRulesetRulesRequiredStatusChecksArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesRequiredStatusChecksPtrInput)(nil)).Elem(), RepositoryRulesetRulesRequiredStatusChecksArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesRequiredStatusChecksRequiredCheckInput)(nil)).Elem(), RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayInput)(nil)).Elem(), RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesTagNamePatternInput)(nil)).Elem(), RepositoryRulesetRulesTagNamePatternArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetRulesTagNamePatternPtrInput)(nil)).Elem(), RepositoryRulesetRulesTagNamePatternArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*RepositorySecurityAndAnalysisInput)(nil)).Elem(), RepositorySecurityAndAnalysisArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*RepositorySecurityAndAnalysisPtrInput)(nil)).Elem(), RepositorySecurityAndAnalysisArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*RepositorySecurityAndAnalysisAdvancedSecurityInput)(nil)).Elem(), RepositorySecurityAndAnalysisAdvancedSecurityArgs{}) @@ -10051,6 +15581,32 @@ func init() { pulumi.RegisterOutputType(BranchProtectionV3RequiredStatusChecksPtrOutput{}) pulumi.RegisterOutputType(BranchProtectionV3RestrictionsOutput{}) pulumi.RegisterOutputType(BranchProtectionV3RestrictionsPtrOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetBypassActorOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetBypassActorArrayOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetConditionsOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetConditionsPtrOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetConditionsRefNameOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetConditionsRefNamePtrOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetConditionsRepositoryNameOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetConditionsRepositoryNamePtrOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesPtrOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesBranchNamePatternOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesBranchNamePatternPtrOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesCommitAuthorEmailPatternOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesCommitAuthorEmailPatternPtrOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesCommitMessagePatternOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesCommitMessagePatternPtrOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesCommitterEmailPatternOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesCommitterEmailPatternPtrOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesPullRequestOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesPullRequestPtrOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesRequiredStatusChecksOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesRequiredStatusChecksPtrOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesRequiredStatusChecksRequiredCheckOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesTagNamePatternOutput{}) + pulumi.RegisterOutputType(OrganizationRulesetRulesTagNamePatternPtrOutput{}) pulumi.RegisterOutputType(OrganizationWebhookConfigurationOutput{}) pulumi.RegisterOutputType(OrganizationWebhookConfigurationPtrOutput{}) pulumi.RegisterOutputType(ProviderAppAuthOutput{}) @@ -10067,6 +15623,32 @@ func init() { pulumi.RegisterOutputType(RepositoryPagesPtrOutput{}) pulumi.RegisterOutputType(RepositoryPagesSourceOutput{}) pulumi.RegisterOutputType(RepositoryPagesSourcePtrOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetBypassActorOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetBypassActorArrayOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetConditionsOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetConditionsPtrOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetConditionsRefNameOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetConditionsRefNamePtrOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesPtrOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesBranchNamePatternOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesBranchNamePatternPtrOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesCommitAuthorEmailPatternOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesCommitAuthorEmailPatternPtrOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesCommitMessagePatternOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesCommitMessagePatternPtrOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesCommitterEmailPatternOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesCommitterEmailPatternPtrOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesPullRequestOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesPullRequestPtrOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesRequiredDeploymentsOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesRequiredDeploymentsPtrOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesRequiredStatusChecksOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesRequiredStatusChecksPtrOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArrayOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesTagNamePatternOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetRulesTagNamePatternPtrOutput{}) pulumi.RegisterOutputType(RepositorySecurityAndAnalysisOutput{}) pulumi.RegisterOutputType(RepositorySecurityAndAnalysisPtrOutput{}) pulumi.RegisterOutputType(RepositorySecurityAndAnalysisAdvancedSecurityOutput{}) diff --git a/sdk/go/github/repositoryRuleset.go b/sdk/go/github/repositoryRuleset.go new file mode 100644 index 00000000..e1610df2 --- /dev/null +++ b/sdk/go/github/repositoryRuleset.go @@ -0,0 +1,458 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package github + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-github/sdk/v5/go/github/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +// Creates a GitHub repository ruleset. +// +// This resource allows you to create and manage rulesets on the repository level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-github/sdk/v5/go/github" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleRepository, err := github.NewRepository(ctx, "exampleRepository", &github.RepositoryArgs{ +// Description: pulumi.String("Example repository"), +// }) +// if err != nil { +// return err +// } +// _, err = github.NewRepositoryRuleset(ctx, "exampleRepositoryRuleset", &github.RepositoryRulesetArgs{ +// Repository: exampleRepository.Name, +// Target: pulumi.String("branch"), +// Enforcement: pulumi.String("active"), +// Conditions: &github.RepositoryRulesetConditionsArgs{ +// RefName: &github.RepositoryRulesetConditionsRefNameArgs{ +// Includes: pulumi.StringArray{ +// pulumi.String("~ALL"), +// }, +// Excludes: pulumi.StringArray{}, +// }, +// }, +// BypassActors: github.RepositoryRulesetBypassActorArray{ +// &github.RepositoryRulesetBypassActorArgs{ +// ActorId: pulumi.Int(13473), +// ActorType: pulumi.String("Integration"), +// BypassMode: pulumi.String("always"), +// }, +// }, +// Rules: &github.RepositoryRulesetRulesArgs{ +// Creation: pulumi.Bool(true), +// Update: pulumi.Bool(true), +// Deletion: pulumi.Bool(true), +// RequiredLinearHistory: pulumi.Bool(true), +// RequiredSignatures: pulumi.Bool(true), +// RequiredDeployments: &github.RepositoryRulesetRulesRequiredDeploymentsArgs{ +// RequiredDeploymentEnvironments: pulumi.StringArray{ +// pulumi.String("test"), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// GitHub Repository Rulesets can be imported using the GitHub repository name and ruleset ID e.g. +// +// ```sh +// +// $ pulumi import github:index/repositoryRuleset:RepositoryRuleset example example:12345` +// +// ``` +type RepositoryRuleset struct { + pulumi.CustomResourceState + + // (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + BypassActors RepositoryRulesetBypassActorArrayOutput `pulumi:"bypassActors"` + // (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + Conditions RepositoryRulesetConditionsPtrOutput `pulumi:"conditions"` + // (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + Enforcement pulumi.StringOutput `pulumi:"enforcement"` + // (String) + Etag pulumi.StringOutput `pulumi:"etag"` + // (String) The name of the ruleset. + Name pulumi.StringOutput `pulumi:"name"` + // (String) GraphQL global node id for use with v4 API. + NodeId pulumi.StringOutput `pulumi:"nodeId"` + // (String) Name of the repository to apply rulset to. + Repository pulumi.StringPtrOutput `pulumi:"repository"` + // (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + Rules RepositoryRulesetRulesOutput `pulumi:"rules"` + // (Number) GitHub ID for the ruleset. + RulesetId pulumi.IntOutput `pulumi:"rulesetId"` + // (String) Possible values are `branch` and `tag`. + Target pulumi.StringOutput `pulumi:"target"` +} + +// NewRepositoryRuleset registers a new resource with the given unique name, arguments, and options. +func NewRepositoryRuleset(ctx *pulumi.Context, + name string, args *RepositoryRulesetArgs, opts ...pulumi.ResourceOption) (*RepositoryRuleset, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Enforcement == nil { + return nil, errors.New("invalid value for required argument 'Enforcement'") + } + if args.Rules == nil { + return nil, errors.New("invalid value for required argument 'Rules'") + } + if args.Target == nil { + return nil, errors.New("invalid value for required argument 'Target'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource RepositoryRuleset + err := ctx.RegisterResource("github:index/repositoryRuleset:RepositoryRuleset", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetRepositoryRuleset gets an existing RepositoryRuleset resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetRepositoryRuleset(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *RepositoryRulesetState, opts ...pulumi.ResourceOption) (*RepositoryRuleset, error) { + var resource RepositoryRuleset + err := ctx.ReadResource("github:index/repositoryRuleset:RepositoryRuleset", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering RepositoryRuleset resources. +type repositoryRulesetState struct { + // (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + BypassActors []RepositoryRulesetBypassActor `pulumi:"bypassActors"` + // (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + Conditions *RepositoryRulesetConditions `pulumi:"conditions"` + // (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + Enforcement *string `pulumi:"enforcement"` + // (String) + Etag *string `pulumi:"etag"` + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (String) GraphQL global node id for use with v4 API. + NodeId *string `pulumi:"nodeId"` + // (String) Name of the repository to apply rulset to. + Repository *string `pulumi:"repository"` + // (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + Rules *RepositoryRulesetRules `pulumi:"rules"` + // (Number) GitHub ID for the ruleset. + RulesetId *int `pulumi:"rulesetId"` + // (String) Possible values are `branch` and `tag`. + Target *string `pulumi:"target"` +} + +type RepositoryRulesetState struct { + // (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + BypassActors RepositoryRulesetBypassActorArrayInput + // (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + Conditions RepositoryRulesetConditionsPtrInput + // (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + Enforcement pulumi.StringPtrInput + // (String) + Etag pulumi.StringPtrInput + // (String) The name of the ruleset. + Name pulumi.StringPtrInput + // (String) GraphQL global node id for use with v4 API. + NodeId pulumi.StringPtrInput + // (String) Name of the repository to apply rulset to. + Repository pulumi.StringPtrInput + // (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + Rules RepositoryRulesetRulesPtrInput + // (Number) GitHub ID for the ruleset. + RulesetId pulumi.IntPtrInput + // (String) Possible values are `branch` and `tag`. + Target pulumi.StringPtrInput +} + +func (RepositoryRulesetState) ElementType() reflect.Type { + return reflect.TypeOf((*repositoryRulesetState)(nil)).Elem() +} + +type repositoryRulesetArgs struct { + // (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + BypassActors []RepositoryRulesetBypassActor `pulumi:"bypassActors"` + // (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + Conditions *RepositoryRulesetConditions `pulumi:"conditions"` + // (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + Enforcement string `pulumi:"enforcement"` + // (String) The name of the ruleset. + Name *string `pulumi:"name"` + // (String) Name of the repository to apply rulset to. + Repository *string `pulumi:"repository"` + // (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + Rules RepositoryRulesetRules `pulumi:"rules"` + // (String) Possible values are `branch` and `tag`. + Target string `pulumi:"target"` +} + +// The set of arguments for constructing a RepositoryRuleset resource. +type RepositoryRulesetArgs struct { + // (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + BypassActors RepositoryRulesetBypassActorArrayInput + // (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + Conditions RepositoryRulesetConditionsPtrInput + // (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + Enforcement pulumi.StringInput + // (String) The name of the ruleset. + Name pulumi.StringPtrInput + // (String) Name of the repository to apply rulset to. + Repository pulumi.StringPtrInput + // (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + Rules RepositoryRulesetRulesInput + // (String) Possible values are `branch` and `tag`. + Target pulumi.StringInput +} + +func (RepositoryRulesetArgs) ElementType() reflect.Type { + return reflect.TypeOf((*repositoryRulesetArgs)(nil)).Elem() +} + +type RepositoryRulesetInput interface { + pulumi.Input + + ToRepositoryRulesetOutput() RepositoryRulesetOutput + ToRepositoryRulesetOutputWithContext(ctx context.Context) RepositoryRulesetOutput +} + +func (*RepositoryRuleset) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRuleset)(nil)).Elem() +} + +func (i *RepositoryRuleset) ToRepositoryRulesetOutput() RepositoryRulesetOutput { + return i.ToRepositoryRulesetOutputWithContext(context.Background()) +} + +func (i *RepositoryRuleset) ToRepositoryRulesetOutputWithContext(ctx context.Context) RepositoryRulesetOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetOutput) +} + +func (i *RepositoryRuleset) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRuleset] { + return pulumix.Output[*RepositoryRuleset]{ + OutputState: i.ToRepositoryRulesetOutputWithContext(ctx).OutputState, + } +} + +// RepositoryRulesetArrayInput is an input type that accepts RepositoryRulesetArray and RepositoryRulesetArrayOutput values. +// You can construct a concrete instance of `RepositoryRulesetArrayInput` via: +// +// RepositoryRulesetArray{ RepositoryRulesetArgs{...} } +type RepositoryRulesetArrayInput interface { + pulumi.Input + + ToRepositoryRulesetArrayOutput() RepositoryRulesetArrayOutput + ToRepositoryRulesetArrayOutputWithContext(context.Context) RepositoryRulesetArrayOutput +} + +type RepositoryRulesetArray []RepositoryRulesetInput + +func (RepositoryRulesetArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*RepositoryRuleset)(nil)).Elem() +} + +func (i RepositoryRulesetArray) ToRepositoryRulesetArrayOutput() RepositoryRulesetArrayOutput { + return i.ToRepositoryRulesetArrayOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetArray) ToRepositoryRulesetArrayOutputWithContext(ctx context.Context) RepositoryRulesetArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetArrayOutput) +} + +func (i RepositoryRulesetArray) ToOutput(ctx context.Context) pulumix.Output[[]*RepositoryRuleset] { + return pulumix.Output[[]*RepositoryRuleset]{ + OutputState: i.ToRepositoryRulesetArrayOutputWithContext(ctx).OutputState, + } +} + +// RepositoryRulesetMapInput is an input type that accepts RepositoryRulesetMap and RepositoryRulesetMapOutput values. +// You can construct a concrete instance of `RepositoryRulesetMapInput` via: +// +// RepositoryRulesetMap{ "key": RepositoryRulesetArgs{...} } +type RepositoryRulesetMapInput interface { + pulumi.Input + + ToRepositoryRulesetMapOutput() RepositoryRulesetMapOutput + ToRepositoryRulesetMapOutputWithContext(context.Context) RepositoryRulesetMapOutput +} + +type RepositoryRulesetMap map[string]RepositoryRulesetInput + +func (RepositoryRulesetMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*RepositoryRuleset)(nil)).Elem() +} + +func (i RepositoryRulesetMap) ToRepositoryRulesetMapOutput() RepositoryRulesetMapOutput { + return i.ToRepositoryRulesetMapOutputWithContext(context.Background()) +} + +func (i RepositoryRulesetMap) ToRepositoryRulesetMapOutputWithContext(ctx context.Context) RepositoryRulesetMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryRulesetMapOutput) +} + +func (i RepositoryRulesetMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*RepositoryRuleset] { + return pulumix.Output[map[string]*RepositoryRuleset]{ + OutputState: i.ToRepositoryRulesetMapOutputWithContext(ctx).OutputState, + } +} + +type RepositoryRulesetOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryRuleset)(nil)).Elem() +} + +func (o RepositoryRulesetOutput) ToRepositoryRulesetOutput() RepositoryRulesetOutput { + return o +} + +func (o RepositoryRulesetOutput) ToRepositoryRulesetOutputWithContext(ctx context.Context) RepositoryRulesetOutput { + return o +} + +func (o RepositoryRulesetOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryRuleset] { + return pulumix.Output[*RepositoryRuleset]{ + OutputState: o.OutputState, + } +} + +// (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) +func (o RepositoryRulesetOutput) BypassActors() RepositoryRulesetBypassActorArrayOutput { + return o.ApplyT(func(v *RepositoryRuleset) RepositoryRulesetBypassActorArrayOutput { return v.BypassActors }).(RepositoryRulesetBypassActorArrayOutput) +} + +// (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) +func (o RepositoryRulesetOutput) Conditions() RepositoryRulesetConditionsPtrOutput { + return o.ApplyT(func(v *RepositoryRuleset) RepositoryRulesetConditionsPtrOutput { return v.Conditions }).(RepositoryRulesetConditionsPtrOutput) +} + +// (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. +func (o RepositoryRulesetOutput) Enforcement() pulumi.StringOutput { + return o.ApplyT(func(v *RepositoryRuleset) pulumi.StringOutput { return v.Enforcement }).(pulumi.StringOutput) +} + +// (String) +func (o RepositoryRulesetOutput) Etag() pulumi.StringOutput { + return o.ApplyT(func(v *RepositoryRuleset) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput) +} + +// (String) The name of the ruleset. +func (o RepositoryRulesetOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v *RepositoryRuleset) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) +} + +// (String) GraphQL global node id for use with v4 API. +func (o RepositoryRulesetOutput) NodeId() pulumi.StringOutput { + return o.ApplyT(func(v *RepositoryRuleset) pulumi.StringOutput { return v.NodeId }).(pulumi.StringOutput) +} + +// (String) Name of the repository to apply rulset to. +func (o RepositoryRulesetOutput) Repository() pulumi.StringPtrOutput { + return o.ApplyT(func(v *RepositoryRuleset) pulumi.StringPtrOutput { return v.Repository }).(pulumi.StringPtrOutput) +} + +// (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) +func (o RepositoryRulesetOutput) Rules() RepositoryRulesetRulesOutput { + return o.ApplyT(func(v *RepositoryRuleset) RepositoryRulesetRulesOutput { return v.Rules }).(RepositoryRulesetRulesOutput) +} + +// (Number) GitHub ID for the ruleset. +func (o RepositoryRulesetOutput) RulesetId() pulumi.IntOutput { + return o.ApplyT(func(v *RepositoryRuleset) pulumi.IntOutput { return v.RulesetId }).(pulumi.IntOutput) +} + +// (String) Possible values are `branch` and `tag`. +func (o RepositoryRulesetOutput) Target() pulumi.StringOutput { + return o.ApplyT(func(v *RepositoryRuleset) pulumi.StringOutput { return v.Target }).(pulumi.StringOutput) +} + +type RepositoryRulesetArrayOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*RepositoryRuleset)(nil)).Elem() +} + +func (o RepositoryRulesetArrayOutput) ToRepositoryRulesetArrayOutput() RepositoryRulesetArrayOutput { + return o +} + +func (o RepositoryRulesetArrayOutput) ToRepositoryRulesetArrayOutputWithContext(ctx context.Context) RepositoryRulesetArrayOutput { + return o +} + +func (o RepositoryRulesetArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*RepositoryRuleset] { + return pulumix.Output[[]*RepositoryRuleset]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryRulesetArrayOutput) Index(i pulumi.IntInput) RepositoryRulesetOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RepositoryRuleset { + return vs[0].([]*RepositoryRuleset)[vs[1].(int)] + }).(RepositoryRulesetOutput) +} + +type RepositoryRulesetMapOutput struct{ *pulumi.OutputState } + +func (RepositoryRulesetMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*RepositoryRuleset)(nil)).Elem() +} + +func (o RepositoryRulesetMapOutput) ToRepositoryRulesetMapOutput() RepositoryRulesetMapOutput { + return o +} + +func (o RepositoryRulesetMapOutput) ToRepositoryRulesetMapOutputWithContext(ctx context.Context) RepositoryRulesetMapOutput { + return o +} + +func (o RepositoryRulesetMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*RepositoryRuleset] { + return pulumix.Output[map[string]*RepositoryRuleset]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryRulesetMapOutput) MapIndex(k pulumi.StringInput) RepositoryRulesetOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RepositoryRuleset { + return vs[0].(map[string]*RepositoryRuleset)[vs[1].(string)] + }).(RepositoryRulesetOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetInput)(nil)).Elem(), &RepositoryRuleset{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetArrayInput)(nil)).Elem(), RepositoryRulesetArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryRulesetMapInput)(nil)).Elem(), RepositoryRulesetMap{}) + pulumi.RegisterOutputType(RepositoryRulesetOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetArrayOutput{}) + pulumi.RegisterOutputType(RepositoryRulesetMapOutput{}) +} diff --git a/sdk/go/github/repositoryTopics.go b/sdk/go/github/repositoryTopics.go new file mode 100644 index 00000000..eec4413d --- /dev/null +++ b/sdk/go/github/repositoryTopics.go @@ -0,0 +1,318 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package github + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-github/sdk/v5/go/github/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-github/sdk/v5/go/github" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := github.LookupRepository(ctx, &github.LookupRepositoryArgs{ +// Name: pulumi.StringRef("test"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = github.NewRepositoryTopics(ctx, "testRepositoryTopics", &github.RepositoryTopicsArgs{ +// Repository: pulumi.Any(github_repository.Test.Name), +// Topics: pulumi.StringArray{ +// pulumi.String("topic-1"), +// pulumi.String("topic-2"), +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// Repository topics can be imported using the `name` of the repository. +// +// ```sh +// +// $ pulumi import github:index/repositoryTopics:RepositoryTopics terraform terraform +// +// ``` +type RepositoryTopics struct { + pulumi.CustomResourceState + + // The repository name. + Repository pulumi.StringOutput `pulumi:"repository"` + // A list of topics to add to the repository. + Topics pulumi.StringArrayOutput `pulumi:"topics"` +} + +// NewRepositoryTopics registers a new resource with the given unique name, arguments, and options. +func NewRepositoryTopics(ctx *pulumi.Context, + name string, args *RepositoryTopicsArgs, opts ...pulumi.ResourceOption) (*RepositoryTopics, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Repository == nil { + return nil, errors.New("invalid value for required argument 'Repository'") + } + if args.Topics == nil { + return nil, errors.New("invalid value for required argument 'Topics'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource RepositoryTopics + err := ctx.RegisterResource("github:index/repositoryTopics:RepositoryTopics", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetRepositoryTopics gets an existing RepositoryTopics resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetRepositoryTopics(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *RepositoryTopicsState, opts ...pulumi.ResourceOption) (*RepositoryTopics, error) { + var resource RepositoryTopics + err := ctx.ReadResource("github:index/repositoryTopics:RepositoryTopics", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering RepositoryTopics resources. +type repositoryTopicsState struct { + // The repository name. + Repository *string `pulumi:"repository"` + // A list of topics to add to the repository. + Topics []string `pulumi:"topics"` +} + +type RepositoryTopicsState struct { + // The repository name. + Repository pulumi.StringPtrInput + // A list of topics to add to the repository. + Topics pulumi.StringArrayInput +} + +func (RepositoryTopicsState) ElementType() reflect.Type { + return reflect.TypeOf((*repositoryTopicsState)(nil)).Elem() +} + +type repositoryTopicsArgs struct { + // The repository name. + Repository string `pulumi:"repository"` + // A list of topics to add to the repository. + Topics []string `pulumi:"topics"` +} + +// The set of arguments for constructing a RepositoryTopics resource. +type RepositoryTopicsArgs struct { + // The repository name. + Repository pulumi.StringInput + // A list of topics to add to the repository. + Topics pulumi.StringArrayInput +} + +func (RepositoryTopicsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*repositoryTopicsArgs)(nil)).Elem() +} + +type RepositoryTopicsInput interface { + pulumi.Input + + ToRepositoryTopicsOutput() RepositoryTopicsOutput + ToRepositoryTopicsOutputWithContext(ctx context.Context) RepositoryTopicsOutput +} + +func (*RepositoryTopics) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryTopics)(nil)).Elem() +} + +func (i *RepositoryTopics) ToRepositoryTopicsOutput() RepositoryTopicsOutput { + return i.ToRepositoryTopicsOutputWithContext(context.Background()) +} + +func (i *RepositoryTopics) ToRepositoryTopicsOutputWithContext(ctx context.Context) RepositoryTopicsOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryTopicsOutput) +} + +func (i *RepositoryTopics) ToOutput(ctx context.Context) pulumix.Output[*RepositoryTopics] { + return pulumix.Output[*RepositoryTopics]{ + OutputState: i.ToRepositoryTopicsOutputWithContext(ctx).OutputState, + } +} + +// RepositoryTopicsArrayInput is an input type that accepts RepositoryTopicsArray and RepositoryTopicsArrayOutput values. +// You can construct a concrete instance of `RepositoryTopicsArrayInput` via: +// +// RepositoryTopicsArray{ RepositoryTopicsArgs{...} } +type RepositoryTopicsArrayInput interface { + pulumi.Input + + ToRepositoryTopicsArrayOutput() RepositoryTopicsArrayOutput + ToRepositoryTopicsArrayOutputWithContext(context.Context) RepositoryTopicsArrayOutput +} + +type RepositoryTopicsArray []RepositoryTopicsInput + +func (RepositoryTopicsArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*RepositoryTopics)(nil)).Elem() +} + +func (i RepositoryTopicsArray) ToRepositoryTopicsArrayOutput() RepositoryTopicsArrayOutput { + return i.ToRepositoryTopicsArrayOutputWithContext(context.Background()) +} + +func (i RepositoryTopicsArray) ToRepositoryTopicsArrayOutputWithContext(ctx context.Context) RepositoryTopicsArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryTopicsArrayOutput) +} + +func (i RepositoryTopicsArray) ToOutput(ctx context.Context) pulumix.Output[[]*RepositoryTopics] { + return pulumix.Output[[]*RepositoryTopics]{ + OutputState: i.ToRepositoryTopicsArrayOutputWithContext(ctx).OutputState, + } +} + +// RepositoryTopicsMapInput is an input type that accepts RepositoryTopicsMap and RepositoryTopicsMapOutput values. +// You can construct a concrete instance of `RepositoryTopicsMapInput` via: +// +// RepositoryTopicsMap{ "key": RepositoryTopicsArgs{...} } +type RepositoryTopicsMapInput interface { + pulumi.Input + + ToRepositoryTopicsMapOutput() RepositoryTopicsMapOutput + ToRepositoryTopicsMapOutputWithContext(context.Context) RepositoryTopicsMapOutput +} + +type RepositoryTopicsMap map[string]RepositoryTopicsInput + +func (RepositoryTopicsMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*RepositoryTopics)(nil)).Elem() +} + +func (i RepositoryTopicsMap) ToRepositoryTopicsMapOutput() RepositoryTopicsMapOutput { + return i.ToRepositoryTopicsMapOutputWithContext(context.Background()) +} + +func (i RepositoryTopicsMap) ToRepositoryTopicsMapOutputWithContext(ctx context.Context) RepositoryTopicsMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(RepositoryTopicsMapOutput) +} + +func (i RepositoryTopicsMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*RepositoryTopics] { + return pulumix.Output[map[string]*RepositoryTopics]{ + OutputState: i.ToRepositoryTopicsMapOutputWithContext(ctx).OutputState, + } +} + +type RepositoryTopicsOutput struct{ *pulumi.OutputState } + +func (RepositoryTopicsOutput) ElementType() reflect.Type { + return reflect.TypeOf((**RepositoryTopics)(nil)).Elem() +} + +func (o RepositoryTopicsOutput) ToRepositoryTopicsOutput() RepositoryTopicsOutput { + return o +} + +func (o RepositoryTopicsOutput) ToRepositoryTopicsOutputWithContext(ctx context.Context) RepositoryTopicsOutput { + return o +} + +func (o RepositoryTopicsOutput) ToOutput(ctx context.Context) pulumix.Output[*RepositoryTopics] { + return pulumix.Output[*RepositoryTopics]{ + OutputState: o.OutputState, + } +} + +// The repository name. +func (o RepositoryTopicsOutput) Repository() pulumi.StringOutput { + return o.ApplyT(func(v *RepositoryTopics) pulumi.StringOutput { return v.Repository }).(pulumi.StringOutput) +} + +// A list of topics to add to the repository. +func (o RepositoryTopicsOutput) Topics() pulumi.StringArrayOutput { + return o.ApplyT(func(v *RepositoryTopics) pulumi.StringArrayOutput { return v.Topics }).(pulumi.StringArrayOutput) +} + +type RepositoryTopicsArrayOutput struct{ *pulumi.OutputState } + +func (RepositoryTopicsArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*RepositoryTopics)(nil)).Elem() +} + +func (o RepositoryTopicsArrayOutput) ToRepositoryTopicsArrayOutput() RepositoryTopicsArrayOutput { + return o +} + +func (o RepositoryTopicsArrayOutput) ToRepositoryTopicsArrayOutputWithContext(ctx context.Context) RepositoryTopicsArrayOutput { + return o +} + +func (o RepositoryTopicsArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*RepositoryTopics] { + return pulumix.Output[[]*RepositoryTopics]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryTopicsArrayOutput) Index(i pulumi.IntInput) RepositoryTopicsOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RepositoryTopics { + return vs[0].([]*RepositoryTopics)[vs[1].(int)] + }).(RepositoryTopicsOutput) +} + +type RepositoryTopicsMapOutput struct{ *pulumi.OutputState } + +func (RepositoryTopicsMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*RepositoryTopics)(nil)).Elem() +} + +func (o RepositoryTopicsMapOutput) ToRepositoryTopicsMapOutput() RepositoryTopicsMapOutput { + return o +} + +func (o RepositoryTopicsMapOutput) ToRepositoryTopicsMapOutputWithContext(ctx context.Context) RepositoryTopicsMapOutput { + return o +} + +func (o RepositoryTopicsMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*RepositoryTopics] { + return pulumix.Output[map[string]*RepositoryTopics]{ + OutputState: o.OutputState, + } +} + +func (o RepositoryTopicsMapOutput) MapIndex(k pulumi.StringInput) RepositoryTopicsOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RepositoryTopics { + return vs[0].(map[string]*RepositoryTopics)[vs[1].(string)] + }).(RepositoryTopicsOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryTopicsInput)(nil)).Elem(), &RepositoryTopics{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryTopicsArrayInput)(nil)).Elem(), RepositoryTopicsArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*RepositoryTopicsMapInput)(nil)).Elem(), RepositoryTopicsMap{}) + pulumi.RegisterOutputType(RepositoryTopicsOutput{}) + pulumi.RegisterOutputType(RepositoryTopicsArrayOutput{}) + pulumi.RegisterOutputType(RepositoryTopicsMapOutput{}) +} diff --git a/sdk/java/src/main/java/com/pulumi/github/ActionsSecret.java b/sdk/java/src/main/java/com/pulumi/github/ActionsSecret.java index a9210baf..ac99072b 100644 --- a/sdk/java/src/main/java/com/pulumi/github/ActionsSecret.java +++ b/sdk/java/src/main/java/com/pulumi/github/ActionsSecret.java @@ -65,7 +65,7 @@ * This resource can be imported using an ID made up of the `repository` and `secret_name`: * * ```sh - * $ pulumi import github:index/actionsSecret:ActionsSecret example_secret <repository>/<secret_name> + * $ pulumi import github:index/actionsSecret:ActionsSecret example_secret repository/secret_name * ``` * NOTEthe implementation is limited in that it won't fetch the value of the `plaintext_value` or `encrypted_value` fields when importing. You may need to ignore changes for these as a workaround. * diff --git a/sdk/java/src/main/java/com/pulumi/github/EnterpriseOrganization.java b/sdk/java/src/main/java/com/pulumi/github/EnterpriseOrganization.java index 4f7e5885..398fc85e 100644 --- a/sdk/java/src/main/java/com/pulumi/github/EnterpriseOrganization.java +++ b/sdk/java/src/main/java/com/pulumi/github/EnterpriseOrganization.java @@ -42,6 +42,7 @@ * public static void stack(Context ctx) { * var org = new EnterpriseOrganization("org", EnterpriseOrganizationArgs.builder() * .enterpriseId(data.github_enterprise().enterprise().id()) + * .displayName("Some Awesome Org") * .description("Organization created with terraform") * .billingEmail("jon@winteriscoming.com") * .adminLogins("jon-snow") @@ -53,7 +54,11 @@ * * ## Import * - * Support for importing organizations is not currently supported. + * GitHub Enterprise Organization can be imported using the `slug` of the enterprise, combined with the `orgname` of the organization, separated by a `/` character. + * + * ```sh + * $ pulumi import github:index/enterpriseOrganization:EnterpriseOrganization org enterp/some-awesome-org + * ``` * */ @ResourceType(type="github:index/enterpriseOrganization:EnterpriseOrganization") @@ -100,6 +105,20 @@ public Output billingEmail() { public Output> description() { return Codegen.optional(this.description); } + /** + * The display name of the organization. + * + */ + @Export(name="displayName", refs={String.class}, tree="[0]") + private Output displayName; + + /** + * @return The display name of the organization. + * + */ + public Output> displayName() { + return Codegen.optional(this.displayName); + } /** * The ID of the enterprise. * diff --git a/sdk/java/src/main/java/com/pulumi/github/EnterpriseOrganizationArgs.java b/sdk/java/src/main/java/com/pulumi/github/EnterpriseOrganizationArgs.java index 8f07dfa6..8cd889e3 100644 --- a/sdk/java/src/main/java/com/pulumi/github/EnterpriseOrganizationArgs.java +++ b/sdk/java/src/main/java/com/pulumi/github/EnterpriseOrganizationArgs.java @@ -61,6 +61,21 @@ public Optional> description() { return Optional.ofNullable(this.description); } + /** + * The display name of the organization. + * + */ + @Import(name="displayName") + private @Nullable Output displayName; + + /** + * @return The display name of the organization. + * + */ + public Optional> displayName() { + return Optional.ofNullable(this.displayName); + } + /** * The ID of the enterprise. * @@ -97,6 +112,7 @@ private EnterpriseOrganizationArgs(EnterpriseOrganizationArgs $) { this.adminLogins = $.adminLogins; this.billingEmail = $.billingEmail; this.description = $.description; + this.displayName = $.displayName; this.enterpriseId = $.enterpriseId; this.name = $.name; } @@ -192,6 +208,27 @@ public Builder description(String description) { return description(Output.of(description)); } + /** + * @param displayName The display name of the organization. + * + * @return builder + * + */ + public Builder displayName(@Nullable Output displayName) { + $.displayName = displayName; + return this; + } + + /** + * @param displayName The display name of the organization. + * + * @return builder + * + */ + public Builder displayName(String displayName) { + return displayName(Output.of(displayName)); + } + /** * @param enterpriseId The ID of the enterprise. * diff --git a/sdk/java/src/main/java/com/pulumi/github/OrganizationRuleset.java b/sdk/java/src/main/java/com/pulumi/github/OrganizationRuleset.java new file mode 100644 index 00000000..ac2c9833 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/OrganizationRuleset.java @@ -0,0 +1,274 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.github.OrganizationRulesetArgs; +import com.pulumi.github.Utilities; +import com.pulumi.github.inputs.OrganizationRulesetState; +import com.pulumi.github.outputs.OrganizationRulesetBypassActor; +import com.pulumi.github.outputs.OrganizationRulesetConditions; +import com.pulumi.github.outputs.OrganizationRulesetRules; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Optional; +import javax.annotation.Nullable; + +/** + * Creates a GitHub organization ruleset. + * + * This resource allows you to create and manage rulesets on the organization level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + * + * ## Example Usage + * + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.github.OrganizationRuleset; + * import com.pulumi.github.OrganizationRulesetArgs; + * import com.pulumi.github.inputs.OrganizationRulesetBypassActorArgs; + * import com.pulumi.github.inputs.OrganizationRulesetConditionsArgs; + * import com.pulumi.github.inputs.OrganizationRulesetConditionsRefNameArgs; + * import com.pulumi.github.inputs.OrganizationRulesetRulesArgs; + * import com.pulumi.github.inputs.OrganizationRulesetRulesBranchNamePatternArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var example = new OrganizationRuleset("example", OrganizationRulesetArgs.builder() + * .bypassActors(OrganizationRulesetBypassActorArgs.builder() + * .actorId(13473) + * .actorType("Integration") + * .bypassMode("always") + * .build()) + * .conditions(OrganizationRulesetConditionsArgs.builder() + * .refName(OrganizationRulesetConditionsRefNameArgs.builder() + * .exclude() + * .include("~ALL") + * .build()) + * .build()) + * .enforcement("active") + * .rules(OrganizationRulesetRulesArgs.builder() + * .branchNamePattern(OrganizationRulesetRulesBranchNamePatternArgs.builder() + * .name("example") + * .negate(false) + * .operator("starts_with") + * .pattern("ex") + * .build()) + * .creation(true) + * .deletion(true) + * .requiredLinearHistory(true) + * .requiredSignatures(true) + * .update(true) + * .build()) + * .target("branch") + * .build()); + * + * } + * } + * ``` + * + * ## Import + * + * GitHub Organization Rulesets can be imported using the GitHub ruleset ID e.g. + * + * ```sh + * $ pulumi import github:index/organizationRuleset:OrganizationRuleset example 12345` + * ``` + * + */ +@ResourceType(type="github:index/organizationRuleset:OrganizationRuleset") +public class OrganizationRuleset extends com.pulumi.resources.CustomResource { + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + @Export(name="bypassActors", refs={List.class,OrganizationRulesetBypassActor.class}, tree="[0,1]") + private Output> bypassActors; + + /** + * @return (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + public Output>> bypassActors() { + return Codegen.optional(this.bypassActors); + } + /** + * (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + * + */ + @Export(name="conditions", refs={OrganizationRulesetConditions.class}, tree="[0]") + private Output conditions; + + /** + * @return (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + * + */ + public Output> conditions() { + return Codegen.optional(this.conditions); + } + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + @Export(name="enforcement", refs={String.class}, tree="[0]") + private Output enforcement; + + /** + * @return (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + public Output enforcement() { + return this.enforcement; + } + /** + * (String) + * + */ + @Export(name="etag", refs={String.class}, tree="[0]") + private Output etag; + + /** + * @return (String) + * + */ + public Output etag() { + return this.etag; + } + /** + * (String) The name of the ruleset. + * + */ + @Export(name="name", refs={String.class}, tree="[0]") + private Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Output name() { + return this.name; + } + /** + * (String) GraphQL global node id for use with v4 API. + * + */ + @Export(name="nodeId", refs={String.class}, tree="[0]") + private Output nodeId; + + /** + * @return (String) GraphQL global node id for use with v4 API. + * + */ + public Output nodeId() { + return this.nodeId; + } + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + @Export(name="rules", refs={OrganizationRulesetRules.class}, tree="[0]") + private Output rules; + + /** + * @return (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + public Output rules() { + return this.rules; + } + /** + * (Number) GitHub ID for the ruleset. + * + */ + @Export(name="rulesetId", refs={Integer.class}, tree="[0]") + private Output rulesetId; + + /** + * @return (Number) GitHub ID for the ruleset. + * + */ + public Output rulesetId() { + return this.rulesetId; + } + /** + * (String) Possible values are `branch` and `tag`. + * + */ + @Export(name="target", refs={String.class}, tree="[0]") + private Output target; + + /** + * @return (String) Possible values are `branch` and `tag`. + * + */ + public Output target() { + return this.target; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public OrganizationRuleset(String name) { + this(name, OrganizationRulesetArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public OrganizationRuleset(String name, OrganizationRulesetArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public OrganizationRuleset(String name, OrganizationRulesetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("github:index/organizationRuleset:OrganizationRuleset", name, args == null ? OrganizationRulesetArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + } + + private OrganizationRuleset(String name, Output id, @Nullable OrganizationRulesetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("github:index/organizationRuleset:OrganizationRuleset", name, state, makeResourceOptions(options, id)); + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static OrganizationRuleset get(String name, Output id, @Nullable OrganizationRulesetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new OrganizationRuleset(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/OrganizationRulesetArgs.java b/sdk/java/src/main/java/com/pulumi/github/OrganizationRulesetArgs.java new file mode 100644 index 00000000..fc885977 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/OrganizationRulesetArgs.java @@ -0,0 +1,285 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.github.inputs.OrganizationRulesetBypassActorArgs; +import com.pulumi.github.inputs.OrganizationRulesetConditionsArgs; +import com.pulumi.github.inputs.OrganizationRulesetRulesArgs; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetArgs Empty = new OrganizationRulesetArgs(); + + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + @Import(name="bypassActors") + private @Nullable Output> bypassActors; + + /** + * @return (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + public Optional>> bypassActors() { + return Optional.ofNullable(this.bypassActors); + } + + /** + * (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + * + */ + @Import(name="conditions") + private @Nullable Output conditions; + + /** + * @return (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + * + */ + public Optional> conditions() { + return Optional.ofNullable(this.conditions); + } + + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + @Import(name="enforcement", required=true) + private Output enforcement; + + /** + * @return (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + public Output enforcement() { + return this.enforcement; + } + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + @Import(name="rules", required=true) + private Output rules; + + /** + * @return (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + public Output rules() { + return this.rules; + } + + /** + * (String) Possible values are `branch` and `tag`. + * + */ + @Import(name="target", required=true) + private Output target; + + /** + * @return (String) Possible values are `branch` and `tag`. + * + */ + public Output target() { + return this.target; + } + + private OrganizationRulesetArgs() {} + + private OrganizationRulesetArgs(OrganizationRulesetArgs $) { + this.bypassActors = $.bypassActors; + this.conditions = $.conditions; + this.enforcement = $.enforcement; + this.name = $.name; + this.rules = $.rules; + this.target = $.target; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetArgs $; + + public Builder() { + $ = new OrganizationRulesetArgs(); + } + + public Builder(OrganizationRulesetArgs defaults) { + $ = new OrganizationRulesetArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(@Nullable Output> bypassActors) { + $.bypassActors = bypassActors; + return this; + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(List bypassActors) { + return bypassActors(Output.of(bypassActors)); + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(OrganizationRulesetBypassActorArgs... bypassActors) { + return bypassActors(List.of(bypassActors)); + } + + /** + * @param conditions (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + * + * @return builder + * + */ + public Builder conditions(@Nullable Output conditions) { + $.conditions = conditions; + return this; + } + + /** + * @param conditions (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + * + * @return builder + * + */ + public Builder conditions(OrganizationRulesetConditionsArgs conditions) { + return conditions(Output.of(conditions)); + } + + /** + * @param enforcement (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + * @return builder + * + */ + public Builder enforcement(Output enforcement) { + $.enforcement = enforcement; + return this; + } + + /** + * @param enforcement (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + * @return builder + * + */ + public Builder enforcement(String enforcement) { + return enforcement(Output.of(enforcement)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param rules (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder rules(Output rules) { + $.rules = rules; + return this; + } + + /** + * @param rules (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder rules(OrganizationRulesetRulesArgs rules) { + return rules(Output.of(rules)); + } + + /** + * @param target (String) Possible values are `branch` and `tag`. + * + * @return builder + * + */ + public Builder target(Output target) { + $.target = target; + return this; + } + + /** + * @param target (String) Possible values are `branch` and `tag`. + * + * @return builder + * + */ + public Builder target(String target) { + return target(Output.of(target)); + } + + public OrganizationRulesetArgs build() { + $.enforcement = Objects.requireNonNull($.enforcement, "expected parameter 'enforcement' to be non-null"); + $.rules = Objects.requireNonNull($.rules, "expected parameter 'rules' to be non-null"); + $.target = Objects.requireNonNull($.target, "expected parameter 'target' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/Repository.java b/sdk/java/src/main/java/com/pulumi/github/Repository.java index 1da6f29f..23f93729 100644 --- a/sdk/java/src/main/java/com/pulumi/github/Repository.java +++ b/sdk/java/src/main/java/com/pulumi/github/Repository.java @@ -689,14 +689,14 @@ public Output> template() { * */ @Export(name="topics", refs={List.class,String.class}, tree="[0,1]") - private Output> topics; + private Output> topics; /** * @return The list of topics of the repository. * */ - public Output>> topics() { - return Codegen.optional(this.topics); + public Output> topics() { + return this.topics; } /** * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be `internal`. The `visibility` parameter overrides the `private` parameter. diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryRuleset.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryRuleset.java new file mode 100644 index 00000000..29cb18c0 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryRuleset.java @@ -0,0 +1,291 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.github.RepositoryRulesetArgs; +import com.pulumi.github.Utilities; +import com.pulumi.github.inputs.RepositoryRulesetState; +import com.pulumi.github.outputs.RepositoryRulesetBypassActor; +import com.pulumi.github.outputs.RepositoryRulesetConditions; +import com.pulumi.github.outputs.RepositoryRulesetRules; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Optional; +import javax.annotation.Nullable; + +/** + * Creates a GitHub repository ruleset. + * + * This resource allows you to create and manage rulesets on the repository level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.github.Repository; + * import com.pulumi.github.RepositoryArgs; + * import com.pulumi.github.RepositoryRuleset; + * import com.pulumi.github.RepositoryRulesetArgs; + * import com.pulumi.github.inputs.RepositoryRulesetConditionsArgs; + * import com.pulumi.github.inputs.RepositoryRulesetConditionsRefNameArgs; + * import com.pulumi.github.inputs.RepositoryRulesetBypassActorArgs; + * import com.pulumi.github.inputs.RepositoryRulesetRulesArgs; + * import com.pulumi.github.inputs.RepositoryRulesetRulesRequiredDeploymentsArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var exampleRepository = new Repository("exampleRepository", RepositoryArgs.builder() + * .description("Example repository") + * .build()); + * + * var exampleRepositoryRuleset = new RepositoryRuleset("exampleRepositoryRuleset", RepositoryRulesetArgs.builder() + * .repository(exampleRepository.name()) + * .target("branch") + * .enforcement("active") + * .conditions(RepositoryRulesetConditionsArgs.builder() + * .refName(RepositoryRulesetConditionsRefNameArgs.builder() + * .includes("~ALL") + * .excludes() + * .build()) + * .build()) + * .bypassActors(RepositoryRulesetBypassActorArgs.builder() + * .actorId(13473) + * .actorType("Integration") + * .bypassMode("always") + * .build()) + * .rules(RepositoryRulesetRulesArgs.builder() + * .creation(true) + * .update(true) + * .deletion(true) + * .requiredLinearHistory(true) + * .requiredSignatures(true) + * .requiredDeployments(RepositoryRulesetRulesRequiredDeploymentsArgs.builder() + * .requiredDeploymentEnvironments("test") + * .build()) + * .build()) + * .build()); + * + * } + * } + * ``` + * + * ## Import + * + * GitHub Repository Rulesets can be imported using the GitHub repository name and ruleset ID e.g. + * + * ```sh + * $ pulumi import github:index/repositoryRuleset:RepositoryRuleset example example:12345` + * ``` + * + */ +@ResourceType(type="github:index/repositoryRuleset:RepositoryRuleset") +public class RepositoryRuleset extends com.pulumi.resources.CustomResource { + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + @Export(name="bypassActors", refs={List.class,RepositoryRulesetBypassActor.class}, tree="[0,1]") + private Output> bypassActors; + + /** + * @return (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + public Output>> bypassActors() { + return Codegen.optional(this.bypassActors); + } + /** + * (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + * + */ + @Export(name="conditions", refs={RepositoryRulesetConditions.class}, tree="[0]") + private Output conditions; + + /** + * @return (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + * + */ + public Output> conditions() { + return Codegen.optional(this.conditions); + } + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + @Export(name="enforcement", refs={String.class}, tree="[0]") + private Output enforcement; + + /** + * @return (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + public Output enforcement() { + return this.enforcement; + } + /** + * (String) + * + */ + @Export(name="etag", refs={String.class}, tree="[0]") + private Output etag; + + /** + * @return (String) + * + */ + public Output etag() { + return this.etag; + } + /** + * (String) The name of the ruleset. + * + */ + @Export(name="name", refs={String.class}, tree="[0]") + private Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Output name() { + return this.name; + } + /** + * (String) GraphQL global node id for use with v4 API. + * + */ + @Export(name="nodeId", refs={String.class}, tree="[0]") + private Output nodeId; + + /** + * @return (String) GraphQL global node id for use with v4 API. + * + */ + public Output nodeId() { + return this.nodeId; + } + /** + * (String) Name of the repository to apply rulset to. + * + */ + @Export(name="repository", refs={String.class}, tree="[0]") + private Output repository; + + /** + * @return (String) Name of the repository to apply rulset to. + * + */ + public Output> repository() { + return Codegen.optional(this.repository); + } + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + @Export(name="rules", refs={RepositoryRulesetRules.class}, tree="[0]") + private Output rules; + + /** + * @return (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + public Output rules() { + return this.rules; + } + /** + * (Number) GitHub ID for the ruleset. + * + */ + @Export(name="rulesetId", refs={Integer.class}, tree="[0]") + private Output rulesetId; + + /** + * @return (Number) GitHub ID for the ruleset. + * + */ + public Output rulesetId() { + return this.rulesetId; + } + /** + * (String) Possible values are `branch` and `tag`. + * + */ + @Export(name="target", refs={String.class}, tree="[0]") + private Output target; + + /** + * @return (String) Possible values are `branch` and `tag`. + * + */ + public Output target() { + return this.target; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public RepositoryRuleset(String name) { + this(name, RepositoryRulesetArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public RepositoryRuleset(String name, RepositoryRulesetArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public RepositoryRuleset(String name, RepositoryRulesetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("github:index/repositoryRuleset:RepositoryRuleset", name, args == null ? RepositoryRulesetArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + } + + private RepositoryRuleset(String name, Output id, @Nullable RepositoryRulesetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("github:index/repositoryRuleset:RepositoryRuleset", name, state, makeResourceOptions(options, id)); + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static RepositoryRuleset get(String name, Output id, @Nullable RepositoryRulesetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new RepositoryRuleset(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryRulesetArgs.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryRulesetArgs.java new file mode 100644 index 00000000..9d55c0a5 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryRulesetArgs.java @@ -0,0 +1,322 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.github.inputs.RepositoryRulesetBypassActorArgs; +import com.pulumi.github.inputs.RepositoryRulesetConditionsArgs; +import com.pulumi.github.inputs.RepositoryRulesetRulesArgs; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetArgs Empty = new RepositoryRulesetArgs(); + + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + @Import(name="bypassActors") + private @Nullable Output> bypassActors; + + /** + * @return (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + public Optional>> bypassActors() { + return Optional.ofNullable(this.bypassActors); + } + + /** + * (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + * + */ + @Import(name="conditions") + private @Nullable Output conditions; + + /** + * @return (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + * + */ + public Optional> conditions() { + return Optional.ofNullable(this.conditions); + } + + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + @Import(name="enforcement", required=true) + private Output enforcement; + + /** + * @return (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + public Output enforcement() { + return this.enforcement; + } + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (String) Name of the repository to apply rulset to. + * + */ + @Import(name="repository") + private @Nullable Output repository; + + /** + * @return (String) Name of the repository to apply rulset to. + * + */ + public Optional> repository() { + return Optional.ofNullable(this.repository); + } + + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + @Import(name="rules", required=true) + private Output rules; + + /** + * @return (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + public Output rules() { + return this.rules; + } + + /** + * (String) Possible values are `branch` and `tag`. + * + */ + @Import(name="target", required=true) + private Output target; + + /** + * @return (String) Possible values are `branch` and `tag`. + * + */ + public Output target() { + return this.target; + } + + private RepositoryRulesetArgs() {} + + private RepositoryRulesetArgs(RepositoryRulesetArgs $) { + this.bypassActors = $.bypassActors; + this.conditions = $.conditions; + this.enforcement = $.enforcement; + this.name = $.name; + this.repository = $.repository; + this.rules = $.rules; + this.target = $.target; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetArgs $; + + public Builder() { + $ = new RepositoryRulesetArgs(); + } + + public Builder(RepositoryRulesetArgs defaults) { + $ = new RepositoryRulesetArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(@Nullable Output> bypassActors) { + $.bypassActors = bypassActors; + return this; + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(List bypassActors) { + return bypassActors(Output.of(bypassActors)); + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(RepositoryRulesetBypassActorArgs... bypassActors) { + return bypassActors(List.of(bypassActors)); + } + + /** + * @param conditions (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + * + * @return builder + * + */ + public Builder conditions(@Nullable Output conditions) { + $.conditions = conditions; + return this; + } + + /** + * @param conditions (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + * + * @return builder + * + */ + public Builder conditions(RepositoryRulesetConditionsArgs conditions) { + return conditions(Output.of(conditions)); + } + + /** + * @param enforcement (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + * @return builder + * + */ + public Builder enforcement(Output enforcement) { + $.enforcement = enforcement; + return this; + } + + /** + * @param enforcement (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + * @return builder + * + */ + public Builder enforcement(String enforcement) { + return enforcement(Output.of(enforcement)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param repository (String) Name of the repository to apply rulset to. + * + * @return builder + * + */ + public Builder repository(@Nullable Output repository) { + $.repository = repository; + return this; + } + + /** + * @param repository (String) Name of the repository to apply rulset to. + * + * @return builder + * + */ + public Builder repository(String repository) { + return repository(Output.of(repository)); + } + + /** + * @param rules (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder rules(Output rules) { + $.rules = rules; + return this; + } + + /** + * @param rules (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder rules(RepositoryRulesetRulesArgs rules) { + return rules(Output.of(rules)); + } + + /** + * @param target (String) Possible values are `branch` and `tag`. + * + * @return builder + * + */ + public Builder target(Output target) { + $.target = target; + return this; + } + + /** + * @param target (String) Possible values are `branch` and `tag`. + * + * @return builder + * + */ + public Builder target(String target) { + return target(Output.of(target)); + } + + public RepositoryRulesetArgs build() { + $.enforcement = Objects.requireNonNull($.enforcement, "expected parameter 'enforcement' to be non-null"); + $.rules = Objects.requireNonNull($.rules, "expected parameter 'rules' to be non-null"); + $.target = Objects.requireNonNull($.target, "expected parameter 'target' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryTopics.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryTopics.java new file mode 100644 index 00000000..bda161db --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryTopics.java @@ -0,0 +1,145 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.github.RepositoryTopicsArgs; +import com.pulumi.github.Utilities; +import com.pulumi.github.inputs.RepositoryTopicsState; +import java.lang.String; +import java.util.List; +import javax.annotation.Nullable; + +/** + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.github.GithubFunctions; + * import com.pulumi.github.inputs.GetRepositoryArgs; + * import com.pulumi.github.RepositoryTopics; + * import com.pulumi.github.RepositoryTopicsArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var testRepository = GithubFunctions.getRepository(GetRepositoryArgs.builder() + * .name("test") + * .build()); + * + * var testRepositoryTopics = new RepositoryTopics("testRepositoryTopics", RepositoryTopicsArgs.builder() + * .repository(github_repository.test().name()) + * .topics( + * "topic-1", + * "topic-2") + * .build()); + * + * } + * } + * ``` + * + * ## Import + * + * Repository topics can be imported using the `name` of the repository. + * + * ```sh + * $ pulumi import github:index/repositoryTopics:RepositoryTopics terraform terraform + * ``` + * + */ +@ResourceType(type="github:index/repositoryTopics:RepositoryTopics") +public class RepositoryTopics extends com.pulumi.resources.CustomResource { + /** + * The repository name. + * + */ + @Export(name="repository", refs={String.class}, tree="[0]") + private Output repository; + + /** + * @return The repository name. + * + */ + public Output repository() { + return this.repository; + } + /** + * A list of topics to add to the repository. + * + */ + @Export(name="topics", refs={List.class,String.class}, tree="[0,1]") + private Output> topics; + + /** + * @return A list of topics to add to the repository. + * + */ + public Output> topics() { + return this.topics; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public RepositoryTopics(String name) { + this(name, RepositoryTopicsArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public RepositoryTopics(String name, RepositoryTopicsArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public RepositoryTopics(String name, RepositoryTopicsArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("github:index/repositoryTopics:RepositoryTopics", name, args == null ? RepositoryTopicsArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + } + + private RepositoryTopics(String name, Output id, @Nullable RepositoryTopicsState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("github:index/repositoryTopics:RepositoryTopics", name, state, makeResourceOptions(options, id)); + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static RepositoryTopics get(String name, Output id, @Nullable RepositoryTopicsState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new RepositoryTopics(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryTopicsArgs.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryTopicsArgs.java new file mode 100644 index 00000000..eaaf56b1 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryTopicsArgs.java @@ -0,0 +1,131 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.List; +import java.util.Objects; + + +public final class RepositoryTopicsArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryTopicsArgs Empty = new RepositoryTopicsArgs(); + + /** + * The repository name. + * + */ + @Import(name="repository", required=true) + private Output repository; + + /** + * @return The repository name. + * + */ + public Output repository() { + return this.repository; + } + + /** + * A list of topics to add to the repository. + * + */ + @Import(name="topics", required=true) + private Output> topics; + + /** + * @return A list of topics to add to the repository. + * + */ + public Output> topics() { + return this.topics; + } + + private RepositoryTopicsArgs() {} + + private RepositoryTopicsArgs(RepositoryTopicsArgs $) { + this.repository = $.repository; + this.topics = $.topics; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryTopicsArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryTopicsArgs $; + + public Builder() { + $ = new RepositoryTopicsArgs(); + } + + public Builder(RepositoryTopicsArgs defaults) { + $ = new RepositoryTopicsArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param repository The repository name. + * + * @return builder + * + */ + public Builder repository(Output repository) { + $.repository = repository; + return this; + } + + /** + * @param repository The repository name. + * + * @return builder + * + */ + public Builder repository(String repository) { + return repository(Output.of(repository)); + } + + /** + * @param topics A list of topics to add to the repository. + * + * @return builder + * + */ + public Builder topics(Output> topics) { + $.topics = topics; + return this; + } + + /** + * @param topics A list of topics to add to the repository. + * + * @return builder + * + */ + public Builder topics(List topics) { + return topics(Output.of(topics)); + } + + /** + * @param topics A list of topics to add to the repository. + * + * @return builder + * + */ + public Builder topics(String... topics) { + return topics(List.of(topics)); + } + + public RepositoryTopicsArgs build() { + $.repository = Objects.requireNonNull($.repository, "expected parameter 'repository' to be non-null"); + $.topics = Objects.requireNonNull($.topics, "expected parameter 'topics' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/EnterpriseOrganizationState.java b/sdk/java/src/main/java/com/pulumi/github/inputs/EnterpriseOrganizationState.java index fd0797aa..4bf7e3a3 100644 --- a/sdk/java/src/main/java/com/pulumi/github/inputs/EnterpriseOrganizationState.java +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/EnterpriseOrganizationState.java @@ -61,6 +61,21 @@ public Optional> description() { return Optional.ofNullable(this.description); } + /** + * The display name of the organization. + * + */ + @Import(name="displayName") + private @Nullable Output displayName; + + /** + * @return The display name of the organization. + * + */ + public Optional> displayName() { + return Optional.ofNullable(this.displayName); + } + /** * The ID of the enterprise. * @@ -97,6 +112,7 @@ private EnterpriseOrganizationState(EnterpriseOrganizationState $) { this.adminLogins = $.adminLogins; this.billingEmail = $.billingEmail; this.description = $.description; + this.displayName = $.displayName; this.enterpriseId = $.enterpriseId; this.name = $.name; } @@ -192,6 +208,27 @@ public Builder description(String description) { return description(Output.of(description)); } + /** + * @param displayName The display name of the organization. + * + * @return builder + * + */ + public Builder displayName(@Nullable Output displayName) { + $.displayName = displayName; + return this; + } + + /** + * @param displayName The display name of the organization. + * + * @return builder + * + */ + public Builder displayName(String displayName) { + return displayName(Output.of(displayName)); + } + /** * @param enterpriseId The ID of the enterprise. * diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetBypassActorArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetBypassActorArgs.java new file mode 100644 index 00000000..b704f66a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetBypassActorArgs.java @@ -0,0 +1,160 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetBypassActorArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetBypassActorArgs Empty = new OrganizationRulesetBypassActorArgs(); + + /** + * (Number) The ID of the actor that can bypass a ruleset + * + */ + @Import(name="actorId", required=true) + private Output actorId; + + /** + * @return (Number) The ID of the actor that can bypass a ruleset + * + */ + public Output actorId() { + return this.actorId; + } + + /** + * The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + */ + @Import(name="actorType", required=true) + private Output actorType; + + /** + * @return The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + */ + public Output actorType() { + return this.actorType; + } + + /** + * (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + */ + @Import(name="bypassMode") + private @Nullable Output bypassMode; + + /** + * @return (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + */ + public Optional> bypassMode() { + return Optional.ofNullable(this.bypassMode); + } + + private OrganizationRulesetBypassActorArgs() {} + + private OrganizationRulesetBypassActorArgs(OrganizationRulesetBypassActorArgs $) { + this.actorId = $.actorId; + this.actorType = $.actorType; + this.bypassMode = $.bypassMode; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetBypassActorArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetBypassActorArgs $; + + public Builder() { + $ = new OrganizationRulesetBypassActorArgs(); + } + + public Builder(OrganizationRulesetBypassActorArgs defaults) { + $ = new OrganizationRulesetBypassActorArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param actorId (Number) The ID of the actor that can bypass a ruleset + * + * @return builder + * + */ + public Builder actorId(Output actorId) { + $.actorId = actorId; + return this; + } + + /** + * @param actorId (Number) The ID of the actor that can bypass a ruleset + * + * @return builder + * + */ + public Builder actorId(Integer actorId) { + return actorId(Output.of(actorId)); + } + + /** + * @param actorType The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + * @return builder + * + */ + public Builder actorType(Output actorType) { + $.actorType = actorType; + return this; + } + + /** + * @param actorType The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + * @return builder + * + */ + public Builder actorType(String actorType) { + return actorType(Output.of(actorType)); + } + + /** + * @param bypassMode (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + * @return builder + * + */ + public Builder bypassMode(@Nullable Output bypassMode) { + $.bypassMode = bypassMode; + return this; + } + + /** + * @param bypassMode (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + * @return builder + * + */ + public Builder bypassMode(String bypassMode) { + return bypassMode(Output.of(bypassMode)); + } + + public OrganizationRulesetBypassActorArgs build() { + $.actorId = Objects.requireNonNull($.actorId, "expected parameter 'actorId' to be non-null"); + $.actorType = Objects.requireNonNull($.actorType, "expected parameter 'actorType' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsArgs.java new file mode 100644 index 00000000..600cb9fc --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsArgs.java @@ -0,0 +1,168 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.github.inputs.OrganizationRulesetConditionsRefNameArgs; +import com.pulumi.github.inputs.OrganizationRulesetConditionsRepositoryNameArgs; +import java.lang.Integer; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetConditionsArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetConditionsArgs Empty = new OrganizationRulesetConditionsArgs(); + + /** + * (Block List, Min: 1, Max: 1) (see below for nested schema) + * + */ + @Import(name="refName", required=true) + private Output refName; + + /** + * @return (Block List, Min: 1, Max: 1) (see below for nested schema) + * + */ + public Output refName() { + return this.refName; + } + + /** + * The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + * + */ + @Import(name="repositoryId") + private @Nullable Output repositoryId; + + /** + * @return The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + * + */ + public Optional> repositoryId() { + return Optional.ofNullable(this.repositoryId); + } + + /** + * Conflicts with `repository_id`. (see below for nested schema) + * + * One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + * + */ + @Import(name="repositoryName") + private @Nullable Output repositoryName; + + /** + * @return Conflicts with `repository_id`. (see below for nested schema) + * + * One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + * + */ + public Optional> repositoryName() { + return Optional.ofNullable(this.repositoryName); + } + + private OrganizationRulesetConditionsArgs() {} + + private OrganizationRulesetConditionsArgs(OrganizationRulesetConditionsArgs $) { + this.refName = $.refName; + this.repositoryId = $.repositoryId; + this.repositoryName = $.repositoryName; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetConditionsArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetConditionsArgs $; + + public Builder() { + $ = new OrganizationRulesetConditionsArgs(); + } + + public Builder(OrganizationRulesetConditionsArgs defaults) { + $ = new OrganizationRulesetConditionsArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param refName (Block List, Min: 1, Max: 1) (see below for nested schema) + * + * @return builder + * + */ + public Builder refName(Output refName) { + $.refName = refName; + return this; + } + + /** + * @param refName (Block List, Min: 1, Max: 1) (see below for nested schema) + * + * @return builder + * + */ + public Builder refName(OrganizationRulesetConditionsRefNameArgs refName) { + return refName(Output.of(refName)); + } + + /** + * @param repositoryId The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + * + * @return builder + * + */ + public Builder repositoryId(@Nullable Output repositoryId) { + $.repositoryId = repositoryId; + return this; + } + + /** + * @param repositoryId The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + * + * @return builder + * + */ + public Builder repositoryId(Integer repositoryId) { + return repositoryId(Output.of(repositoryId)); + } + + /** + * @param repositoryName Conflicts with `repository_id`. (see below for nested schema) + * + * One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + * + * @return builder + * + */ + public Builder repositoryName(@Nullable Output repositoryName) { + $.repositoryName = repositoryName; + return this; + } + + /** + * @param repositoryName Conflicts with `repository_id`. (see below for nested schema) + * + * One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + * + * @return builder + * + */ + public Builder repositoryName(OrganizationRulesetConditionsRepositoryNameArgs repositoryName) { + return repositoryName(Output.of(repositoryName)); + } + + public OrganizationRulesetConditionsArgs build() { + $.refName = Objects.requireNonNull($.refName, "expected parameter 'refName' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsRefNameArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsRefNameArgs.java new file mode 100644 index 00000000..66b278ac --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsRefNameArgs.java @@ -0,0 +1,141 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.List; +import java.util.Objects; + + +public final class OrganizationRulesetConditionsRefNameArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetConditionsRefNameArgs Empty = new OrganizationRulesetConditionsRefNameArgs(); + + /** + * (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + @Import(name="excludes", required=true) + private Output> excludes; + + /** + * @return (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + public Output> excludes() { + return this.excludes; + } + + /** + * (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + */ + @Import(name="includes", required=true) + private Output> includes; + + /** + * @return (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + */ + public Output> includes() { + return this.includes; + } + + private OrganizationRulesetConditionsRefNameArgs() {} + + private OrganizationRulesetConditionsRefNameArgs(OrganizationRulesetConditionsRefNameArgs $) { + this.excludes = $.excludes; + this.includes = $.includes; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetConditionsRefNameArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetConditionsRefNameArgs $; + + public Builder() { + $ = new OrganizationRulesetConditionsRefNameArgs(); + } + + public Builder(OrganizationRulesetConditionsRefNameArgs defaults) { + $ = new OrganizationRulesetConditionsRefNameArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param excludes (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + * @return builder + * + */ + public Builder excludes(Output> excludes) { + $.excludes = excludes; + return this; + } + + /** + * @param excludes (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + * @return builder + * + */ + public Builder excludes(List excludes) { + return excludes(Output.of(excludes)); + } + + /** + * @param excludes (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + * @return builder + * + */ + public Builder excludes(String... excludes) { + return excludes(List.of(excludes)); + } + + /** + * @param includes (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + * @return builder + * + */ + public Builder includes(Output> includes) { + $.includes = includes; + return this; + } + + /** + * @param includes (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + * @return builder + * + */ + public Builder includes(List includes) { + return includes(Output.of(includes)); + } + + /** + * @param includes (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + * @return builder + * + */ + public Builder includes(String... includes) { + return includes(List.of(includes)); + } + + public OrganizationRulesetConditionsRefNameArgs build() { + $.excludes = Objects.requireNonNull($.excludes, "expected parameter 'excludes' to be non-null"); + $.includes = Objects.requireNonNull($.includes, "expected parameter 'includes' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsRepositoryNameArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsRepositoryNameArgs.java new file mode 100644 index 00000000..fc8ebc14 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetConditionsRepositoryNameArgs.java @@ -0,0 +1,161 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetConditionsRepositoryNameArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetConditionsRepositoryNameArgs Empty = new OrganizationRulesetConditionsRepositoryNameArgs(); + + /** + * (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + @Import(name="excludes", required=true) + private Output> excludes; + + /** + * @return (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + public Output> excludes() { + return this.excludes; + } + + /** + * (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + * + */ + @Import(name="inlcudes", required=true) + private Output> inlcudes; + + /** + * @return (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + * + */ + public Output> inlcudes() { + return this.inlcudes; + } + + @Import(name="protected") + private @Nullable Output protected_; + + public Optional> protected_() { + return Optional.ofNullable(this.protected_); + } + + private OrganizationRulesetConditionsRepositoryNameArgs() {} + + private OrganizationRulesetConditionsRepositoryNameArgs(OrganizationRulesetConditionsRepositoryNameArgs $) { + this.excludes = $.excludes; + this.inlcudes = $.inlcudes; + this.protected_ = $.protected_; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetConditionsRepositoryNameArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetConditionsRepositoryNameArgs $; + + public Builder() { + $ = new OrganizationRulesetConditionsRepositoryNameArgs(); + } + + public Builder(OrganizationRulesetConditionsRepositoryNameArgs defaults) { + $ = new OrganizationRulesetConditionsRepositoryNameArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param excludes (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + * @return builder + * + */ + public Builder excludes(Output> excludes) { + $.excludes = excludes; + return this; + } + + /** + * @param excludes (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + * @return builder + * + */ + public Builder excludes(List excludes) { + return excludes(Output.of(excludes)); + } + + /** + * @param excludes (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + * @return builder + * + */ + public Builder excludes(String... excludes) { + return excludes(List.of(excludes)); + } + + /** + * @param inlcudes (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + * + * @return builder + * + */ + public Builder inlcudes(Output> inlcudes) { + $.inlcudes = inlcudes; + return this; + } + + /** + * @param inlcudes (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + * + * @return builder + * + */ + public Builder inlcudes(List inlcudes) { + return inlcudes(Output.of(inlcudes)); + } + + /** + * @param inlcudes (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + * + * @return builder + * + */ + public Builder inlcudes(String... inlcudes) { + return inlcudes(List.of(inlcudes)); + } + + public Builder protected_(@Nullable Output protected_) { + $.protected_ = protected_; + return this; + } + + public Builder protected_(Boolean protected_) { + return protected_(Output.of(protected_)); + } + + public OrganizationRulesetConditionsRepositoryNameArgs build() { + $.excludes = Objects.requireNonNull($.excludes, "expected parameter 'excludes' to be non-null"); + $.inlcudes = Objects.requireNonNull($.inlcudes, "expected parameter 'inlcudes' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesArgs.java new file mode 100644 index 00000000..e0160a23 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesArgs.java @@ -0,0 +1,534 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.github.inputs.OrganizationRulesetRulesBranchNamePatternArgs; +import com.pulumi.github.inputs.OrganizationRulesetRulesCommitAuthorEmailPatternArgs; +import com.pulumi.github.inputs.OrganizationRulesetRulesCommitMessagePatternArgs; +import com.pulumi.github.inputs.OrganizationRulesetRulesCommitterEmailPatternArgs; +import com.pulumi.github.inputs.OrganizationRulesetRulesPullRequestArgs; +import com.pulumi.github.inputs.OrganizationRulesetRulesRequiredStatusChecksArgs; +import com.pulumi.github.inputs.OrganizationRulesetRulesTagNamePatternArgs; +import java.lang.Boolean; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetRulesArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetRulesArgs Empty = new OrganizationRulesetRulesArgs(); + + /** + * (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + * + */ + @Import(name="branchNamePattern") + private @Nullable Output branchNamePattern; + + /** + * @return (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + * + */ + public Optional> branchNamePattern() { + return Optional.ofNullable(this.branchNamePattern); + } + + /** + * (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + @Import(name="commitAuthorEmailPattern") + private @Nullable Output commitAuthorEmailPattern; + + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional> commitAuthorEmailPattern() { + return Optional.ofNullable(this.commitAuthorEmailPattern); + } + + /** + * (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + @Import(name="commitMessagePattern") + private @Nullable Output commitMessagePattern; + + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional> commitMessagePattern() { + return Optional.ofNullable(this.commitMessagePattern); + } + + /** + * (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + @Import(name="committerEmailPattern") + private @Nullable Output committerEmailPattern; + + /** + * @return (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional> committerEmailPattern() { + return Optional.ofNullable(this.committerEmailPattern); + } + + /** + * (Boolean) Only allow users with bypass permission to create matching refs. + * + */ + @Import(name="creation") + private @Nullable Output creation; + + /** + * @return (Boolean) Only allow users with bypass permission to create matching refs. + * + */ + public Optional> creation() { + return Optional.ofNullable(this.creation); + } + + /** + * (Boolean) Only allow users with bypass permissions to delete matching refs. + * + */ + @Import(name="deletion") + private @Nullable Output deletion; + + /** + * @return (Boolean) Only allow users with bypass permissions to delete matching refs. + * + */ + public Optional> deletion() { + return Optional.ofNullable(this.deletion); + } + + /** + * (Boolean) Prevent users with push access from force pushing to branches. + * + */ + @Import(name="nonFastForward") + private @Nullable Output nonFastForward; + + /** + * @return (Boolean) Prevent users with push access from force pushing to branches. + * + */ + public Optional> nonFastForward() { + return Optional.ofNullable(this.nonFastForward); + } + + /** + * (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + */ + @Import(name="pullRequest") + private @Nullable Output pullRequest; + + /** + * @return (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + */ + public Optional> pullRequest() { + return Optional.ofNullable(this.pullRequest); + } + + /** + * (Boolean) Prevent merge commits from being pushed to matching branches. + * + */ + @Import(name="requiredLinearHistory") + private @Nullable Output requiredLinearHistory; + + /** + * @return (Boolean) Prevent merge commits from being pushed to matching branches. + * + */ + public Optional> requiredLinearHistory() { + return Optional.ofNullable(this.requiredLinearHistory); + } + + /** + * (Boolean) Commits pushed to matching branches must have verified signatures. + * + */ + @Import(name="requiredSignatures") + private @Nullable Output requiredSignatures; + + /** + * @return (Boolean) Commits pushed to matching branches must have verified signatures. + * + */ + public Optional> requiredSignatures() { + return Optional.ofNullable(this.requiredSignatures); + } + + /** + * (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + */ + @Import(name="requiredStatusChecks") + private @Nullable Output requiredStatusChecks; + + /** + * @return (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + */ + public Optional> requiredStatusChecks() { + return Optional.ofNullable(this.requiredStatusChecks); + } + + /** + * (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + * + */ + @Import(name="tagNamePattern") + private @Nullable Output tagNamePattern; + + /** + * @return (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + * + */ + public Optional> tagNamePattern() { + return Optional.ofNullable(this.tagNamePattern); + } + + /** + * (Boolean) Only allow users with bypass permission to update matching refs. + * + */ + @Import(name="update") + private @Nullable Output update; + + /** + * @return (Boolean) Only allow users with bypass permission to update matching refs. + * + */ + public Optional> update() { + return Optional.ofNullable(this.update); + } + + private OrganizationRulesetRulesArgs() {} + + private OrganizationRulesetRulesArgs(OrganizationRulesetRulesArgs $) { + this.branchNamePattern = $.branchNamePattern; + this.commitAuthorEmailPattern = $.commitAuthorEmailPattern; + this.commitMessagePattern = $.commitMessagePattern; + this.committerEmailPattern = $.committerEmailPattern; + this.creation = $.creation; + this.deletion = $.deletion; + this.nonFastForward = $.nonFastForward; + this.pullRequest = $.pullRequest; + this.requiredLinearHistory = $.requiredLinearHistory; + this.requiredSignatures = $.requiredSignatures; + this.requiredStatusChecks = $.requiredStatusChecks; + this.tagNamePattern = $.tagNamePattern; + this.update = $.update; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetRulesArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetRulesArgs $; + + public Builder() { + $ = new OrganizationRulesetRulesArgs(); + } + + public Builder(OrganizationRulesetRulesArgs defaults) { + $ = new OrganizationRulesetRulesArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param branchNamePattern (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + * + * @return builder + * + */ + public Builder branchNamePattern(@Nullable Output branchNamePattern) { + $.branchNamePattern = branchNamePattern; + return this; + } + + /** + * @param branchNamePattern (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + * + * @return builder + * + */ + public Builder branchNamePattern(OrganizationRulesetRulesBranchNamePatternArgs branchNamePattern) { + return branchNamePattern(Output.of(branchNamePattern)); + } + + /** + * @param commitAuthorEmailPattern (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder commitAuthorEmailPattern(@Nullable Output commitAuthorEmailPattern) { + $.commitAuthorEmailPattern = commitAuthorEmailPattern; + return this; + } + + /** + * @param commitAuthorEmailPattern (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder commitAuthorEmailPattern(OrganizationRulesetRulesCommitAuthorEmailPatternArgs commitAuthorEmailPattern) { + return commitAuthorEmailPattern(Output.of(commitAuthorEmailPattern)); + } + + /** + * @param commitMessagePattern (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder commitMessagePattern(@Nullable Output commitMessagePattern) { + $.commitMessagePattern = commitMessagePattern; + return this; + } + + /** + * @param commitMessagePattern (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder commitMessagePattern(OrganizationRulesetRulesCommitMessagePatternArgs commitMessagePattern) { + return commitMessagePattern(Output.of(commitMessagePattern)); + } + + /** + * @param committerEmailPattern (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder committerEmailPattern(@Nullable Output committerEmailPattern) { + $.committerEmailPattern = committerEmailPattern; + return this; + } + + /** + * @param committerEmailPattern (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder committerEmailPattern(OrganizationRulesetRulesCommitterEmailPatternArgs committerEmailPattern) { + return committerEmailPattern(Output.of(committerEmailPattern)); + } + + /** + * @param creation (Boolean) Only allow users with bypass permission to create matching refs. + * + * @return builder + * + */ + public Builder creation(@Nullable Output creation) { + $.creation = creation; + return this; + } + + /** + * @param creation (Boolean) Only allow users with bypass permission to create matching refs. + * + * @return builder + * + */ + public Builder creation(Boolean creation) { + return creation(Output.of(creation)); + } + + /** + * @param deletion (Boolean) Only allow users with bypass permissions to delete matching refs. + * + * @return builder + * + */ + public Builder deletion(@Nullable Output deletion) { + $.deletion = deletion; + return this; + } + + /** + * @param deletion (Boolean) Only allow users with bypass permissions to delete matching refs. + * + * @return builder + * + */ + public Builder deletion(Boolean deletion) { + return deletion(Output.of(deletion)); + } + + /** + * @param nonFastForward (Boolean) Prevent users with push access from force pushing to branches. + * + * @return builder + * + */ + public Builder nonFastForward(@Nullable Output nonFastForward) { + $.nonFastForward = nonFastForward; + return this; + } + + /** + * @param nonFastForward (Boolean) Prevent users with push access from force pushing to branches. + * + * @return builder + * + */ + public Builder nonFastForward(Boolean nonFastForward) { + return nonFastForward(Output.of(nonFastForward)); + } + + /** + * @param pullRequest (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + * @return builder + * + */ + public Builder pullRequest(@Nullable Output pullRequest) { + $.pullRequest = pullRequest; + return this; + } + + /** + * @param pullRequest (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + * @return builder + * + */ + public Builder pullRequest(OrganizationRulesetRulesPullRequestArgs pullRequest) { + return pullRequest(Output.of(pullRequest)); + } + + /** + * @param requiredLinearHistory (Boolean) Prevent merge commits from being pushed to matching branches. + * + * @return builder + * + */ + public Builder requiredLinearHistory(@Nullable Output requiredLinearHistory) { + $.requiredLinearHistory = requiredLinearHistory; + return this; + } + + /** + * @param requiredLinearHistory (Boolean) Prevent merge commits from being pushed to matching branches. + * + * @return builder + * + */ + public Builder requiredLinearHistory(Boolean requiredLinearHistory) { + return requiredLinearHistory(Output.of(requiredLinearHistory)); + } + + /** + * @param requiredSignatures (Boolean) Commits pushed to matching branches must have verified signatures. + * + * @return builder + * + */ + public Builder requiredSignatures(@Nullable Output requiredSignatures) { + $.requiredSignatures = requiredSignatures; + return this; + } + + /** + * @param requiredSignatures (Boolean) Commits pushed to matching branches must have verified signatures. + * + * @return builder + * + */ + public Builder requiredSignatures(Boolean requiredSignatures) { + return requiredSignatures(Output.of(requiredSignatures)); + } + + /** + * @param requiredStatusChecks (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredStatusChecks(@Nullable Output requiredStatusChecks) { + $.requiredStatusChecks = requiredStatusChecks; + return this; + } + + /** + * @param requiredStatusChecks (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredStatusChecks(OrganizationRulesetRulesRequiredStatusChecksArgs requiredStatusChecks) { + return requiredStatusChecks(Output.of(requiredStatusChecks)); + } + + /** + * @param tagNamePattern (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + * + * @return builder + * + */ + public Builder tagNamePattern(@Nullable Output tagNamePattern) { + $.tagNamePattern = tagNamePattern; + return this; + } + + /** + * @param tagNamePattern (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + * + * @return builder + * + */ + public Builder tagNamePattern(OrganizationRulesetRulesTagNamePatternArgs tagNamePattern) { + return tagNamePattern(Output.of(tagNamePattern)); + } + + /** + * @param update (Boolean) Only allow users with bypass permission to update matching refs. + * + * @return builder + * + */ + public Builder update(@Nullable Output update) { + $.update = update; + return this; + } + + /** + * @param update (Boolean) Only allow users with bypass permission to update matching refs. + * + * @return builder + * + */ + public Builder update(Boolean update) { + return update(Output.of(update)); + } + + public OrganizationRulesetRulesArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesBranchNamePatternArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesBranchNamePatternArgs.java new file mode 100644 index 00000000..e3e64f60 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesBranchNamePatternArgs.java @@ -0,0 +1,197 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetRulesBranchNamePatternArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetRulesBranchNamePatternArgs Empty = new OrganizationRulesetRulesBranchNamePatternArgs(); + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (Boolean) If true, the rule will fail if the pattern matches. + * + */ + @Import(name="negate") + private @Nullable Output negate; + + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional> negate() { + return Optional.ofNullable(this.negate); + } + + /** + * (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + @Import(name="operator", required=true) + private Output operator; + + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public Output operator() { + return this.operator; + } + + /** + * (String) The pattern to match with. + * + */ + @Import(name="pattern", required=true) + private Output pattern; + + /** + * @return (String) The pattern to match with. + * + */ + public Output pattern() { + return this.pattern; + } + + private OrganizationRulesetRulesBranchNamePatternArgs() {} + + private OrganizationRulesetRulesBranchNamePatternArgs(OrganizationRulesetRulesBranchNamePatternArgs $) { + this.name = $.name; + this.negate = $.negate; + this.operator = $.operator; + this.pattern = $.pattern; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetRulesBranchNamePatternArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetRulesBranchNamePatternArgs $; + + public Builder() { + $ = new OrganizationRulesetRulesBranchNamePatternArgs(); + } + + public Builder(OrganizationRulesetRulesBranchNamePatternArgs defaults) { + $ = new OrganizationRulesetRulesBranchNamePatternArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(@Nullable Output negate) { + $.negate = negate; + return this; + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(Boolean negate) { + return negate(Output.of(negate)); + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(Output operator) { + $.operator = operator; + return this; + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(String operator) { + return operator(Output.of(operator)); + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(Output pattern) { + $.pattern = pattern; + return this; + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(String pattern) { + return pattern(Output.of(pattern)); + } + + public OrganizationRulesetRulesBranchNamePatternArgs build() { + $.operator = Objects.requireNonNull($.operator, "expected parameter 'operator' to be non-null"); + $.pattern = Objects.requireNonNull($.pattern, "expected parameter 'pattern' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitAuthorEmailPatternArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitAuthorEmailPatternArgs.java new file mode 100644 index 00000000..ba5779fb --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitAuthorEmailPatternArgs.java @@ -0,0 +1,197 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetRulesCommitAuthorEmailPatternArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetRulesCommitAuthorEmailPatternArgs Empty = new OrganizationRulesetRulesCommitAuthorEmailPatternArgs(); + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (Boolean) If true, the rule will fail if the pattern matches. + * + */ + @Import(name="negate") + private @Nullable Output negate; + + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional> negate() { + return Optional.ofNullable(this.negate); + } + + /** + * (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + @Import(name="operator", required=true) + private Output operator; + + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public Output operator() { + return this.operator; + } + + /** + * (String) The pattern to match with. + * + */ + @Import(name="pattern", required=true) + private Output pattern; + + /** + * @return (String) The pattern to match with. + * + */ + public Output pattern() { + return this.pattern; + } + + private OrganizationRulesetRulesCommitAuthorEmailPatternArgs() {} + + private OrganizationRulesetRulesCommitAuthorEmailPatternArgs(OrganizationRulesetRulesCommitAuthorEmailPatternArgs $) { + this.name = $.name; + this.negate = $.negate; + this.operator = $.operator; + this.pattern = $.pattern; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetRulesCommitAuthorEmailPatternArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetRulesCommitAuthorEmailPatternArgs $; + + public Builder() { + $ = new OrganizationRulesetRulesCommitAuthorEmailPatternArgs(); + } + + public Builder(OrganizationRulesetRulesCommitAuthorEmailPatternArgs defaults) { + $ = new OrganizationRulesetRulesCommitAuthorEmailPatternArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(@Nullable Output negate) { + $.negate = negate; + return this; + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(Boolean negate) { + return negate(Output.of(negate)); + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(Output operator) { + $.operator = operator; + return this; + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(String operator) { + return operator(Output.of(operator)); + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(Output pattern) { + $.pattern = pattern; + return this; + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(String pattern) { + return pattern(Output.of(pattern)); + } + + public OrganizationRulesetRulesCommitAuthorEmailPatternArgs build() { + $.operator = Objects.requireNonNull($.operator, "expected parameter 'operator' to be non-null"); + $.pattern = Objects.requireNonNull($.pattern, "expected parameter 'pattern' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitMessagePatternArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitMessagePatternArgs.java new file mode 100644 index 00000000..62b5b3f5 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitMessagePatternArgs.java @@ -0,0 +1,197 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetRulesCommitMessagePatternArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetRulesCommitMessagePatternArgs Empty = new OrganizationRulesetRulesCommitMessagePatternArgs(); + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (Boolean) If true, the rule will fail if the pattern matches. + * + */ + @Import(name="negate") + private @Nullable Output negate; + + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional> negate() { + return Optional.ofNullable(this.negate); + } + + /** + * (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + @Import(name="operator", required=true) + private Output operator; + + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public Output operator() { + return this.operator; + } + + /** + * (String) The pattern to match with. + * + */ + @Import(name="pattern", required=true) + private Output pattern; + + /** + * @return (String) The pattern to match with. + * + */ + public Output pattern() { + return this.pattern; + } + + private OrganizationRulesetRulesCommitMessagePatternArgs() {} + + private OrganizationRulesetRulesCommitMessagePatternArgs(OrganizationRulesetRulesCommitMessagePatternArgs $) { + this.name = $.name; + this.negate = $.negate; + this.operator = $.operator; + this.pattern = $.pattern; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetRulesCommitMessagePatternArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetRulesCommitMessagePatternArgs $; + + public Builder() { + $ = new OrganizationRulesetRulesCommitMessagePatternArgs(); + } + + public Builder(OrganizationRulesetRulesCommitMessagePatternArgs defaults) { + $ = new OrganizationRulesetRulesCommitMessagePatternArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(@Nullable Output negate) { + $.negate = negate; + return this; + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(Boolean negate) { + return negate(Output.of(negate)); + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(Output operator) { + $.operator = operator; + return this; + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(String operator) { + return operator(Output.of(operator)); + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(Output pattern) { + $.pattern = pattern; + return this; + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(String pattern) { + return pattern(Output.of(pattern)); + } + + public OrganizationRulesetRulesCommitMessagePatternArgs build() { + $.operator = Objects.requireNonNull($.operator, "expected parameter 'operator' to be non-null"); + $.pattern = Objects.requireNonNull($.pattern, "expected parameter 'pattern' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitterEmailPatternArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitterEmailPatternArgs.java new file mode 100644 index 00000000..a69267f5 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesCommitterEmailPatternArgs.java @@ -0,0 +1,197 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetRulesCommitterEmailPatternArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetRulesCommitterEmailPatternArgs Empty = new OrganizationRulesetRulesCommitterEmailPatternArgs(); + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (Boolean) If true, the rule will fail if the pattern matches. + * + */ + @Import(name="negate") + private @Nullable Output negate; + + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional> negate() { + return Optional.ofNullable(this.negate); + } + + /** + * (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + @Import(name="operator", required=true) + private Output operator; + + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public Output operator() { + return this.operator; + } + + /** + * (String) The pattern to match with. + * + */ + @Import(name="pattern", required=true) + private Output pattern; + + /** + * @return (String) The pattern to match with. + * + */ + public Output pattern() { + return this.pattern; + } + + private OrganizationRulesetRulesCommitterEmailPatternArgs() {} + + private OrganizationRulesetRulesCommitterEmailPatternArgs(OrganizationRulesetRulesCommitterEmailPatternArgs $) { + this.name = $.name; + this.negate = $.negate; + this.operator = $.operator; + this.pattern = $.pattern; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetRulesCommitterEmailPatternArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetRulesCommitterEmailPatternArgs $; + + public Builder() { + $ = new OrganizationRulesetRulesCommitterEmailPatternArgs(); + } + + public Builder(OrganizationRulesetRulesCommitterEmailPatternArgs defaults) { + $ = new OrganizationRulesetRulesCommitterEmailPatternArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(@Nullable Output negate) { + $.negate = negate; + return this; + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(Boolean negate) { + return negate(Output.of(negate)); + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(Output operator) { + $.operator = operator; + return this; + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(String operator) { + return operator(Output.of(operator)); + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(Output pattern) { + $.pattern = pattern; + return this; + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(String pattern) { + return pattern(Output.of(pattern)); + } + + public OrganizationRulesetRulesCommitterEmailPatternArgs build() { + $.operator = Objects.requireNonNull($.operator, "expected parameter 'operator' to be non-null"); + $.pattern = Objects.requireNonNull($.pattern, "expected parameter 'pattern' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesPullRequestArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesPullRequestArgs.java new file mode 100644 index 00000000..6033f4c3 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesPullRequestArgs.java @@ -0,0 +1,232 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.Integer; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetRulesPullRequestArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetRulesPullRequestArgs Empty = new OrganizationRulesetRulesPullRequestArgs(); + + /** + * (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + */ + @Import(name="dismissStaleReviewsOnPush") + private @Nullable Output dismissStaleReviewsOnPush; + + /** + * @return (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + */ + public Optional> dismissStaleReviewsOnPush() { + return Optional.ofNullable(this.dismissStaleReviewsOnPush); + } + + /** + * (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + */ + @Import(name="requireCodeOwnerReview") + private @Nullable Output requireCodeOwnerReview; + + /** + * @return (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + */ + public Optional> requireCodeOwnerReview() { + return Optional.ofNullable(this.requireCodeOwnerReview); + } + + /** + * (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + */ + @Import(name="requireLastPushApproval") + private @Nullable Output requireLastPushApproval; + + /** + * @return (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + */ + public Optional> requireLastPushApproval() { + return Optional.ofNullable(this.requireLastPushApproval); + } + + /** + * (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + */ + @Import(name="requiredApprovingReviewCount") + private @Nullable Output requiredApprovingReviewCount; + + /** + * @return (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + */ + public Optional> requiredApprovingReviewCount() { + return Optional.ofNullable(this.requiredApprovingReviewCount); + } + + /** + * (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + */ + @Import(name="requiredReviewThreadResolution") + private @Nullable Output requiredReviewThreadResolution; + + /** + * @return (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + */ + public Optional> requiredReviewThreadResolution() { + return Optional.ofNullable(this.requiredReviewThreadResolution); + } + + private OrganizationRulesetRulesPullRequestArgs() {} + + private OrganizationRulesetRulesPullRequestArgs(OrganizationRulesetRulesPullRequestArgs $) { + this.dismissStaleReviewsOnPush = $.dismissStaleReviewsOnPush; + this.requireCodeOwnerReview = $.requireCodeOwnerReview; + this.requireLastPushApproval = $.requireLastPushApproval; + this.requiredApprovingReviewCount = $.requiredApprovingReviewCount; + this.requiredReviewThreadResolution = $.requiredReviewThreadResolution; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetRulesPullRequestArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetRulesPullRequestArgs $; + + public Builder() { + $ = new OrganizationRulesetRulesPullRequestArgs(); + } + + public Builder(OrganizationRulesetRulesPullRequestArgs defaults) { + $ = new OrganizationRulesetRulesPullRequestArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param dismissStaleReviewsOnPush (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + * @return builder + * + */ + public Builder dismissStaleReviewsOnPush(@Nullable Output dismissStaleReviewsOnPush) { + $.dismissStaleReviewsOnPush = dismissStaleReviewsOnPush; + return this; + } + + /** + * @param dismissStaleReviewsOnPush (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + * @return builder + * + */ + public Builder dismissStaleReviewsOnPush(Boolean dismissStaleReviewsOnPush) { + return dismissStaleReviewsOnPush(Output.of(dismissStaleReviewsOnPush)); + } + + /** + * @param requireCodeOwnerReview (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + * @return builder + * + */ + public Builder requireCodeOwnerReview(@Nullable Output requireCodeOwnerReview) { + $.requireCodeOwnerReview = requireCodeOwnerReview; + return this; + } + + /** + * @param requireCodeOwnerReview (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + * @return builder + * + */ + public Builder requireCodeOwnerReview(Boolean requireCodeOwnerReview) { + return requireCodeOwnerReview(Output.of(requireCodeOwnerReview)); + } + + /** + * @param requireLastPushApproval (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + * @return builder + * + */ + public Builder requireLastPushApproval(@Nullable Output requireLastPushApproval) { + $.requireLastPushApproval = requireLastPushApproval; + return this; + } + + /** + * @param requireLastPushApproval (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + * @return builder + * + */ + public Builder requireLastPushApproval(Boolean requireLastPushApproval) { + return requireLastPushApproval(Output.of(requireLastPushApproval)); + } + + /** + * @param requiredApprovingReviewCount (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + * @return builder + * + */ + public Builder requiredApprovingReviewCount(@Nullable Output requiredApprovingReviewCount) { + $.requiredApprovingReviewCount = requiredApprovingReviewCount; + return this; + } + + /** + * @param requiredApprovingReviewCount (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + * @return builder + * + */ + public Builder requiredApprovingReviewCount(Integer requiredApprovingReviewCount) { + return requiredApprovingReviewCount(Output.of(requiredApprovingReviewCount)); + } + + /** + * @param requiredReviewThreadResolution (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + * @return builder + * + */ + public Builder requiredReviewThreadResolution(@Nullable Output requiredReviewThreadResolution) { + $.requiredReviewThreadResolution = requiredReviewThreadResolution; + return this; + } + + /** + * @param requiredReviewThreadResolution (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + * @return builder + * + */ + public Builder requiredReviewThreadResolution(Boolean requiredReviewThreadResolution) { + return requiredReviewThreadResolution(Output.of(requiredReviewThreadResolution)); + } + + public OrganizationRulesetRulesPullRequestArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesRequiredStatusChecksArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesRequiredStatusChecksArgs.java new file mode 100644 index 00000000..9f5f3bb2 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesRequiredStatusChecksArgs.java @@ -0,0 +1,133 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.github.inputs.OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs; +import java.lang.Boolean; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetRulesRequiredStatusChecksArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetRulesRequiredStatusChecksArgs Empty = new OrganizationRulesetRulesRequiredStatusChecksArgs(); + + /** + * (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + */ + @Import(name="requiredChecks", required=true) + private Output> requiredChecks; + + /** + * @return (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + */ + public Output> requiredChecks() { + return this.requiredChecks; + } + + /** + * (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + */ + @Import(name="strictRequiredStatusChecksPolicy") + private @Nullable Output strictRequiredStatusChecksPolicy; + + /** + * @return (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + */ + public Optional> strictRequiredStatusChecksPolicy() { + return Optional.ofNullable(this.strictRequiredStatusChecksPolicy); + } + + private OrganizationRulesetRulesRequiredStatusChecksArgs() {} + + private OrganizationRulesetRulesRequiredStatusChecksArgs(OrganizationRulesetRulesRequiredStatusChecksArgs $) { + this.requiredChecks = $.requiredChecks; + this.strictRequiredStatusChecksPolicy = $.strictRequiredStatusChecksPolicy; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetRulesRequiredStatusChecksArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetRulesRequiredStatusChecksArgs $; + + public Builder() { + $ = new OrganizationRulesetRulesRequiredStatusChecksArgs(); + } + + public Builder(OrganizationRulesetRulesRequiredStatusChecksArgs defaults) { + $ = new OrganizationRulesetRulesRequiredStatusChecksArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param requiredChecks (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredChecks(Output> requiredChecks) { + $.requiredChecks = requiredChecks; + return this; + } + + /** + * @param requiredChecks (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredChecks(List requiredChecks) { + return requiredChecks(Output.of(requiredChecks)); + } + + /** + * @param requiredChecks (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredChecks(OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs... requiredChecks) { + return requiredChecks(List.of(requiredChecks)); + } + + /** + * @param strictRequiredStatusChecksPolicy (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + * @return builder + * + */ + public Builder strictRequiredStatusChecksPolicy(@Nullable Output strictRequiredStatusChecksPolicy) { + $.strictRequiredStatusChecksPolicy = strictRequiredStatusChecksPolicy; + return this; + } + + /** + * @param strictRequiredStatusChecksPolicy (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + * @return builder + * + */ + public Builder strictRequiredStatusChecksPolicy(Boolean strictRequiredStatusChecksPolicy) { + return strictRequiredStatusChecksPolicy(Output.of(strictRequiredStatusChecksPolicy)); + } + + public OrganizationRulesetRulesRequiredStatusChecksArgs build() { + $.requiredChecks = Objects.requireNonNull($.requiredChecks, "expected parameter 'requiredChecks' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs.java new file mode 100644 index 00000000..de234fa8 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs.java @@ -0,0 +1,122 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs Empty = new OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs(); + + /** + * (String) The status check context name that must be present on the commit. + * + */ + @Import(name="context", required=true) + private Output context; + + /** + * @return (String) The status check context name that must be present on the commit. + * + */ + public Output context() { + return this.context; + } + + /** + * (Number) The optional integration ID that this status check must originate from. + * + */ + @Import(name="integrationId") + private @Nullable Output integrationId; + + /** + * @return (Number) The optional integration ID that this status check must originate from. + * + */ + public Optional> integrationId() { + return Optional.ofNullable(this.integrationId); + } + + private OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs() {} + + private OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs(OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs $) { + this.context = $.context; + this.integrationId = $.integrationId; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs $; + + public Builder() { + $ = new OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs(); + } + + public Builder(OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs defaults) { + $ = new OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param context (String) The status check context name that must be present on the commit. + * + * @return builder + * + */ + public Builder context(Output context) { + $.context = context; + return this; + } + + /** + * @param context (String) The status check context name that must be present on the commit. + * + * @return builder + * + */ + public Builder context(String context) { + return context(Output.of(context)); + } + + /** + * @param integrationId (Number) The optional integration ID that this status check must originate from. + * + * @return builder + * + */ + public Builder integrationId(@Nullable Output integrationId) { + $.integrationId = integrationId; + return this; + } + + /** + * @param integrationId (Number) The optional integration ID that this status check must originate from. + * + * @return builder + * + */ + public Builder integrationId(Integer integrationId) { + return integrationId(Output.of(integrationId)); + } + + public OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs build() { + $.context = Objects.requireNonNull($.context, "expected parameter 'context' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesTagNamePatternArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesTagNamePatternArgs.java new file mode 100644 index 00000000..b4af1aa0 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetRulesTagNamePatternArgs.java @@ -0,0 +1,197 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetRulesTagNamePatternArgs extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetRulesTagNamePatternArgs Empty = new OrganizationRulesetRulesTagNamePatternArgs(); + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (Boolean) If true, the rule will fail if the pattern matches. + * + */ + @Import(name="negate") + private @Nullable Output negate; + + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional> negate() { + return Optional.ofNullable(this.negate); + } + + /** + * (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + @Import(name="operator", required=true) + private Output operator; + + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public Output operator() { + return this.operator; + } + + /** + * (String) The pattern to match with. + * + */ + @Import(name="pattern", required=true) + private Output pattern; + + /** + * @return (String) The pattern to match with. + * + */ + public Output pattern() { + return this.pattern; + } + + private OrganizationRulesetRulesTagNamePatternArgs() {} + + private OrganizationRulesetRulesTagNamePatternArgs(OrganizationRulesetRulesTagNamePatternArgs $) { + this.name = $.name; + this.negate = $.negate; + this.operator = $.operator; + this.pattern = $.pattern; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetRulesTagNamePatternArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetRulesTagNamePatternArgs $; + + public Builder() { + $ = new OrganizationRulesetRulesTagNamePatternArgs(); + } + + public Builder(OrganizationRulesetRulesTagNamePatternArgs defaults) { + $ = new OrganizationRulesetRulesTagNamePatternArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(@Nullable Output negate) { + $.negate = negate; + return this; + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(Boolean negate) { + return negate(Output.of(negate)); + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(Output operator) { + $.operator = operator; + return this; + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(String operator) { + return operator(Output.of(operator)); + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(Output pattern) { + $.pattern = pattern; + return this; + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(String pattern) { + return pattern(Output.of(pattern)); + } + + public OrganizationRulesetRulesTagNamePatternArgs build() { + $.operator = Objects.requireNonNull($.operator, "expected parameter 'operator' to be non-null"); + $.pattern = Objects.requireNonNull($.pattern, "expected parameter 'pattern' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetState.java b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetState.java new file mode 100644 index 00000000..b0c3e69f --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/OrganizationRulesetState.java @@ -0,0 +1,394 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.github.inputs.OrganizationRulesetBypassActorArgs; +import com.pulumi.github.inputs.OrganizationRulesetConditionsArgs; +import com.pulumi.github.inputs.OrganizationRulesetRulesArgs; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class OrganizationRulesetState extends com.pulumi.resources.ResourceArgs { + + public static final OrganizationRulesetState Empty = new OrganizationRulesetState(); + + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + @Import(name="bypassActors") + private @Nullable Output> bypassActors; + + /** + * @return (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + public Optional>> bypassActors() { + return Optional.ofNullable(this.bypassActors); + } + + /** + * (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + * + */ + @Import(name="conditions") + private @Nullable Output conditions; + + /** + * @return (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + * + */ + public Optional> conditions() { + return Optional.ofNullable(this.conditions); + } + + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + @Import(name="enforcement") + private @Nullable Output enforcement; + + /** + * @return (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + public Optional> enforcement() { + return Optional.ofNullable(this.enforcement); + } + + /** + * (String) + * + */ + @Import(name="etag") + private @Nullable Output etag; + + /** + * @return (String) + * + */ + public Optional> etag() { + return Optional.ofNullable(this.etag); + } + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (String) GraphQL global node id for use with v4 API. + * + */ + @Import(name="nodeId") + private @Nullable Output nodeId; + + /** + * @return (String) GraphQL global node id for use with v4 API. + * + */ + public Optional> nodeId() { + return Optional.ofNullable(this.nodeId); + } + + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + @Import(name="rules") + private @Nullable Output rules; + + /** + * @return (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + public Optional> rules() { + return Optional.ofNullable(this.rules); + } + + /** + * (Number) GitHub ID for the ruleset. + * + */ + @Import(name="rulesetId") + private @Nullable Output rulesetId; + + /** + * @return (Number) GitHub ID for the ruleset. + * + */ + public Optional> rulesetId() { + return Optional.ofNullable(this.rulesetId); + } + + /** + * (String) Possible values are `branch` and `tag`. + * + */ + @Import(name="target") + private @Nullable Output target; + + /** + * @return (String) Possible values are `branch` and `tag`. + * + */ + public Optional> target() { + return Optional.ofNullable(this.target); + } + + private OrganizationRulesetState() {} + + private OrganizationRulesetState(OrganizationRulesetState $) { + this.bypassActors = $.bypassActors; + this.conditions = $.conditions; + this.enforcement = $.enforcement; + this.etag = $.etag; + this.name = $.name; + this.nodeId = $.nodeId; + this.rules = $.rules; + this.rulesetId = $.rulesetId; + this.target = $.target; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(OrganizationRulesetState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private OrganizationRulesetState $; + + public Builder() { + $ = new OrganizationRulesetState(); + } + + public Builder(OrganizationRulesetState defaults) { + $ = new OrganizationRulesetState(Objects.requireNonNull(defaults)); + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(@Nullable Output> bypassActors) { + $.bypassActors = bypassActors; + return this; + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(List bypassActors) { + return bypassActors(Output.of(bypassActors)); + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(OrganizationRulesetBypassActorArgs... bypassActors) { + return bypassActors(List.of(bypassActors)); + } + + /** + * @param conditions (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + * + * @return builder + * + */ + public Builder conditions(@Nullable Output conditions) { + $.conditions = conditions; + return this; + } + + /** + * @param conditions (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + * + * @return builder + * + */ + public Builder conditions(OrganizationRulesetConditionsArgs conditions) { + return conditions(Output.of(conditions)); + } + + /** + * @param enforcement (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + * @return builder + * + */ + public Builder enforcement(@Nullable Output enforcement) { + $.enforcement = enforcement; + return this; + } + + /** + * @param enforcement (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + * @return builder + * + */ + public Builder enforcement(String enforcement) { + return enforcement(Output.of(enforcement)); + } + + /** + * @param etag (String) + * + * @return builder + * + */ + public Builder etag(@Nullable Output etag) { + $.etag = etag; + return this; + } + + /** + * @param etag (String) + * + * @return builder + * + */ + public Builder etag(String etag) { + return etag(Output.of(etag)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param nodeId (String) GraphQL global node id for use with v4 API. + * + * @return builder + * + */ + public Builder nodeId(@Nullable Output nodeId) { + $.nodeId = nodeId; + return this; + } + + /** + * @param nodeId (String) GraphQL global node id for use with v4 API. + * + * @return builder + * + */ + public Builder nodeId(String nodeId) { + return nodeId(Output.of(nodeId)); + } + + /** + * @param rules (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder rules(@Nullable Output rules) { + $.rules = rules; + return this; + } + + /** + * @param rules (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder rules(OrganizationRulesetRulesArgs rules) { + return rules(Output.of(rules)); + } + + /** + * @param rulesetId (Number) GitHub ID for the ruleset. + * + * @return builder + * + */ + public Builder rulesetId(@Nullable Output rulesetId) { + $.rulesetId = rulesetId; + return this; + } + + /** + * @param rulesetId (Number) GitHub ID for the ruleset. + * + * @return builder + * + */ + public Builder rulesetId(Integer rulesetId) { + return rulesetId(Output.of(rulesetId)); + } + + /** + * @param target (String) Possible values are `branch` and `tag`. + * + * @return builder + * + */ + public Builder target(@Nullable Output target) { + $.target = target; + return this; + } + + /** + * @param target (String) Possible values are `branch` and `tag`. + * + * @return builder + * + */ + public Builder target(String target) { + return target(Output.of(target)); + } + + public OrganizationRulesetState build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetBypassActorArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetBypassActorArgs.java new file mode 100644 index 00000000..f8739074 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetBypassActorArgs.java @@ -0,0 +1,160 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetBypassActorArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetBypassActorArgs Empty = new RepositoryRulesetBypassActorArgs(); + + /** + * (Number) The ID of the actor that can bypass a ruleset + * + */ + @Import(name="actorId", required=true) + private Output actorId; + + /** + * @return (Number) The ID of the actor that can bypass a ruleset + * + */ + public Output actorId() { + return this.actorId; + } + + /** + * The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + */ + @Import(name="actorType", required=true) + private Output actorType; + + /** + * @return The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + */ + public Output actorType() { + return this.actorType; + } + + /** + * (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + */ + @Import(name="bypassMode") + private @Nullable Output bypassMode; + + /** + * @return (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + */ + public Optional> bypassMode() { + return Optional.ofNullable(this.bypassMode); + } + + private RepositoryRulesetBypassActorArgs() {} + + private RepositoryRulesetBypassActorArgs(RepositoryRulesetBypassActorArgs $) { + this.actorId = $.actorId; + this.actorType = $.actorType; + this.bypassMode = $.bypassMode; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetBypassActorArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetBypassActorArgs $; + + public Builder() { + $ = new RepositoryRulesetBypassActorArgs(); + } + + public Builder(RepositoryRulesetBypassActorArgs defaults) { + $ = new RepositoryRulesetBypassActorArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param actorId (Number) The ID of the actor that can bypass a ruleset + * + * @return builder + * + */ + public Builder actorId(Output actorId) { + $.actorId = actorId; + return this; + } + + /** + * @param actorId (Number) The ID of the actor that can bypass a ruleset + * + * @return builder + * + */ + public Builder actorId(Integer actorId) { + return actorId(Output.of(actorId)); + } + + /** + * @param actorType The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + * @return builder + * + */ + public Builder actorType(Output actorType) { + $.actorType = actorType; + return this; + } + + /** + * @param actorType The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + * @return builder + * + */ + public Builder actorType(String actorType) { + return actorType(Output.of(actorType)); + } + + /** + * @param bypassMode (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + * @return builder + * + */ + public Builder bypassMode(@Nullable Output bypassMode) { + $.bypassMode = bypassMode; + return this; + } + + /** + * @param bypassMode (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + * @return builder + * + */ + public Builder bypassMode(String bypassMode) { + return bypassMode(Output.of(bypassMode)); + } + + public RepositoryRulesetBypassActorArgs build() { + $.actorId = Objects.requireNonNull($.actorId, "expected parameter 'actorId' to be non-null"); + $.actorType = Objects.requireNonNull($.actorType, "expected parameter 'actorType' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetConditionsArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetConditionsArgs.java new file mode 100644 index 00000000..6e71abf6 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetConditionsArgs.java @@ -0,0 +1,82 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.github.inputs.RepositoryRulesetConditionsRefNameArgs; +import java.util.Objects; + + +public final class RepositoryRulesetConditionsArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetConditionsArgs Empty = new RepositoryRulesetConditionsArgs(); + + /** + * (Block List, Min: 1, Max: 1) (see below for nested schema) + * + */ + @Import(name="refName", required=true) + private Output refName; + + /** + * @return (Block List, Min: 1, Max: 1) (see below for nested schema) + * + */ + public Output refName() { + return this.refName; + } + + private RepositoryRulesetConditionsArgs() {} + + private RepositoryRulesetConditionsArgs(RepositoryRulesetConditionsArgs $) { + this.refName = $.refName; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetConditionsArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetConditionsArgs $; + + public Builder() { + $ = new RepositoryRulesetConditionsArgs(); + } + + public Builder(RepositoryRulesetConditionsArgs defaults) { + $ = new RepositoryRulesetConditionsArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param refName (Block List, Min: 1, Max: 1) (see below for nested schema) + * + * @return builder + * + */ + public Builder refName(Output refName) { + $.refName = refName; + return this; + } + + /** + * @param refName (Block List, Min: 1, Max: 1) (see below for nested schema) + * + * @return builder + * + */ + public Builder refName(RepositoryRulesetConditionsRefNameArgs refName) { + return refName(Output.of(refName)); + } + + public RepositoryRulesetConditionsArgs build() { + $.refName = Objects.requireNonNull($.refName, "expected parameter 'refName' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetConditionsRefNameArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetConditionsRefNameArgs.java new file mode 100644 index 00000000..ef5f884f --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetConditionsRefNameArgs.java @@ -0,0 +1,141 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.List; +import java.util.Objects; + + +public final class RepositoryRulesetConditionsRefNameArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetConditionsRefNameArgs Empty = new RepositoryRulesetConditionsRefNameArgs(); + + /** + * (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + @Import(name="excludes", required=true) + private Output> excludes; + + /** + * @return (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + public Output> excludes() { + return this.excludes; + } + + /** + * (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + */ + @Import(name="includes", required=true) + private Output> includes; + + /** + * @return (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + */ + public Output> includes() { + return this.includes; + } + + private RepositoryRulesetConditionsRefNameArgs() {} + + private RepositoryRulesetConditionsRefNameArgs(RepositoryRulesetConditionsRefNameArgs $) { + this.excludes = $.excludes; + this.includes = $.includes; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetConditionsRefNameArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetConditionsRefNameArgs $; + + public Builder() { + $ = new RepositoryRulesetConditionsRefNameArgs(); + } + + public Builder(RepositoryRulesetConditionsRefNameArgs defaults) { + $ = new RepositoryRulesetConditionsRefNameArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param excludes (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + * @return builder + * + */ + public Builder excludes(Output> excludes) { + $.excludes = excludes; + return this; + } + + /** + * @param excludes (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + * @return builder + * + */ + public Builder excludes(List excludes) { + return excludes(Output.of(excludes)); + } + + /** + * @param excludes (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + * @return builder + * + */ + public Builder excludes(String... excludes) { + return excludes(List.of(excludes)); + } + + /** + * @param includes (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + * @return builder + * + */ + public Builder includes(Output> includes) { + $.includes = includes; + return this; + } + + /** + * @param includes (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + * @return builder + * + */ + public Builder includes(List includes) { + return includes(Output.of(includes)); + } + + /** + * @param includes (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + * @return builder + * + */ + public Builder includes(String... includes) { + return includes(List.of(includes)); + } + + public RepositoryRulesetConditionsRefNameArgs build() { + $.excludes = Objects.requireNonNull($.excludes, "expected parameter 'excludes' to be non-null"); + $.includes = Objects.requireNonNull($.includes, "expected parameter 'includes' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesArgs.java new file mode 100644 index 00000000..52fc06e5 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesArgs.java @@ -0,0 +1,609 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.github.inputs.RepositoryRulesetRulesBranchNamePatternArgs; +import com.pulumi.github.inputs.RepositoryRulesetRulesCommitAuthorEmailPatternArgs; +import com.pulumi.github.inputs.RepositoryRulesetRulesCommitMessagePatternArgs; +import com.pulumi.github.inputs.RepositoryRulesetRulesCommitterEmailPatternArgs; +import com.pulumi.github.inputs.RepositoryRulesetRulesPullRequestArgs; +import com.pulumi.github.inputs.RepositoryRulesetRulesRequiredDeploymentsArgs; +import com.pulumi.github.inputs.RepositoryRulesetRulesRequiredStatusChecksArgs; +import com.pulumi.github.inputs.RepositoryRulesetRulesTagNamePatternArgs; +import java.lang.Boolean; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetRulesArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetRulesArgs Empty = new RepositoryRulesetRulesArgs(); + + /** + * (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + * + */ + @Import(name="branchNamePattern") + private @Nullable Output branchNamePattern; + + /** + * @return (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + * + */ + public Optional> branchNamePattern() { + return Optional.ofNullable(this.branchNamePattern); + } + + /** + * (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + @Import(name="commitAuthorEmailPattern") + private @Nullable Output commitAuthorEmailPattern; + + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional> commitAuthorEmailPattern() { + return Optional.ofNullable(this.commitAuthorEmailPattern); + } + + /** + * (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + @Import(name="commitMessagePattern") + private @Nullable Output commitMessagePattern; + + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional> commitMessagePattern() { + return Optional.ofNullable(this.commitMessagePattern); + } + + /** + * (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + @Import(name="committerEmailPattern") + private @Nullable Output committerEmailPattern; + + /** + * @return (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional> committerEmailPattern() { + return Optional.ofNullable(this.committerEmailPattern); + } + + /** + * (Boolean) Only allow users with bypass permission to create matching refs. + * + */ + @Import(name="creation") + private @Nullable Output creation; + + /** + * @return (Boolean) Only allow users with bypass permission to create matching refs. + * + */ + public Optional> creation() { + return Optional.ofNullable(this.creation); + } + + /** + * (Boolean) Only allow users with bypass permissions to delete matching refs. + * + */ + @Import(name="deletion") + private @Nullable Output deletion; + + /** + * @return (Boolean) Only allow users with bypass permissions to delete matching refs. + * + */ + public Optional> deletion() { + return Optional.ofNullable(this.deletion); + } + + /** + * (Boolean) Prevent users with push access from force pushing to branches. + * + */ + @Import(name="nonFastForward") + private @Nullable Output nonFastForward; + + /** + * @return (Boolean) Prevent users with push access from force pushing to branches. + * + */ + public Optional> nonFastForward() { + return Optional.ofNullable(this.nonFastForward); + } + + /** + * (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + */ + @Import(name="pullRequest") + private @Nullable Output pullRequest; + + /** + * @return (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + */ + public Optional> pullRequest() { + return Optional.ofNullable(this.pullRequest); + } + + /** + * (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + * + */ + @Import(name="requiredDeployments") + private @Nullable Output requiredDeployments; + + /** + * @return (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + * + */ + public Optional> requiredDeployments() { + return Optional.ofNullable(this.requiredDeployments); + } + + /** + * (Boolean) Prevent merge commits from being pushed to matching branches. + * + */ + @Import(name="requiredLinearHistory") + private @Nullable Output requiredLinearHistory; + + /** + * @return (Boolean) Prevent merge commits from being pushed to matching branches. + * + */ + public Optional> requiredLinearHistory() { + return Optional.ofNullable(this.requiredLinearHistory); + } + + /** + * (Boolean) Commits pushed to matching branches must have verified signatures. + * + */ + @Import(name="requiredSignatures") + private @Nullable Output requiredSignatures; + + /** + * @return (Boolean) Commits pushed to matching branches must have verified signatures. + * + */ + public Optional> requiredSignatures() { + return Optional.ofNullable(this.requiredSignatures); + } + + /** + * (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + */ + @Import(name="requiredStatusChecks") + private @Nullable Output requiredStatusChecks; + + /** + * @return (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + */ + public Optional> requiredStatusChecks() { + return Optional.ofNullable(this.requiredStatusChecks); + } + + /** + * (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + * + */ + @Import(name="tagNamePattern") + private @Nullable Output tagNamePattern; + + /** + * @return (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + * + */ + public Optional> tagNamePattern() { + return Optional.ofNullable(this.tagNamePattern); + } + + /** + * (Boolean) Only allow users with bypass permission to update matching refs. + * + */ + @Import(name="update") + private @Nullable Output update; + + /** + * @return (Boolean) Only allow users with bypass permission to update matching refs. + * + */ + public Optional> update() { + return Optional.ofNullable(this.update); + } + + /** + * (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + * + */ + @Import(name="updateAllowsFetchAndMerge") + private @Nullable Output updateAllowsFetchAndMerge; + + /** + * @return (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + * + */ + public Optional> updateAllowsFetchAndMerge() { + return Optional.ofNullable(this.updateAllowsFetchAndMerge); + } + + private RepositoryRulesetRulesArgs() {} + + private RepositoryRulesetRulesArgs(RepositoryRulesetRulesArgs $) { + this.branchNamePattern = $.branchNamePattern; + this.commitAuthorEmailPattern = $.commitAuthorEmailPattern; + this.commitMessagePattern = $.commitMessagePattern; + this.committerEmailPattern = $.committerEmailPattern; + this.creation = $.creation; + this.deletion = $.deletion; + this.nonFastForward = $.nonFastForward; + this.pullRequest = $.pullRequest; + this.requiredDeployments = $.requiredDeployments; + this.requiredLinearHistory = $.requiredLinearHistory; + this.requiredSignatures = $.requiredSignatures; + this.requiredStatusChecks = $.requiredStatusChecks; + this.tagNamePattern = $.tagNamePattern; + this.update = $.update; + this.updateAllowsFetchAndMerge = $.updateAllowsFetchAndMerge; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetRulesArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetRulesArgs $; + + public Builder() { + $ = new RepositoryRulesetRulesArgs(); + } + + public Builder(RepositoryRulesetRulesArgs defaults) { + $ = new RepositoryRulesetRulesArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param branchNamePattern (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + * + * @return builder + * + */ + public Builder branchNamePattern(@Nullable Output branchNamePattern) { + $.branchNamePattern = branchNamePattern; + return this; + } + + /** + * @param branchNamePattern (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + * + * @return builder + * + */ + public Builder branchNamePattern(RepositoryRulesetRulesBranchNamePatternArgs branchNamePattern) { + return branchNamePattern(Output.of(branchNamePattern)); + } + + /** + * @param commitAuthorEmailPattern (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder commitAuthorEmailPattern(@Nullable Output commitAuthorEmailPattern) { + $.commitAuthorEmailPattern = commitAuthorEmailPattern; + return this; + } + + /** + * @param commitAuthorEmailPattern (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder commitAuthorEmailPattern(RepositoryRulesetRulesCommitAuthorEmailPatternArgs commitAuthorEmailPattern) { + return commitAuthorEmailPattern(Output.of(commitAuthorEmailPattern)); + } + + /** + * @param commitMessagePattern (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder commitMessagePattern(@Nullable Output commitMessagePattern) { + $.commitMessagePattern = commitMessagePattern; + return this; + } + + /** + * @param commitMessagePattern (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder commitMessagePattern(RepositoryRulesetRulesCommitMessagePatternArgs commitMessagePattern) { + return commitMessagePattern(Output.of(commitMessagePattern)); + } + + /** + * @param committerEmailPattern (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder committerEmailPattern(@Nullable Output committerEmailPattern) { + $.committerEmailPattern = committerEmailPattern; + return this; + } + + /** + * @param committerEmailPattern (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + * @return builder + * + */ + public Builder committerEmailPattern(RepositoryRulesetRulesCommitterEmailPatternArgs committerEmailPattern) { + return committerEmailPattern(Output.of(committerEmailPattern)); + } + + /** + * @param creation (Boolean) Only allow users with bypass permission to create matching refs. + * + * @return builder + * + */ + public Builder creation(@Nullable Output creation) { + $.creation = creation; + return this; + } + + /** + * @param creation (Boolean) Only allow users with bypass permission to create matching refs. + * + * @return builder + * + */ + public Builder creation(Boolean creation) { + return creation(Output.of(creation)); + } + + /** + * @param deletion (Boolean) Only allow users with bypass permissions to delete matching refs. + * + * @return builder + * + */ + public Builder deletion(@Nullable Output deletion) { + $.deletion = deletion; + return this; + } + + /** + * @param deletion (Boolean) Only allow users with bypass permissions to delete matching refs. + * + * @return builder + * + */ + public Builder deletion(Boolean deletion) { + return deletion(Output.of(deletion)); + } + + /** + * @param nonFastForward (Boolean) Prevent users with push access from force pushing to branches. + * + * @return builder + * + */ + public Builder nonFastForward(@Nullable Output nonFastForward) { + $.nonFastForward = nonFastForward; + return this; + } + + /** + * @param nonFastForward (Boolean) Prevent users with push access from force pushing to branches. + * + * @return builder + * + */ + public Builder nonFastForward(Boolean nonFastForward) { + return nonFastForward(Output.of(nonFastForward)); + } + + /** + * @param pullRequest (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + * @return builder + * + */ + public Builder pullRequest(@Nullable Output pullRequest) { + $.pullRequest = pullRequest; + return this; + } + + /** + * @param pullRequest (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + * @return builder + * + */ + public Builder pullRequest(RepositoryRulesetRulesPullRequestArgs pullRequest) { + return pullRequest(Output.of(pullRequest)); + } + + /** + * @param requiredDeployments (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredDeployments(@Nullable Output requiredDeployments) { + $.requiredDeployments = requiredDeployments; + return this; + } + + /** + * @param requiredDeployments (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredDeployments(RepositoryRulesetRulesRequiredDeploymentsArgs requiredDeployments) { + return requiredDeployments(Output.of(requiredDeployments)); + } + + /** + * @param requiredLinearHistory (Boolean) Prevent merge commits from being pushed to matching branches. + * + * @return builder + * + */ + public Builder requiredLinearHistory(@Nullable Output requiredLinearHistory) { + $.requiredLinearHistory = requiredLinearHistory; + return this; + } + + /** + * @param requiredLinearHistory (Boolean) Prevent merge commits from being pushed to matching branches. + * + * @return builder + * + */ + public Builder requiredLinearHistory(Boolean requiredLinearHistory) { + return requiredLinearHistory(Output.of(requiredLinearHistory)); + } + + /** + * @param requiredSignatures (Boolean) Commits pushed to matching branches must have verified signatures. + * + * @return builder + * + */ + public Builder requiredSignatures(@Nullable Output requiredSignatures) { + $.requiredSignatures = requiredSignatures; + return this; + } + + /** + * @param requiredSignatures (Boolean) Commits pushed to matching branches must have verified signatures. + * + * @return builder + * + */ + public Builder requiredSignatures(Boolean requiredSignatures) { + return requiredSignatures(Output.of(requiredSignatures)); + } + + /** + * @param requiredStatusChecks (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredStatusChecks(@Nullable Output requiredStatusChecks) { + $.requiredStatusChecks = requiredStatusChecks; + return this; + } + + /** + * @param requiredStatusChecks (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredStatusChecks(RepositoryRulesetRulesRequiredStatusChecksArgs requiredStatusChecks) { + return requiredStatusChecks(Output.of(requiredStatusChecks)); + } + + /** + * @param tagNamePattern (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + * + * @return builder + * + */ + public Builder tagNamePattern(@Nullable Output tagNamePattern) { + $.tagNamePattern = tagNamePattern; + return this; + } + + /** + * @param tagNamePattern (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + * + * @return builder + * + */ + public Builder tagNamePattern(RepositoryRulesetRulesTagNamePatternArgs tagNamePattern) { + return tagNamePattern(Output.of(tagNamePattern)); + } + + /** + * @param update (Boolean) Only allow users with bypass permission to update matching refs. + * + * @return builder + * + */ + public Builder update(@Nullable Output update) { + $.update = update; + return this; + } + + /** + * @param update (Boolean) Only allow users with bypass permission to update matching refs. + * + * @return builder + * + */ + public Builder update(Boolean update) { + return update(Output.of(update)); + } + + /** + * @param updateAllowsFetchAndMerge (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + * + * @return builder + * + */ + public Builder updateAllowsFetchAndMerge(@Nullable Output updateAllowsFetchAndMerge) { + $.updateAllowsFetchAndMerge = updateAllowsFetchAndMerge; + return this; + } + + /** + * @param updateAllowsFetchAndMerge (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + * + * @return builder + * + */ + public Builder updateAllowsFetchAndMerge(Boolean updateAllowsFetchAndMerge) { + return updateAllowsFetchAndMerge(Output.of(updateAllowsFetchAndMerge)); + } + + public RepositoryRulesetRulesArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesBranchNamePatternArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesBranchNamePatternArgs.java new file mode 100644 index 00000000..5d7d8428 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesBranchNamePatternArgs.java @@ -0,0 +1,197 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetRulesBranchNamePatternArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetRulesBranchNamePatternArgs Empty = new RepositoryRulesetRulesBranchNamePatternArgs(); + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (Boolean) If true, the rule will fail if the pattern matches. + * + */ + @Import(name="negate") + private @Nullable Output negate; + + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional> negate() { + return Optional.ofNullable(this.negate); + } + + /** + * (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + @Import(name="operator", required=true) + private Output operator; + + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public Output operator() { + return this.operator; + } + + /** + * (String) The pattern to match with. + * + */ + @Import(name="pattern", required=true) + private Output pattern; + + /** + * @return (String) The pattern to match with. + * + */ + public Output pattern() { + return this.pattern; + } + + private RepositoryRulesetRulesBranchNamePatternArgs() {} + + private RepositoryRulesetRulesBranchNamePatternArgs(RepositoryRulesetRulesBranchNamePatternArgs $) { + this.name = $.name; + this.negate = $.negate; + this.operator = $.operator; + this.pattern = $.pattern; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetRulesBranchNamePatternArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetRulesBranchNamePatternArgs $; + + public Builder() { + $ = new RepositoryRulesetRulesBranchNamePatternArgs(); + } + + public Builder(RepositoryRulesetRulesBranchNamePatternArgs defaults) { + $ = new RepositoryRulesetRulesBranchNamePatternArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(@Nullable Output negate) { + $.negate = negate; + return this; + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(Boolean negate) { + return negate(Output.of(negate)); + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(Output operator) { + $.operator = operator; + return this; + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(String operator) { + return operator(Output.of(operator)); + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(Output pattern) { + $.pattern = pattern; + return this; + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(String pattern) { + return pattern(Output.of(pattern)); + } + + public RepositoryRulesetRulesBranchNamePatternArgs build() { + $.operator = Objects.requireNonNull($.operator, "expected parameter 'operator' to be non-null"); + $.pattern = Objects.requireNonNull($.pattern, "expected parameter 'pattern' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitAuthorEmailPatternArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitAuthorEmailPatternArgs.java new file mode 100644 index 00000000..635f445a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitAuthorEmailPatternArgs.java @@ -0,0 +1,197 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetRulesCommitAuthorEmailPatternArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetRulesCommitAuthorEmailPatternArgs Empty = new RepositoryRulesetRulesCommitAuthorEmailPatternArgs(); + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (Boolean) If true, the rule will fail if the pattern matches. + * + */ + @Import(name="negate") + private @Nullable Output negate; + + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional> negate() { + return Optional.ofNullable(this.negate); + } + + /** + * (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + @Import(name="operator", required=true) + private Output operator; + + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public Output operator() { + return this.operator; + } + + /** + * (String) The pattern to match with. + * + */ + @Import(name="pattern", required=true) + private Output pattern; + + /** + * @return (String) The pattern to match with. + * + */ + public Output pattern() { + return this.pattern; + } + + private RepositoryRulesetRulesCommitAuthorEmailPatternArgs() {} + + private RepositoryRulesetRulesCommitAuthorEmailPatternArgs(RepositoryRulesetRulesCommitAuthorEmailPatternArgs $) { + this.name = $.name; + this.negate = $.negate; + this.operator = $.operator; + this.pattern = $.pattern; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetRulesCommitAuthorEmailPatternArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetRulesCommitAuthorEmailPatternArgs $; + + public Builder() { + $ = new RepositoryRulesetRulesCommitAuthorEmailPatternArgs(); + } + + public Builder(RepositoryRulesetRulesCommitAuthorEmailPatternArgs defaults) { + $ = new RepositoryRulesetRulesCommitAuthorEmailPatternArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(@Nullable Output negate) { + $.negate = negate; + return this; + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(Boolean negate) { + return negate(Output.of(negate)); + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(Output operator) { + $.operator = operator; + return this; + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(String operator) { + return operator(Output.of(operator)); + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(Output pattern) { + $.pattern = pattern; + return this; + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(String pattern) { + return pattern(Output.of(pattern)); + } + + public RepositoryRulesetRulesCommitAuthorEmailPatternArgs build() { + $.operator = Objects.requireNonNull($.operator, "expected parameter 'operator' to be non-null"); + $.pattern = Objects.requireNonNull($.pattern, "expected parameter 'pattern' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitMessagePatternArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitMessagePatternArgs.java new file mode 100644 index 00000000..8d0c773f --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitMessagePatternArgs.java @@ -0,0 +1,197 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetRulesCommitMessagePatternArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetRulesCommitMessagePatternArgs Empty = new RepositoryRulesetRulesCommitMessagePatternArgs(); + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (Boolean) If true, the rule will fail if the pattern matches. + * + */ + @Import(name="negate") + private @Nullable Output negate; + + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional> negate() { + return Optional.ofNullable(this.negate); + } + + /** + * (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + @Import(name="operator", required=true) + private Output operator; + + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public Output operator() { + return this.operator; + } + + /** + * (String) The pattern to match with. + * + */ + @Import(name="pattern", required=true) + private Output pattern; + + /** + * @return (String) The pattern to match with. + * + */ + public Output pattern() { + return this.pattern; + } + + private RepositoryRulesetRulesCommitMessagePatternArgs() {} + + private RepositoryRulesetRulesCommitMessagePatternArgs(RepositoryRulesetRulesCommitMessagePatternArgs $) { + this.name = $.name; + this.negate = $.negate; + this.operator = $.operator; + this.pattern = $.pattern; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetRulesCommitMessagePatternArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetRulesCommitMessagePatternArgs $; + + public Builder() { + $ = new RepositoryRulesetRulesCommitMessagePatternArgs(); + } + + public Builder(RepositoryRulesetRulesCommitMessagePatternArgs defaults) { + $ = new RepositoryRulesetRulesCommitMessagePatternArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(@Nullable Output negate) { + $.negate = negate; + return this; + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(Boolean negate) { + return negate(Output.of(negate)); + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(Output operator) { + $.operator = operator; + return this; + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(String operator) { + return operator(Output.of(operator)); + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(Output pattern) { + $.pattern = pattern; + return this; + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(String pattern) { + return pattern(Output.of(pattern)); + } + + public RepositoryRulesetRulesCommitMessagePatternArgs build() { + $.operator = Objects.requireNonNull($.operator, "expected parameter 'operator' to be non-null"); + $.pattern = Objects.requireNonNull($.pattern, "expected parameter 'pattern' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitterEmailPatternArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitterEmailPatternArgs.java new file mode 100644 index 00000000..6edf2b49 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesCommitterEmailPatternArgs.java @@ -0,0 +1,197 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetRulesCommitterEmailPatternArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetRulesCommitterEmailPatternArgs Empty = new RepositoryRulesetRulesCommitterEmailPatternArgs(); + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (Boolean) If true, the rule will fail if the pattern matches. + * + */ + @Import(name="negate") + private @Nullable Output negate; + + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional> negate() { + return Optional.ofNullable(this.negate); + } + + /** + * (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + @Import(name="operator", required=true) + private Output operator; + + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public Output operator() { + return this.operator; + } + + /** + * (String) The pattern to match with. + * + */ + @Import(name="pattern", required=true) + private Output pattern; + + /** + * @return (String) The pattern to match with. + * + */ + public Output pattern() { + return this.pattern; + } + + private RepositoryRulesetRulesCommitterEmailPatternArgs() {} + + private RepositoryRulesetRulesCommitterEmailPatternArgs(RepositoryRulesetRulesCommitterEmailPatternArgs $) { + this.name = $.name; + this.negate = $.negate; + this.operator = $.operator; + this.pattern = $.pattern; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetRulesCommitterEmailPatternArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetRulesCommitterEmailPatternArgs $; + + public Builder() { + $ = new RepositoryRulesetRulesCommitterEmailPatternArgs(); + } + + public Builder(RepositoryRulesetRulesCommitterEmailPatternArgs defaults) { + $ = new RepositoryRulesetRulesCommitterEmailPatternArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(@Nullable Output negate) { + $.negate = negate; + return this; + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(Boolean negate) { + return negate(Output.of(negate)); + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(Output operator) { + $.operator = operator; + return this; + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(String operator) { + return operator(Output.of(operator)); + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(Output pattern) { + $.pattern = pattern; + return this; + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(String pattern) { + return pattern(Output.of(pattern)); + } + + public RepositoryRulesetRulesCommitterEmailPatternArgs build() { + $.operator = Objects.requireNonNull($.operator, "expected parameter 'operator' to be non-null"); + $.pattern = Objects.requireNonNull($.pattern, "expected parameter 'pattern' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesPullRequestArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesPullRequestArgs.java new file mode 100644 index 00000000..50b35102 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesPullRequestArgs.java @@ -0,0 +1,232 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.Integer; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetRulesPullRequestArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetRulesPullRequestArgs Empty = new RepositoryRulesetRulesPullRequestArgs(); + + /** + * (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + */ + @Import(name="dismissStaleReviewsOnPush") + private @Nullable Output dismissStaleReviewsOnPush; + + /** + * @return (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + */ + public Optional> dismissStaleReviewsOnPush() { + return Optional.ofNullable(this.dismissStaleReviewsOnPush); + } + + /** + * (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + */ + @Import(name="requireCodeOwnerReview") + private @Nullable Output requireCodeOwnerReview; + + /** + * @return (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + */ + public Optional> requireCodeOwnerReview() { + return Optional.ofNullable(this.requireCodeOwnerReview); + } + + /** + * (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + */ + @Import(name="requireLastPushApproval") + private @Nullable Output requireLastPushApproval; + + /** + * @return (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + */ + public Optional> requireLastPushApproval() { + return Optional.ofNullable(this.requireLastPushApproval); + } + + /** + * (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + */ + @Import(name="requiredApprovingReviewCount") + private @Nullable Output requiredApprovingReviewCount; + + /** + * @return (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + */ + public Optional> requiredApprovingReviewCount() { + return Optional.ofNullable(this.requiredApprovingReviewCount); + } + + /** + * (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + */ + @Import(name="requiredReviewThreadResolution") + private @Nullable Output requiredReviewThreadResolution; + + /** + * @return (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + */ + public Optional> requiredReviewThreadResolution() { + return Optional.ofNullable(this.requiredReviewThreadResolution); + } + + private RepositoryRulesetRulesPullRequestArgs() {} + + private RepositoryRulesetRulesPullRequestArgs(RepositoryRulesetRulesPullRequestArgs $) { + this.dismissStaleReviewsOnPush = $.dismissStaleReviewsOnPush; + this.requireCodeOwnerReview = $.requireCodeOwnerReview; + this.requireLastPushApproval = $.requireLastPushApproval; + this.requiredApprovingReviewCount = $.requiredApprovingReviewCount; + this.requiredReviewThreadResolution = $.requiredReviewThreadResolution; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetRulesPullRequestArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetRulesPullRequestArgs $; + + public Builder() { + $ = new RepositoryRulesetRulesPullRequestArgs(); + } + + public Builder(RepositoryRulesetRulesPullRequestArgs defaults) { + $ = new RepositoryRulesetRulesPullRequestArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param dismissStaleReviewsOnPush (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + * @return builder + * + */ + public Builder dismissStaleReviewsOnPush(@Nullable Output dismissStaleReviewsOnPush) { + $.dismissStaleReviewsOnPush = dismissStaleReviewsOnPush; + return this; + } + + /** + * @param dismissStaleReviewsOnPush (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + * @return builder + * + */ + public Builder dismissStaleReviewsOnPush(Boolean dismissStaleReviewsOnPush) { + return dismissStaleReviewsOnPush(Output.of(dismissStaleReviewsOnPush)); + } + + /** + * @param requireCodeOwnerReview (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + * @return builder + * + */ + public Builder requireCodeOwnerReview(@Nullable Output requireCodeOwnerReview) { + $.requireCodeOwnerReview = requireCodeOwnerReview; + return this; + } + + /** + * @param requireCodeOwnerReview (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + * @return builder + * + */ + public Builder requireCodeOwnerReview(Boolean requireCodeOwnerReview) { + return requireCodeOwnerReview(Output.of(requireCodeOwnerReview)); + } + + /** + * @param requireLastPushApproval (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + * @return builder + * + */ + public Builder requireLastPushApproval(@Nullable Output requireLastPushApproval) { + $.requireLastPushApproval = requireLastPushApproval; + return this; + } + + /** + * @param requireLastPushApproval (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + * @return builder + * + */ + public Builder requireLastPushApproval(Boolean requireLastPushApproval) { + return requireLastPushApproval(Output.of(requireLastPushApproval)); + } + + /** + * @param requiredApprovingReviewCount (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + * @return builder + * + */ + public Builder requiredApprovingReviewCount(@Nullable Output requiredApprovingReviewCount) { + $.requiredApprovingReviewCount = requiredApprovingReviewCount; + return this; + } + + /** + * @param requiredApprovingReviewCount (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + * @return builder + * + */ + public Builder requiredApprovingReviewCount(Integer requiredApprovingReviewCount) { + return requiredApprovingReviewCount(Output.of(requiredApprovingReviewCount)); + } + + /** + * @param requiredReviewThreadResolution (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + * @return builder + * + */ + public Builder requiredReviewThreadResolution(@Nullable Output requiredReviewThreadResolution) { + $.requiredReviewThreadResolution = requiredReviewThreadResolution; + return this; + } + + /** + * @param requiredReviewThreadResolution (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + * @return builder + * + */ + public Builder requiredReviewThreadResolution(Boolean requiredReviewThreadResolution) { + return requiredReviewThreadResolution(Output.of(requiredReviewThreadResolution)); + } + + public RepositoryRulesetRulesPullRequestArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredDeploymentsArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredDeploymentsArgs.java new file mode 100644 index 00000000..3eb2c6a3 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredDeploymentsArgs.java @@ -0,0 +1,93 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.List; +import java.util.Objects; + + +public final class RepositoryRulesetRulesRequiredDeploymentsArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetRulesRequiredDeploymentsArgs Empty = new RepositoryRulesetRulesRequiredDeploymentsArgs(); + + /** + * (List of String) The environments that must be successfully deployed to before branches can be merged. + * + */ + @Import(name="requiredDeploymentEnvironments", required=true) + private Output> requiredDeploymentEnvironments; + + /** + * @return (List of String) The environments that must be successfully deployed to before branches can be merged. + * + */ + public Output> requiredDeploymentEnvironments() { + return this.requiredDeploymentEnvironments; + } + + private RepositoryRulesetRulesRequiredDeploymentsArgs() {} + + private RepositoryRulesetRulesRequiredDeploymentsArgs(RepositoryRulesetRulesRequiredDeploymentsArgs $) { + this.requiredDeploymentEnvironments = $.requiredDeploymentEnvironments; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetRulesRequiredDeploymentsArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetRulesRequiredDeploymentsArgs $; + + public Builder() { + $ = new RepositoryRulesetRulesRequiredDeploymentsArgs(); + } + + public Builder(RepositoryRulesetRulesRequiredDeploymentsArgs defaults) { + $ = new RepositoryRulesetRulesRequiredDeploymentsArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param requiredDeploymentEnvironments (List of String) The environments that must be successfully deployed to before branches can be merged. + * + * @return builder + * + */ + public Builder requiredDeploymentEnvironments(Output> requiredDeploymentEnvironments) { + $.requiredDeploymentEnvironments = requiredDeploymentEnvironments; + return this; + } + + /** + * @param requiredDeploymentEnvironments (List of String) The environments that must be successfully deployed to before branches can be merged. + * + * @return builder + * + */ + public Builder requiredDeploymentEnvironments(List requiredDeploymentEnvironments) { + return requiredDeploymentEnvironments(Output.of(requiredDeploymentEnvironments)); + } + + /** + * @param requiredDeploymentEnvironments (List of String) The environments that must be successfully deployed to before branches can be merged. + * + * @return builder + * + */ + public Builder requiredDeploymentEnvironments(String... requiredDeploymentEnvironments) { + return requiredDeploymentEnvironments(List.of(requiredDeploymentEnvironments)); + } + + public RepositoryRulesetRulesRequiredDeploymentsArgs build() { + $.requiredDeploymentEnvironments = Objects.requireNonNull($.requiredDeploymentEnvironments, "expected parameter 'requiredDeploymentEnvironments' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.java new file mode 100644 index 00000000..5083630f --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksArgs.java @@ -0,0 +1,133 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.github.inputs.RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs; +import java.lang.Boolean; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetRulesRequiredStatusChecksArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetRulesRequiredStatusChecksArgs Empty = new RepositoryRulesetRulesRequiredStatusChecksArgs(); + + /** + * (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + */ + @Import(name="requiredChecks", required=true) + private Output> requiredChecks; + + /** + * @return (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + */ + public Output> requiredChecks() { + return this.requiredChecks; + } + + /** + * (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + */ + @Import(name="strictRequiredStatusChecksPolicy") + private @Nullable Output strictRequiredStatusChecksPolicy; + + /** + * @return (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + */ + public Optional> strictRequiredStatusChecksPolicy() { + return Optional.ofNullable(this.strictRequiredStatusChecksPolicy); + } + + private RepositoryRulesetRulesRequiredStatusChecksArgs() {} + + private RepositoryRulesetRulesRequiredStatusChecksArgs(RepositoryRulesetRulesRequiredStatusChecksArgs $) { + this.requiredChecks = $.requiredChecks; + this.strictRequiredStatusChecksPolicy = $.strictRequiredStatusChecksPolicy; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetRulesRequiredStatusChecksArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetRulesRequiredStatusChecksArgs $; + + public Builder() { + $ = new RepositoryRulesetRulesRequiredStatusChecksArgs(); + } + + public Builder(RepositoryRulesetRulesRequiredStatusChecksArgs defaults) { + $ = new RepositoryRulesetRulesRequiredStatusChecksArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param requiredChecks (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredChecks(Output> requiredChecks) { + $.requiredChecks = requiredChecks; + return this; + } + + /** + * @param requiredChecks (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredChecks(List requiredChecks) { + return requiredChecks(Output.of(requiredChecks)); + } + + /** + * @param requiredChecks (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + * @return builder + * + */ + public Builder requiredChecks(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs... requiredChecks) { + return requiredChecks(List.of(requiredChecks)); + } + + /** + * @param strictRequiredStatusChecksPolicy (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + * @return builder + * + */ + public Builder strictRequiredStatusChecksPolicy(@Nullable Output strictRequiredStatusChecksPolicy) { + $.strictRequiredStatusChecksPolicy = strictRequiredStatusChecksPolicy; + return this; + } + + /** + * @param strictRequiredStatusChecksPolicy (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + * @return builder + * + */ + public Builder strictRequiredStatusChecksPolicy(Boolean strictRequiredStatusChecksPolicy) { + return strictRequiredStatusChecksPolicy(Output.of(strictRequiredStatusChecksPolicy)); + } + + public RepositoryRulesetRulesRequiredStatusChecksArgs build() { + $.requiredChecks = Objects.requireNonNull($.requiredChecks, "expected parameter 'requiredChecks' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs.java new file mode 100644 index 00000000..08fecde3 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs.java @@ -0,0 +1,122 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs Empty = new RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs(); + + /** + * (String) The status check context name that must be present on the commit. + * + */ + @Import(name="context", required=true) + private Output context; + + /** + * @return (String) The status check context name that must be present on the commit. + * + */ + public Output context() { + return this.context; + } + + /** + * (Number) The optional integration ID that this status check must originate from. + * + */ + @Import(name="integrationId") + private @Nullable Output integrationId; + + /** + * @return (Number) The optional integration ID that this status check must originate from. + * + */ + public Optional> integrationId() { + return Optional.ofNullable(this.integrationId); + } + + private RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs() {} + + private RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs $) { + this.context = $.context; + this.integrationId = $.integrationId; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs $; + + public Builder() { + $ = new RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs(); + } + + public Builder(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs defaults) { + $ = new RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param context (String) The status check context name that must be present on the commit. + * + * @return builder + * + */ + public Builder context(Output context) { + $.context = context; + return this; + } + + /** + * @param context (String) The status check context name that must be present on the commit. + * + * @return builder + * + */ + public Builder context(String context) { + return context(Output.of(context)); + } + + /** + * @param integrationId (Number) The optional integration ID that this status check must originate from. + * + * @return builder + * + */ + public Builder integrationId(@Nullable Output integrationId) { + $.integrationId = integrationId; + return this; + } + + /** + * @param integrationId (Number) The optional integration ID that this status check must originate from. + * + * @return builder + * + */ + public Builder integrationId(Integer integrationId) { + return integrationId(Output.of(integrationId)); + } + + public RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs build() { + $.context = Objects.requireNonNull($.context, "expected parameter 'context' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesTagNamePatternArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesTagNamePatternArgs.java new file mode 100644 index 00000000..dd51a744 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetRulesTagNamePatternArgs.java @@ -0,0 +1,197 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetRulesTagNamePatternArgs extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetRulesTagNamePatternArgs Empty = new RepositoryRulesetRulesTagNamePatternArgs(); + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (Boolean) If true, the rule will fail if the pattern matches. + * + */ + @Import(name="negate") + private @Nullable Output negate; + + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional> negate() { + return Optional.ofNullable(this.negate); + } + + /** + * (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + @Import(name="operator", required=true) + private Output operator; + + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public Output operator() { + return this.operator; + } + + /** + * (String) The pattern to match with. + * + */ + @Import(name="pattern", required=true) + private Output pattern; + + /** + * @return (String) The pattern to match with. + * + */ + public Output pattern() { + return this.pattern; + } + + private RepositoryRulesetRulesTagNamePatternArgs() {} + + private RepositoryRulesetRulesTagNamePatternArgs(RepositoryRulesetRulesTagNamePatternArgs $) { + this.name = $.name; + this.negate = $.negate; + this.operator = $.operator; + this.pattern = $.pattern; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetRulesTagNamePatternArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetRulesTagNamePatternArgs $; + + public Builder() { + $ = new RepositoryRulesetRulesTagNamePatternArgs(); + } + + public Builder(RepositoryRulesetRulesTagNamePatternArgs defaults) { + $ = new RepositoryRulesetRulesTagNamePatternArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(@Nullable Output negate) { + $.negate = negate; + return this; + } + + /** + * @param negate (Boolean) If true, the rule will fail if the pattern matches. + * + * @return builder + * + */ + public Builder negate(Boolean negate) { + return negate(Output.of(negate)); + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(Output operator) { + $.operator = operator; + return this; + } + + /** + * @param operator (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + * @return builder + * + */ + public Builder operator(String operator) { + return operator(Output.of(operator)); + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(Output pattern) { + $.pattern = pattern; + return this; + } + + /** + * @param pattern (String) The pattern to match with. + * + * @return builder + * + */ + public Builder pattern(String pattern) { + return pattern(Output.of(pattern)); + } + + public RepositoryRulesetRulesTagNamePatternArgs build() { + $.operator = Objects.requireNonNull($.operator, "expected parameter 'operator' to be non-null"); + $.pattern = Objects.requireNonNull($.pattern, "expected parameter 'pattern' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetState.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetState.java new file mode 100644 index 00000000..7e2ec9c8 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryRulesetState.java @@ -0,0 +1,431 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.github.inputs.RepositoryRulesetBypassActorArgs; +import com.pulumi.github.inputs.RepositoryRulesetConditionsArgs; +import com.pulumi.github.inputs.RepositoryRulesetRulesArgs; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryRulesetState extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryRulesetState Empty = new RepositoryRulesetState(); + + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + @Import(name="bypassActors") + private @Nullable Output> bypassActors; + + /** + * @return (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + */ + public Optional>> bypassActors() { + return Optional.ofNullable(this.bypassActors); + } + + /** + * (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + * + */ + @Import(name="conditions") + private @Nullable Output conditions; + + /** + * @return (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + * + */ + public Optional> conditions() { + return Optional.ofNullable(this.conditions); + } + + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + @Import(name="enforcement") + private @Nullable Output enforcement; + + /** + * @return (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + */ + public Optional> enforcement() { + return Optional.ofNullable(this.enforcement); + } + + /** + * (String) + * + */ + @Import(name="etag") + private @Nullable Output etag; + + /** + * @return (String) + * + */ + public Optional> etag() { + return Optional.ofNullable(this.etag); + } + + /** + * (String) The name of the ruleset. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return (String) The name of the ruleset. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * (String) GraphQL global node id for use with v4 API. + * + */ + @Import(name="nodeId") + private @Nullable Output nodeId; + + /** + * @return (String) GraphQL global node id for use with v4 API. + * + */ + public Optional> nodeId() { + return Optional.ofNullable(this.nodeId); + } + + /** + * (String) Name of the repository to apply rulset to. + * + */ + @Import(name="repository") + private @Nullable Output repository; + + /** + * @return (String) Name of the repository to apply rulset to. + * + */ + public Optional> repository() { + return Optional.ofNullable(this.repository); + } + + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + @Import(name="rules") + private @Nullable Output rules; + + /** + * @return (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + */ + public Optional> rules() { + return Optional.ofNullable(this.rules); + } + + /** + * (Number) GitHub ID for the ruleset. + * + */ + @Import(name="rulesetId") + private @Nullable Output rulesetId; + + /** + * @return (Number) GitHub ID for the ruleset. + * + */ + public Optional> rulesetId() { + return Optional.ofNullable(this.rulesetId); + } + + /** + * (String) Possible values are `branch` and `tag`. + * + */ + @Import(name="target") + private @Nullable Output target; + + /** + * @return (String) Possible values are `branch` and `tag`. + * + */ + public Optional> target() { + return Optional.ofNullable(this.target); + } + + private RepositoryRulesetState() {} + + private RepositoryRulesetState(RepositoryRulesetState $) { + this.bypassActors = $.bypassActors; + this.conditions = $.conditions; + this.enforcement = $.enforcement; + this.etag = $.etag; + this.name = $.name; + this.nodeId = $.nodeId; + this.repository = $.repository; + this.rules = $.rules; + this.rulesetId = $.rulesetId; + this.target = $.target; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryRulesetState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryRulesetState $; + + public Builder() { + $ = new RepositoryRulesetState(); + } + + public Builder(RepositoryRulesetState defaults) { + $ = new RepositoryRulesetState(Objects.requireNonNull(defaults)); + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(@Nullable Output> bypassActors) { + $.bypassActors = bypassActors; + return this; + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(List bypassActors) { + return bypassActors(Output.of(bypassActors)); + } + + /** + * @param bypassActors (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder bypassActors(RepositoryRulesetBypassActorArgs... bypassActors) { + return bypassActors(List.of(bypassActors)); + } + + /** + * @param conditions (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + * + * @return builder + * + */ + public Builder conditions(@Nullable Output conditions) { + $.conditions = conditions; + return this; + } + + /** + * @param conditions (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + * + * @return builder + * + */ + public Builder conditions(RepositoryRulesetConditionsArgs conditions) { + return conditions(Output.of(conditions)); + } + + /** + * @param enforcement (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + * @return builder + * + */ + public Builder enforcement(@Nullable Output enforcement) { + $.enforcement = enforcement; + return this; + } + + /** + * @param enforcement (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + * + * @return builder + * + */ + public Builder enforcement(String enforcement) { + return enforcement(Output.of(enforcement)); + } + + /** + * @param etag (String) + * + * @return builder + * + */ + public Builder etag(@Nullable Output etag) { + $.etag = etag; + return this; + } + + /** + * @param etag (String) + * + * @return builder + * + */ + public Builder etag(String etag) { + return etag(Output.of(etag)); + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name (String) The name of the ruleset. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param nodeId (String) GraphQL global node id for use with v4 API. + * + * @return builder + * + */ + public Builder nodeId(@Nullable Output nodeId) { + $.nodeId = nodeId; + return this; + } + + /** + * @param nodeId (String) GraphQL global node id for use with v4 API. + * + * @return builder + * + */ + public Builder nodeId(String nodeId) { + return nodeId(Output.of(nodeId)); + } + + /** + * @param repository (String) Name of the repository to apply rulset to. + * + * @return builder + * + */ + public Builder repository(@Nullable Output repository) { + $.repository = repository; + return this; + } + + /** + * @param repository (String) Name of the repository to apply rulset to. + * + * @return builder + * + */ + public Builder repository(String repository) { + return repository(Output.of(repository)); + } + + /** + * @param rules (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder rules(@Nullable Output rules) { + $.rules = rules; + return this; + } + + /** + * @param rules (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + * + * @return builder + * + */ + public Builder rules(RepositoryRulesetRulesArgs rules) { + return rules(Output.of(rules)); + } + + /** + * @param rulesetId (Number) GitHub ID for the ruleset. + * + * @return builder + * + */ + public Builder rulesetId(@Nullable Output rulesetId) { + $.rulesetId = rulesetId; + return this; + } + + /** + * @param rulesetId (Number) GitHub ID for the ruleset. + * + * @return builder + * + */ + public Builder rulesetId(Integer rulesetId) { + return rulesetId(Output.of(rulesetId)); + } + + /** + * @param target (String) Possible values are `branch` and `tag`. + * + * @return builder + * + */ + public Builder target(@Nullable Output target) { + $.target = target; + return this; + } + + /** + * @param target (String) Possible values are `branch` and `tag`. + * + * @return builder + * + */ + public Builder target(String target) { + return target(Output.of(target)); + } + + public RepositoryRulesetState build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryTopicsState.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryTopicsState.java new file mode 100644 index 00000000..cb8aca17 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryTopicsState.java @@ -0,0 +1,131 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RepositoryTopicsState extends com.pulumi.resources.ResourceArgs { + + public static final RepositoryTopicsState Empty = new RepositoryTopicsState(); + + /** + * The repository name. + * + */ + @Import(name="repository") + private @Nullable Output repository; + + /** + * @return The repository name. + * + */ + public Optional> repository() { + return Optional.ofNullable(this.repository); + } + + /** + * A list of topics to add to the repository. + * + */ + @Import(name="topics") + private @Nullable Output> topics; + + /** + * @return A list of topics to add to the repository. + * + */ + public Optional>> topics() { + return Optional.ofNullable(this.topics); + } + + private RepositoryTopicsState() {} + + private RepositoryTopicsState(RepositoryTopicsState $) { + this.repository = $.repository; + this.topics = $.topics; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RepositoryTopicsState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RepositoryTopicsState $; + + public Builder() { + $ = new RepositoryTopicsState(); + } + + public Builder(RepositoryTopicsState defaults) { + $ = new RepositoryTopicsState(Objects.requireNonNull(defaults)); + } + + /** + * @param repository The repository name. + * + * @return builder + * + */ + public Builder repository(@Nullable Output repository) { + $.repository = repository; + return this; + } + + /** + * @param repository The repository name. + * + * @return builder + * + */ + public Builder repository(String repository) { + return repository(Output.of(repository)); + } + + /** + * @param topics A list of topics to add to the repository. + * + * @return builder + * + */ + public Builder topics(@Nullable Output> topics) { + $.topics = topics; + return this; + } + + /** + * @param topics A list of topics to add to the repository. + * + * @return builder + * + */ + public Builder topics(List topics) { + return topics(Output.of(topics)); + } + + /** + * @param topics A list of topics to add to the repository. + * + * @return builder + * + */ + public Builder topics(String... topics) { + return topics(List.of(topics)); + } + + public RepositoryTopicsState build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetBypassActor.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetBypassActor.java new file mode 100644 index 00000000..37e4df5c --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetBypassActor.java @@ -0,0 +1,97 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetBypassActor { + /** + * @return (Number) The ID of the actor that can bypass a ruleset + * + */ + private Integer actorId; + /** + * @return The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + */ + private String actorType; + /** + * @return (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + */ + private @Nullable String bypassMode; + + private OrganizationRulesetBypassActor() {} + /** + * @return (Number) The ID of the actor that can bypass a ruleset + * + */ + public Integer actorId() { + return this.actorId; + } + /** + * @return The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + */ + public String actorType() { + return this.actorType; + } + /** + * @return (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + */ + public Optional bypassMode() { + return Optional.ofNullable(this.bypassMode); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetBypassActor defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private Integer actorId; + private String actorType; + private @Nullable String bypassMode; + public Builder() {} + public Builder(OrganizationRulesetBypassActor defaults) { + Objects.requireNonNull(defaults); + this.actorId = defaults.actorId; + this.actorType = defaults.actorType; + this.bypassMode = defaults.bypassMode; + } + + @CustomType.Setter + public Builder actorId(Integer actorId) { + this.actorId = Objects.requireNonNull(actorId); + return this; + } + @CustomType.Setter + public Builder actorType(String actorType) { + this.actorType = Objects.requireNonNull(actorType); + return this; + } + @CustomType.Setter + public Builder bypassMode(@Nullable String bypassMode) { + this.bypassMode = bypassMode; + return this; + } + public OrganizationRulesetBypassActor build() { + final var o = new OrganizationRulesetBypassActor(); + o.actorId = actorId; + o.actorType = actorType; + o.bypassMode = bypassMode; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditions.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditions.java new file mode 100644 index 00000000..1ad00050 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditions.java @@ -0,0 +1,102 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.github.outputs.OrganizationRulesetConditionsRefName; +import com.pulumi.github.outputs.OrganizationRulesetConditionsRepositoryName; +import java.lang.Integer; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetConditions { + /** + * @return (Block List, Min: 1, Max: 1) (see below for nested schema) + * + */ + private OrganizationRulesetConditionsRefName refName; + /** + * @return The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + * + */ + private @Nullable Integer repositoryId; + /** + * @return Conflicts with `repository_id`. (see below for nested schema) + * + * One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + * + */ + private @Nullable OrganizationRulesetConditionsRepositoryName repositoryName; + + private OrganizationRulesetConditions() {} + /** + * @return (Block List, Min: 1, Max: 1) (see below for nested schema) + * + */ + public OrganizationRulesetConditionsRefName refName() { + return this.refName; + } + /** + * @return The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + * + */ + public Optional repositoryId() { + return Optional.ofNullable(this.repositoryId); + } + /** + * @return Conflicts with `repository_id`. (see below for nested schema) + * + * One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + * + */ + public Optional repositoryName() { + return Optional.ofNullable(this.repositoryName); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetConditions defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private OrganizationRulesetConditionsRefName refName; + private @Nullable Integer repositoryId; + private @Nullable OrganizationRulesetConditionsRepositoryName repositoryName; + public Builder() {} + public Builder(OrganizationRulesetConditions defaults) { + Objects.requireNonNull(defaults); + this.refName = defaults.refName; + this.repositoryId = defaults.repositoryId; + this.repositoryName = defaults.repositoryName; + } + + @CustomType.Setter + public Builder refName(OrganizationRulesetConditionsRefName refName) { + this.refName = Objects.requireNonNull(refName); + return this; + } + @CustomType.Setter + public Builder repositoryId(@Nullable Integer repositoryId) { + this.repositoryId = repositoryId; + return this; + } + @CustomType.Setter + public Builder repositoryName(@Nullable OrganizationRulesetConditionsRepositoryName repositoryName) { + this.repositoryName = repositoryName; + return this; + } + public OrganizationRulesetConditions build() { + final var o = new OrganizationRulesetConditions(); + o.refName = refName; + o.repositoryId = repositoryId; + o.repositoryName = repositoryName; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditionsRefName.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditionsRefName.java new file mode 100644 index 00000000..d5bd9f0a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditionsRefName.java @@ -0,0 +1,81 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class OrganizationRulesetConditionsRefName { + /** + * @return (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + private List excludes; + /** + * @return (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + */ + private List includes; + + private OrganizationRulesetConditionsRefName() {} + /** + * @return (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + public List excludes() { + return this.excludes; + } + /** + * @return (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + */ + public List includes() { + return this.includes; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetConditionsRefName defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private List excludes; + private List includes; + public Builder() {} + public Builder(OrganizationRulesetConditionsRefName defaults) { + Objects.requireNonNull(defaults); + this.excludes = defaults.excludes; + this.includes = defaults.includes; + } + + @CustomType.Setter + public Builder excludes(List excludes) { + this.excludes = Objects.requireNonNull(excludes); + return this; + } + public Builder excludes(String... excludes) { + return excludes(List.of(excludes)); + } + @CustomType.Setter + public Builder includes(List includes) { + this.includes = Objects.requireNonNull(includes); + return this; + } + public Builder includes(String... includes) { + return includes(List.of(includes)); + } + public OrganizationRulesetConditionsRefName build() { + final var o = new OrganizationRulesetConditionsRefName(); + o.excludes = excludes; + o.includes = includes; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditionsRepositoryName.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditionsRepositoryName.java new file mode 100644 index 00000000..68579cf3 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetConditionsRepositoryName.java @@ -0,0 +1,96 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetConditionsRepositoryName { + /** + * @return (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + private List excludes; + /** + * @return (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + * + */ + private List inlcudes; + private @Nullable Boolean protected_; + + private OrganizationRulesetConditionsRepositoryName() {} + /** + * @return (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + public List excludes() { + return this.excludes; + } + /** + * @return (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + * + */ + public List inlcudes() { + return this.inlcudes; + } + public Optional protected_() { + return Optional.ofNullable(this.protected_); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetConditionsRepositoryName defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private List excludes; + private List inlcudes; + private @Nullable Boolean protected_; + public Builder() {} + public Builder(OrganizationRulesetConditionsRepositoryName defaults) { + Objects.requireNonNull(defaults); + this.excludes = defaults.excludes; + this.inlcudes = defaults.inlcudes; + this.protected_ = defaults.protected_; + } + + @CustomType.Setter + public Builder excludes(List excludes) { + this.excludes = Objects.requireNonNull(excludes); + return this; + } + public Builder excludes(String... excludes) { + return excludes(List.of(excludes)); + } + @CustomType.Setter + public Builder inlcudes(List inlcudes) { + this.inlcudes = Objects.requireNonNull(inlcudes); + return this; + } + public Builder inlcudes(String... inlcudes) { + return inlcudes(List.of(inlcudes)); + } + @CustomType.Setter("protected") + public Builder protected_(@Nullable Boolean protected_) { + this.protected_ = protected_; + return this; + } + public OrganizationRulesetConditionsRepositoryName build() { + final var o = new OrganizationRulesetConditionsRepositoryName(); + o.excludes = excludes; + o.inlcudes = inlcudes; + o.protected_ = protected_; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRules.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRules.java new file mode 100644 index 00000000..e60c2135 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRules.java @@ -0,0 +1,303 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.github.outputs.OrganizationRulesetRulesBranchNamePattern; +import com.pulumi.github.outputs.OrganizationRulesetRulesCommitAuthorEmailPattern; +import com.pulumi.github.outputs.OrganizationRulesetRulesCommitMessagePattern; +import com.pulumi.github.outputs.OrganizationRulesetRulesCommitterEmailPattern; +import com.pulumi.github.outputs.OrganizationRulesetRulesPullRequest; +import com.pulumi.github.outputs.OrganizationRulesetRulesRequiredStatusChecks; +import com.pulumi.github.outputs.OrganizationRulesetRulesTagNamePattern; +import java.lang.Boolean; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetRules { + /** + * @return (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + * + */ + private @Nullable OrganizationRulesetRulesBranchNamePattern branchNamePattern; + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + private @Nullable OrganizationRulesetRulesCommitAuthorEmailPattern commitAuthorEmailPattern; + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + private @Nullable OrganizationRulesetRulesCommitMessagePattern commitMessagePattern; + /** + * @return (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + private @Nullable OrganizationRulesetRulesCommitterEmailPattern committerEmailPattern; + /** + * @return (Boolean) Only allow users with bypass permission to create matching refs. + * + */ + private @Nullable Boolean creation; + /** + * @return (Boolean) Only allow users with bypass permissions to delete matching refs. + * + */ + private @Nullable Boolean deletion; + /** + * @return (Boolean) Prevent users with push access from force pushing to branches. + * + */ + private @Nullable Boolean nonFastForward; + /** + * @return (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + */ + private @Nullable OrganizationRulesetRulesPullRequest pullRequest; + /** + * @return (Boolean) Prevent merge commits from being pushed to matching branches. + * + */ + private @Nullable Boolean requiredLinearHistory; + /** + * @return (Boolean) Commits pushed to matching branches must have verified signatures. + * + */ + private @Nullable Boolean requiredSignatures; + /** + * @return (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + */ + private @Nullable OrganizationRulesetRulesRequiredStatusChecks requiredStatusChecks; + /** + * @return (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + * + */ + private @Nullable OrganizationRulesetRulesTagNamePattern tagNamePattern; + /** + * @return (Boolean) Only allow users with bypass permission to update matching refs. + * + */ + private @Nullable Boolean update; + + private OrganizationRulesetRules() {} + /** + * @return (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + * + */ + public Optional branchNamePattern() { + return Optional.ofNullable(this.branchNamePattern); + } + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional commitAuthorEmailPattern() { + return Optional.ofNullable(this.commitAuthorEmailPattern); + } + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional commitMessagePattern() { + return Optional.ofNullable(this.commitMessagePattern); + } + /** + * @return (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional committerEmailPattern() { + return Optional.ofNullable(this.committerEmailPattern); + } + /** + * @return (Boolean) Only allow users with bypass permission to create matching refs. + * + */ + public Optional creation() { + return Optional.ofNullable(this.creation); + } + /** + * @return (Boolean) Only allow users with bypass permissions to delete matching refs. + * + */ + public Optional deletion() { + return Optional.ofNullable(this.deletion); + } + /** + * @return (Boolean) Prevent users with push access from force pushing to branches. + * + */ + public Optional nonFastForward() { + return Optional.ofNullable(this.nonFastForward); + } + /** + * @return (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + */ + public Optional pullRequest() { + return Optional.ofNullable(this.pullRequest); + } + /** + * @return (Boolean) Prevent merge commits from being pushed to matching branches. + * + */ + public Optional requiredLinearHistory() { + return Optional.ofNullable(this.requiredLinearHistory); + } + /** + * @return (Boolean) Commits pushed to matching branches must have verified signatures. + * + */ + public Optional requiredSignatures() { + return Optional.ofNullable(this.requiredSignatures); + } + /** + * @return (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + */ + public Optional requiredStatusChecks() { + return Optional.ofNullable(this.requiredStatusChecks); + } + /** + * @return (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + * + */ + public Optional tagNamePattern() { + return Optional.ofNullable(this.tagNamePattern); + } + /** + * @return (Boolean) Only allow users with bypass permission to update matching refs. + * + */ + public Optional update() { + return Optional.ofNullable(this.update); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetRules defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable OrganizationRulesetRulesBranchNamePattern branchNamePattern; + private @Nullable OrganizationRulesetRulesCommitAuthorEmailPattern commitAuthorEmailPattern; + private @Nullable OrganizationRulesetRulesCommitMessagePattern commitMessagePattern; + private @Nullable OrganizationRulesetRulesCommitterEmailPattern committerEmailPattern; + private @Nullable Boolean creation; + private @Nullable Boolean deletion; + private @Nullable Boolean nonFastForward; + private @Nullable OrganizationRulesetRulesPullRequest pullRequest; + private @Nullable Boolean requiredLinearHistory; + private @Nullable Boolean requiredSignatures; + private @Nullable OrganizationRulesetRulesRequiredStatusChecks requiredStatusChecks; + private @Nullable OrganizationRulesetRulesTagNamePattern tagNamePattern; + private @Nullable Boolean update; + public Builder() {} + public Builder(OrganizationRulesetRules defaults) { + Objects.requireNonNull(defaults); + this.branchNamePattern = defaults.branchNamePattern; + this.commitAuthorEmailPattern = defaults.commitAuthorEmailPattern; + this.commitMessagePattern = defaults.commitMessagePattern; + this.committerEmailPattern = defaults.committerEmailPattern; + this.creation = defaults.creation; + this.deletion = defaults.deletion; + this.nonFastForward = defaults.nonFastForward; + this.pullRequest = defaults.pullRequest; + this.requiredLinearHistory = defaults.requiredLinearHistory; + this.requiredSignatures = defaults.requiredSignatures; + this.requiredStatusChecks = defaults.requiredStatusChecks; + this.tagNamePattern = defaults.tagNamePattern; + this.update = defaults.update; + } + + @CustomType.Setter + public Builder branchNamePattern(@Nullable OrganizationRulesetRulesBranchNamePattern branchNamePattern) { + this.branchNamePattern = branchNamePattern; + return this; + } + @CustomType.Setter + public Builder commitAuthorEmailPattern(@Nullable OrganizationRulesetRulesCommitAuthorEmailPattern commitAuthorEmailPattern) { + this.commitAuthorEmailPattern = commitAuthorEmailPattern; + return this; + } + @CustomType.Setter + public Builder commitMessagePattern(@Nullable OrganizationRulesetRulesCommitMessagePattern commitMessagePattern) { + this.commitMessagePattern = commitMessagePattern; + return this; + } + @CustomType.Setter + public Builder committerEmailPattern(@Nullable OrganizationRulesetRulesCommitterEmailPattern committerEmailPattern) { + this.committerEmailPattern = committerEmailPattern; + return this; + } + @CustomType.Setter + public Builder creation(@Nullable Boolean creation) { + this.creation = creation; + return this; + } + @CustomType.Setter + public Builder deletion(@Nullable Boolean deletion) { + this.deletion = deletion; + return this; + } + @CustomType.Setter + public Builder nonFastForward(@Nullable Boolean nonFastForward) { + this.nonFastForward = nonFastForward; + return this; + } + @CustomType.Setter + public Builder pullRequest(@Nullable OrganizationRulesetRulesPullRequest pullRequest) { + this.pullRequest = pullRequest; + return this; + } + @CustomType.Setter + public Builder requiredLinearHistory(@Nullable Boolean requiredLinearHistory) { + this.requiredLinearHistory = requiredLinearHistory; + return this; + } + @CustomType.Setter + public Builder requiredSignatures(@Nullable Boolean requiredSignatures) { + this.requiredSignatures = requiredSignatures; + return this; + } + @CustomType.Setter + public Builder requiredStatusChecks(@Nullable OrganizationRulesetRulesRequiredStatusChecks requiredStatusChecks) { + this.requiredStatusChecks = requiredStatusChecks; + return this; + } + @CustomType.Setter + public Builder tagNamePattern(@Nullable OrganizationRulesetRulesTagNamePattern tagNamePattern) { + this.tagNamePattern = tagNamePattern; + return this; + } + @CustomType.Setter + public Builder update(@Nullable Boolean update) { + this.update = update; + return this; + } + public OrganizationRulesetRules build() { + final var o = new OrganizationRulesetRules(); + o.branchNamePattern = branchNamePattern; + o.commitAuthorEmailPattern = commitAuthorEmailPattern; + o.commitMessagePattern = commitMessagePattern; + o.committerEmailPattern = committerEmailPattern; + o.creation = creation; + o.deletion = deletion; + o.nonFastForward = nonFastForward; + o.pullRequest = pullRequest; + o.requiredLinearHistory = requiredLinearHistory; + o.requiredSignatures = requiredSignatures; + o.requiredStatusChecks = requiredStatusChecks; + o.tagNamePattern = tagNamePattern; + o.update = update; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesBranchNamePattern.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesBranchNamePattern.java new file mode 100644 index 00000000..9b19d401 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesBranchNamePattern.java @@ -0,0 +1,117 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetRulesBranchNamePattern { + /** + * @return (String) The name of the ruleset. + * + */ + private @Nullable String name; + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + private @Nullable Boolean negate; + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + private String operator; + /** + * @return (String) The pattern to match with. + * + */ + private String pattern; + + private OrganizationRulesetRulesBranchNamePattern() {} + /** + * @return (String) The name of the ruleset. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional negate() { + return Optional.ofNullable(this.negate); + } + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public String operator() { + return this.operator; + } + /** + * @return (String) The pattern to match with. + * + */ + public String pattern() { + return this.pattern; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetRulesBranchNamePattern defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String name; + private @Nullable Boolean negate; + private String operator; + private String pattern; + public Builder() {} + public Builder(OrganizationRulesetRulesBranchNamePattern defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + this.negate = defaults.negate; + this.operator = defaults.operator; + this.pattern = defaults.pattern; + } + + @CustomType.Setter + public Builder name(@Nullable String name) { + this.name = name; + return this; + } + @CustomType.Setter + public Builder negate(@Nullable Boolean negate) { + this.negate = negate; + return this; + } + @CustomType.Setter + public Builder operator(String operator) { + this.operator = Objects.requireNonNull(operator); + return this; + } + @CustomType.Setter + public Builder pattern(String pattern) { + this.pattern = Objects.requireNonNull(pattern); + return this; + } + public OrganizationRulesetRulesBranchNamePattern build() { + final var o = new OrganizationRulesetRulesBranchNamePattern(); + o.name = name; + o.negate = negate; + o.operator = operator; + o.pattern = pattern; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitAuthorEmailPattern.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitAuthorEmailPattern.java new file mode 100644 index 00000000..06a5b75e --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitAuthorEmailPattern.java @@ -0,0 +1,117 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetRulesCommitAuthorEmailPattern { + /** + * @return (String) The name of the ruleset. + * + */ + private @Nullable String name; + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + private @Nullable Boolean negate; + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + private String operator; + /** + * @return (String) The pattern to match with. + * + */ + private String pattern; + + private OrganizationRulesetRulesCommitAuthorEmailPattern() {} + /** + * @return (String) The name of the ruleset. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional negate() { + return Optional.ofNullable(this.negate); + } + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public String operator() { + return this.operator; + } + /** + * @return (String) The pattern to match with. + * + */ + public String pattern() { + return this.pattern; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetRulesCommitAuthorEmailPattern defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String name; + private @Nullable Boolean negate; + private String operator; + private String pattern; + public Builder() {} + public Builder(OrganizationRulesetRulesCommitAuthorEmailPattern defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + this.negate = defaults.negate; + this.operator = defaults.operator; + this.pattern = defaults.pattern; + } + + @CustomType.Setter + public Builder name(@Nullable String name) { + this.name = name; + return this; + } + @CustomType.Setter + public Builder negate(@Nullable Boolean negate) { + this.negate = negate; + return this; + } + @CustomType.Setter + public Builder operator(String operator) { + this.operator = Objects.requireNonNull(operator); + return this; + } + @CustomType.Setter + public Builder pattern(String pattern) { + this.pattern = Objects.requireNonNull(pattern); + return this; + } + public OrganizationRulesetRulesCommitAuthorEmailPattern build() { + final var o = new OrganizationRulesetRulesCommitAuthorEmailPattern(); + o.name = name; + o.negate = negate; + o.operator = operator; + o.pattern = pattern; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitMessagePattern.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitMessagePattern.java new file mode 100644 index 00000000..0de16ae3 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitMessagePattern.java @@ -0,0 +1,117 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetRulesCommitMessagePattern { + /** + * @return (String) The name of the ruleset. + * + */ + private @Nullable String name; + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + private @Nullable Boolean negate; + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + private String operator; + /** + * @return (String) The pattern to match with. + * + */ + private String pattern; + + private OrganizationRulesetRulesCommitMessagePattern() {} + /** + * @return (String) The name of the ruleset. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional negate() { + return Optional.ofNullable(this.negate); + } + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public String operator() { + return this.operator; + } + /** + * @return (String) The pattern to match with. + * + */ + public String pattern() { + return this.pattern; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetRulesCommitMessagePattern defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String name; + private @Nullable Boolean negate; + private String operator; + private String pattern; + public Builder() {} + public Builder(OrganizationRulesetRulesCommitMessagePattern defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + this.negate = defaults.negate; + this.operator = defaults.operator; + this.pattern = defaults.pattern; + } + + @CustomType.Setter + public Builder name(@Nullable String name) { + this.name = name; + return this; + } + @CustomType.Setter + public Builder negate(@Nullable Boolean negate) { + this.negate = negate; + return this; + } + @CustomType.Setter + public Builder operator(String operator) { + this.operator = Objects.requireNonNull(operator); + return this; + } + @CustomType.Setter + public Builder pattern(String pattern) { + this.pattern = Objects.requireNonNull(pattern); + return this; + } + public OrganizationRulesetRulesCommitMessagePattern build() { + final var o = new OrganizationRulesetRulesCommitMessagePattern(); + o.name = name; + o.negate = negate; + o.operator = operator; + o.pattern = pattern; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitterEmailPattern.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitterEmailPattern.java new file mode 100644 index 00000000..297f878d --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesCommitterEmailPattern.java @@ -0,0 +1,117 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetRulesCommitterEmailPattern { + /** + * @return (String) The name of the ruleset. + * + */ + private @Nullable String name; + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + private @Nullable Boolean negate; + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + private String operator; + /** + * @return (String) The pattern to match with. + * + */ + private String pattern; + + private OrganizationRulesetRulesCommitterEmailPattern() {} + /** + * @return (String) The name of the ruleset. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional negate() { + return Optional.ofNullable(this.negate); + } + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public String operator() { + return this.operator; + } + /** + * @return (String) The pattern to match with. + * + */ + public String pattern() { + return this.pattern; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetRulesCommitterEmailPattern defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String name; + private @Nullable Boolean negate; + private String operator; + private String pattern; + public Builder() {} + public Builder(OrganizationRulesetRulesCommitterEmailPattern defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + this.negate = defaults.negate; + this.operator = defaults.operator; + this.pattern = defaults.pattern; + } + + @CustomType.Setter + public Builder name(@Nullable String name) { + this.name = name; + return this; + } + @CustomType.Setter + public Builder negate(@Nullable Boolean negate) { + this.negate = negate; + return this; + } + @CustomType.Setter + public Builder operator(String operator) { + this.operator = Objects.requireNonNull(operator); + return this; + } + @CustomType.Setter + public Builder pattern(String pattern) { + this.pattern = Objects.requireNonNull(pattern); + return this; + } + public OrganizationRulesetRulesCommitterEmailPattern build() { + final var o = new OrganizationRulesetRulesCommitterEmailPattern(); + o.name = name; + o.negate = negate; + o.operator = operator; + o.pattern = pattern; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesPullRequest.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesPullRequest.java new file mode 100644 index 00000000..ede2e0e8 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesPullRequest.java @@ -0,0 +1,137 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.Integer; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetRulesPullRequest { + /** + * @return (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + */ + private @Nullable Boolean dismissStaleReviewsOnPush; + /** + * @return (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + */ + private @Nullable Boolean requireCodeOwnerReview; + /** + * @return (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + */ + private @Nullable Boolean requireLastPushApproval; + /** + * @return (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + */ + private @Nullable Integer requiredApprovingReviewCount; + /** + * @return (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + */ + private @Nullable Boolean requiredReviewThreadResolution; + + private OrganizationRulesetRulesPullRequest() {} + /** + * @return (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + */ + public Optional dismissStaleReviewsOnPush() { + return Optional.ofNullable(this.dismissStaleReviewsOnPush); + } + /** + * @return (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + */ + public Optional requireCodeOwnerReview() { + return Optional.ofNullable(this.requireCodeOwnerReview); + } + /** + * @return (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + */ + public Optional requireLastPushApproval() { + return Optional.ofNullable(this.requireLastPushApproval); + } + /** + * @return (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + */ + public Optional requiredApprovingReviewCount() { + return Optional.ofNullable(this.requiredApprovingReviewCount); + } + /** + * @return (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + */ + public Optional requiredReviewThreadResolution() { + return Optional.ofNullable(this.requiredReviewThreadResolution); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetRulesPullRequest defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable Boolean dismissStaleReviewsOnPush; + private @Nullable Boolean requireCodeOwnerReview; + private @Nullable Boolean requireLastPushApproval; + private @Nullable Integer requiredApprovingReviewCount; + private @Nullable Boolean requiredReviewThreadResolution; + public Builder() {} + public Builder(OrganizationRulesetRulesPullRequest defaults) { + Objects.requireNonNull(defaults); + this.dismissStaleReviewsOnPush = defaults.dismissStaleReviewsOnPush; + this.requireCodeOwnerReview = defaults.requireCodeOwnerReview; + this.requireLastPushApproval = defaults.requireLastPushApproval; + this.requiredApprovingReviewCount = defaults.requiredApprovingReviewCount; + this.requiredReviewThreadResolution = defaults.requiredReviewThreadResolution; + } + + @CustomType.Setter + public Builder dismissStaleReviewsOnPush(@Nullable Boolean dismissStaleReviewsOnPush) { + this.dismissStaleReviewsOnPush = dismissStaleReviewsOnPush; + return this; + } + @CustomType.Setter + public Builder requireCodeOwnerReview(@Nullable Boolean requireCodeOwnerReview) { + this.requireCodeOwnerReview = requireCodeOwnerReview; + return this; + } + @CustomType.Setter + public Builder requireLastPushApproval(@Nullable Boolean requireLastPushApproval) { + this.requireLastPushApproval = requireLastPushApproval; + return this; + } + @CustomType.Setter + public Builder requiredApprovingReviewCount(@Nullable Integer requiredApprovingReviewCount) { + this.requiredApprovingReviewCount = requiredApprovingReviewCount; + return this; + } + @CustomType.Setter + public Builder requiredReviewThreadResolution(@Nullable Boolean requiredReviewThreadResolution) { + this.requiredReviewThreadResolution = requiredReviewThreadResolution; + return this; + } + public OrganizationRulesetRulesPullRequest build() { + final var o = new OrganizationRulesetRulesPullRequest(); + o.dismissStaleReviewsOnPush = dismissStaleReviewsOnPush; + o.requireCodeOwnerReview = requireCodeOwnerReview; + o.requireLastPushApproval = requireLastPushApproval; + o.requiredApprovingReviewCount = requiredApprovingReviewCount; + o.requiredReviewThreadResolution = requiredReviewThreadResolution; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesRequiredStatusChecks.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesRequiredStatusChecks.java new file mode 100644 index 00000000..89a8884a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesRequiredStatusChecks.java @@ -0,0 +1,81 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.github.outputs.OrganizationRulesetRulesRequiredStatusChecksRequiredCheck; +import java.lang.Boolean; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetRulesRequiredStatusChecks { + /** + * @return (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + */ + private List requiredChecks; + /** + * @return (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + */ + private @Nullable Boolean strictRequiredStatusChecksPolicy; + + private OrganizationRulesetRulesRequiredStatusChecks() {} + /** + * @return (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + */ + public List requiredChecks() { + return this.requiredChecks; + } + /** + * @return (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + */ + public Optional strictRequiredStatusChecksPolicy() { + return Optional.ofNullable(this.strictRequiredStatusChecksPolicy); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetRulesRequiredStatusChecks defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private List requiredChecks; + private @Nullable Boolean strictRequiredStatusChecksPolicy; + public Builder() {} + public Builder(OrganizationRulesetRulesRequiredStatusChecks defaults) { + Objects.requireNonNull(defaults); + this.requiredChecks = defaults.requiredChecks; + this.strictRequiredStatusChecksPolicy = defaults.strictRequiredStatusChecksPolicy; + } + + @CustomType.Setter + public Builder requiredChecks(List requiredChecks) { + this.requiredChecks = Objects.requireNonNull(requiredChecks); + return this; + } + public Builder requiredChecks(OrganizationRulesetRulesRequiredStatusChecksRequiredCheck... requiredChecks) { + return requiredChecks(List.of(requiredChecks)); + } + @CustomType.Setter + public Builder strictRequiredStatusChecksPolicy(@Nullable Boolean strictRequiredStatusChecksPolicy) { + this.strictRequiredStatusChecksPolicy = strictRequiredStatusChecksPolicy; + return this; + } + public OrganizationRulesetRulesRequiredStatusChecks build() { + final var o = new OrganizationRulesetRulesRequiredStatusChecks(); + o.requiredChecks = requiredChecks; + o.strictRequiredStatusChecksPolicy = strictRequiredStatusChecksPolicy; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheck.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheck.java new file mode 100644 index 00000000..88ae4be2 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesRequiredStatusChecksRequiredCheck.java @@ -0,0 +1,77 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetRulesRequiredStatusChecksRequiredCheck { + /** + * @return (String) The status check context name that must be present on the commit. + * + */ + private String context; + /** + * @return (Number) The optional integration ID that this status check must originate from. + * + */ + private @Nullable Integer integrationId; + + private OrganizationRulesetRulesRequiredStatusChecksRequiredCheck() {} + /** + * @return (String) The status check context name that must be present on the commit. + * + */ + public String context() { + return this.context; + } + /** + * @return (Number) The optional integration ID that this status check must originate from. + * + */ + public Optional integrationId() { + return Optional.ofNullable(this.integrationId); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetRulesRequiredStatusChecksRequiredCheck defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String context; + private @Nullable Integer integrationId; + public Builder() {} + public Builder(OrganizationRulesetRulesRequiredStatusChecksRequiredCheck defaults) { + Objects.requireNonNull(defaults); + this.context = defaults.context; + this.integrationId = defaults.integrationId; + } + + @CustomType.Setter + public Builder context(String context) { + this.context = Objects.requireNonNull(context); + return this; + } + @CustomType.Setter + public Builder integrationId(@Nullable Integer integrationId) { + this.integrationId = integrationId; + return this; + } + public OrganizationRulesetRulesRequiredStatusChecksRequiredCheck build() { + final var o = new OrganizationRulesetRulesRequiredStatusChecksRequiredCheck(); + o.context = context; + o.integrationId = integrationId; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesTagNamePattern.java b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesTagNamePattern.java new file mode 100644 index 00000000..60df83c2 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/OrganizationRulesetRulesTagNamePattern.java @@ -0,0 +1,117 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class OrganizationRulesetRulesTagNamePattern { + /** + * @return (String) The name of the ruleset. + * + */ + private @Nullable String name; + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + private @Nullable Boolean negate; + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + private String operator; + /** + * @return (String) The pattern to match with. + * + */ + private String pattern; + + private OrganizationRulesetRulesTagNamePattern() {} + /** + * @return (String) The name of the ruleset. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional negate() { + return Optional.ofNullable(this.negate); + } + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public String operator() { + return this.operator; + } + /** + * @return (String) The pattern to match with. + * + */ + public String pattern() { + return this.pattern; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(OrganizationRulesetRulesTagNamePattern defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String name; + private @Nullable Boolean negate; + private String operator; + private String pattern; + public Builder() {} + public Builder(OrganizationRulesetRulesTagNamePattern defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + this.negate = defaults.negate; + this.operator = defaults.operator; + this.pattern = defaults.pattern; + } + + @CustomType.Setter + public Builder name(@Nullable String name) { + this.name = name; + return this; + } + @CustomType.Setter + public Builder negate(@Nullable Boolean negate) { + this.negate = negate; + return this; + } + @CustomType.Setter + public Builder operator(String operator) { + this.operator = Objects.requireNonNull(operator); + return this; + } + @CustomType.Setter + public Builder pattern(String pattern) { + this.pattern = Objects.requireNonNull(pattern); + return this; + } + public OrganizationRulesetRulesTagNamePattern build() { + final var o = new OrganizationRulesetRulesTagNamePattern(); + o.name = name; + o.negate = negate; + o.operator = operator; + o.pattern = pattern; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetBypassActor.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetBypassActor.java new file mode 100644 index 00000000..8b3ee47e --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetBypassActor.java @@ -0,0 +1,97 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class RepositoryRulesetBypassActor { + /** + * @return (Number) The ID of the actor that can bypass a ruleset + * + */ + private Integer actorId; + /** + * @return The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + */ + private String actorType; + /** + * @return (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + */ + private @Nullable String bypassMode; + + private RepositoryRulesetBypassActor() {} + /** + * @return (Number) The ID of the actor that can bypass a ruleset + * + */ + public Integer actorId() { + return this.actorId; + } + /** + * @return The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + * + */ + public String actorType() { + return this.actorType; + } + /** + * @return (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + * + */ + public Optional bypassMode() { + return Optional.ofNullable(this.bypassMode); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetBypassActor defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private Integer actorId; + private String actorType; + private @Nullable String bypassMode; + public Builder() {} + public Builder(RepositoryRulesetBypassActor defaults) { + Objects.requireNonNull(defaults); + this.actorId = defaults.actorId; + this.actorType = defaults.actorType; + this.bypassMode = defaults.bypassMode; + } + + @CustomType.Setter + public Builder actorId(Integer actorId) { + this.actorId = Objects.requireNonNull(actorId); + return this; + } + @CustomType.Setter + public Builder actorType(String actorType) { + this.actorType = Objects.requireNonNull(actorType); + return this; + } + @CustomType.Setter + public Builder bypassMode(@Nullable String bypassMode) { + this.bypassMode = bypassMode; + return this; + } + public RepositoryRulesetBypassActor build() { + final var o = new RepositoryRulesetBypassActor(); + o.actorId = actorId; + o.actorType = actorType; + o.bypassMode = bypassMode; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetConditions.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetConditions.java new file mode 100644 index 00000000..ba12b147 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetConditions.java @@ -0,0 +1,54 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.github.outputs.RepositoryRulesetConditionsRefName; +import java.util.Objects; + +@CustomType +public final class RepositoryRulesetConditions { + /** + * @return (Block List, Min: 1, Max: 1) (see below for nested schema) + * + */ + private RepositoryRulesetConditionsRefName refName; + + private RepositoryRulesetConditions() {} + /** + * @return (Block List, Min: 1, Max: 1) (see below for nested schema) + * + */ + public RepositoryRulesetConditionsRefName refName() { + return this.refName; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetConditions defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private RepositoryRulesetConditionsRefName refName; + public Builder() {} + public Builder(RepositoryRulesetConditions defaults) { + Objects.requireNonNull(defaults); + this.refName = defaults.refName; + } + + @CustomType.Setter + public Builder refName(RepositoryRulesetConditionsRefName refName) { + this.refName = Objects.requireNonNull(refName); + return this; + } + public RepositoryRulesetConditions build() { + final var o = new RepositoryRulesetConditions(); + o.refName = refName; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetConditionsRefName.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetConditionsRefName.java new file mode 100644 index 00000000..e6c7fdb4 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetConditionsRefName.java @@ -0,0 +1,81 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class RepositoryRulesetConditionsRefName { + /** + * @return (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + private List excludes; + /** + * @return (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + */ + private List includes; + + private RepositoryRulesetConditionsRefName() {} + /** + * @return (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + * + */ + public List excludes() { + return this.excludes; + } + /** + * @return (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + * + */ + public List includes() { + return this.includes; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetConditionsRefName defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private List excludes; + private List includes; + public Builder() {} + public Builder(RepositoryRulesetConditionsRefName defaults) { + Objects.requireNonNull(defaults); + this.excludes = defaults.excludes; + this.includes = defaults.includes; + } + + @CustomType.Setter + public Builder excludes(List excludes) { + this.excludes = Objects.requireNonNull(excludes); + return this; + } + public Builder excludes(String... excludes) { + return excludes(List.of(excludes)); + } + @CustomType.Setter + public Builder includes(List includes) { + this.includes = Objects.requireNonNull(includes); + return this; + } + public Builder includes(String... includes) { + return includes(List.of(includes)); + } + public RepositoryRulesetConditionsRefName build() { + final var o = new RepositoryRulesetConditionsRefName(); + o.excludes = excludes; + o.includes = includes; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRules.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRules.java new file mode 100644 index 00000000..a8ba5745 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRules.java @@ -0,0 +1,344 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.github.outputs.RepositoryRulesetRulesBranchNamePattern; +import com.pulumi.github.outputs.RepositoryRulesetRulesCommitAuthorEmailPattern; +import com.pulumi.github.outputs.RepositoryRulesetRulesCommitMessagePattern; +import com.pulumi.github.outputs.RepositoryRulesetRulesCommitterEmailPattern; +import com.pulumi.github.outputs.RepositoryRulesetRulesPullRequest; +import com.pulumi.github.outputs.RepositoryRulesetRulesRequiredDeployments; +import com.pulumi.github.outputs.RepositoryRulesetRulesRequiredStatusChecks; +import com.pulumi.github.outputs.RepositoryRulesetRulesTagNamePattern; +import java.lang.Boolean; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class RepositoryRulesetRules { + /** + * @return (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + * + */ + private @Nullable RepositoryRulesetRulesBranchNamePattern branchNamePattern; + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + private @Nullable RepositoryRulesetRulesCommitAuthorEmailPattern commitAuthorEmailPattern; + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + private @Nullable RepositoryRulesetRulesCommitMessagePattern commitMessagePattern; + /** + * @return (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + private @Nullable RepositoryRulesetRulesCommitterEmailPattern committerEmailPattern; + /** + * @return (Boolean) Only allow users with bypass permission to create matching refs. + * + */ + private @Nullable Boolean creation; + /** + * @return (Boolean) Only allow users with bypass permissions to delete matching refs. + * + */ + private @Nullable Boolean deletion; + /** + * @return (Boolean) Prevent users with push access from force pushing to branches. + * + */ + private @Nullable Boolean nonFastForward; + /** + * @return (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + */ + private @Nullable RepositoryRulesetRulesPullRequest pullRequest; + /** + * @return (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + * + */ + private @Nullable RepositoryRulesetRulesRequiredDeployments requiredDeployments; + /** + * @return (Boolean) Prevent merge commits from being pushed to matching branches. + * + */ + private @Nullable Boolean requiredLinearHistory; + /** + * @return (Boolean) Commits pushed to matching branches must have verified signatures. + * + */ + private @Nullable Boolean requiredSignatures; + /** + * @return (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + */ + private @Nullable RepositoryRulesetRulesRequiredStatusChecks requiredStatusChecks; + /** + * @return (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + * + */ + private @Nullable RepositoryRulesetRulesTagNamePattern tagNamePattern; + /** + * @return (Boolean) Only allow users with bypass permission to update matching refs. + * + */ + private @Nullable Boolean update; + /** + * @return (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + * + */ + private @Nullable Boolean updateAllowsFetchAndMerge; + + private RepositoryRulesetRules() {} + /** + * @return (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + * + */ + public Optional branchNamePattern() { + return Optional.ofNullable(this.branchNamePattern); + } + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional commitAuthorEmailPattern() { + return Optional.ofNullable(this.commitAuthorEmailPattern); + } + /** + * @return (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional commitMessagePattern() { + return Optional.ofNullable(this.commitMessagePattern); + } + /** + * @return (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + * + */ + public Optional committerEmailPattern() { + return Optional.ofNullable(this.committerEmailPattern); + } + /** + * @return (Boolean) Only allow users with bypass permission to create matching refs. + * + */ + public Optional creation() { + return Optional.ofNullable(this.creation); + } + /** + * @return (Boolean) Only allow users with bypass permissions to delete matching refs. + * + */ + public Optional deletion() { + return Optional.ofNullable(this.deletion); + } + /** + * @return (Boolean) Prevent users with push access from force pushing to branches. + * + */ + public Optional nonFastForward() { + return Optional.ofNullable(this.nonFastForward); + } + /** + * @return (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + * + */ + public Optional pullRequest() { + return Optional.ofNullable(this.pullRequest); + } + /** + * @return (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + * + */ + public Optional requiredDeployments() { + return Optional.ofNullable(this.requiredDeployments); + } + /** + * @return (Boolean) Prevent merge commits from being pushed to matching branches. + * + */ + public Optional requiredLinearHistory() { + return Optional.ofNullable(this.requiredLinearHistory); + } + /** + * @return (Boolean) Commits pushed to matching branches must have verified signatures. + * + */ + public Optional requiredSignatures() { + return Optional.ofNullable(this.requiredSignatures); + } + /** + * @return (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + * + */ + public Optional requiredStatusChecks() { + return Optional.ofNullable(this.requiredStatusChecks); + } + /** + * @return (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + * + */ + public Optional tagNamePattern() { + return Optional.ofNullable(this.tagNamePattern); + } + /** + * @return (Boolean) Only allow users with bypass permission to update matching refs. + * + */ + public Optional update() { + return Optional.ofNullable(this.update); + } + /** + * @return (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + * + */ + public Optional updateAllowsFetchAndMerge() { + return Optional.ofNullable(this.updateAllowsFetchAndMerge); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetRules defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable RepositoryRulesetRulesBranchNamePattern branchNamePattern; + private @Nullable RepositoryRulesetRulesCommitAuthorEmailPattern commitAuthorEmailPattern; + private @Nullable RepositoryRulesetRulesCommitMessagePattern commitMessagePattern; + private @Nullable RepositoryRulesetRulesCommitterEmailPattern committerEmailPattern; + private @Nullable Boolean creation; + private @Nullable Boolean deletion; + private @Nullable Boolean nonFastForward; + private @Nullable RepositoryRulesetRulesPullRequest pullRequest; + private @Nullable RepositoryRulesetRulesRequiredDeployments requiredDeployments; + private @Nullable Boolean requiredLinearHistory; + private @Nullable Boolean requiredSignatures; + private @Nullable RepositoryRulesetRulesRequiredStatusChecks requiredStatusChecks; + private @Nullable RepositoryRulesetRulesTagNamePattern tagNamePattern; + private @Nullable Boolean update; + private @Nullable Boolean updateAllowsFetchAndMerge; + public Builder() {} + public Builder(RepositoryRulesetRules defaults) { + Objects.requireNonNull(defaults); + this.branchNamePattern = defaults.branchNamePattern; + this.commitAuthorEmailPattern = defaults.commitAuthorEmailPattern; + this.commitMessagePattern = defaults.commitMessagePattern; + this.committerEmailPattern = defaults.committerEmailPattern; + this.creation = defaults.creation; + this.deletion = defaults.deletion; + this.nonFastForward = defaults.nonFastForward; + this.pullRequest = defaults.pullRequest; + this.requiredDeployments = defaults.requiredDeployments; + this.requiredLinearHistory = defaults.requiredLinearHistory; + this.requiredSignatures = defaults.requiredSignatures; + this.requiredStatusChecks = defaults.requiredStatusChecks; + this.tagNamePattern = defaults.tagNamePattern; + this.update = defaults.update; + this.updateAllowsFetchAndMerge = defaults.updateAllowsFetchAndMerge; + } + + @CustomType.Setter + public Builder branchNamePattern(@Nullable RepositoryRulesetRulesBranchNamePattern branchNamePattern) { + this.branchNamePattern = branchNamePattern; + return this; + } + @CustomType.Setter + public Builder commitAuthorEmailPattern(@Nullable RepositoryRulesetRulesCommitAuthorEmailPattern commitAuthorEmailPattern) { + this.commitAuthorEmailPattern = commitAuthorEmailPattern; + return this; + } + @CustomType.Setter + public Builder commitMessagePattern(@Nullable RepositoryRulesetRulesCommitMessagePattern commitMessagePattern) { + this.commitMessagePattern = commitMessagePattern; + return this; + } + @CustomType.Setter + public Builder committerEmailPattern(@Nullable RepositoryRulesetRulesCommitterEmailPattern committerEmailPattern) { + this.committerEmailPattern = committerEmailPattern; + return this; + } + @CustomType.Setter + public Builder creation(@Nullable Boolean creation) { + this.creation = creation; + return this; + } + @CustomType.Setter + public Builder deletion(@Nullable Boolean deletion) { + this.deletion = deletion; + return this; + } + @CustomType.Setter + public Builder nonFastForward(@Nullable Boolean nonFastForward) { + this.nonFastForward = nonFastForward; + return this; + } + @CustomType.Setter + public Builder pullRequest(@Nullable RepositoryRulesetRulesPullRequest pullRequest) { + this.pullRequest = pullRequest; + return this; + } + @CustomType.Setter + public Builder requiredDeployments(@Nullable RepositoryRulesetRulesRequiredDeployments requiredDeployments) { + this.requiredDeployments = requiredDeployments; + return this; + } + @CustomType.Setter + public Builder requiredLinearHistory(@Nullable Boolean requiredLinearHistory) { + this.requiredLinearHistory = requiredLinearHistory; + return this; + } + @CustomType.Setter + public Builder requiredSignatures(@Nullable Boolean requiredSignatures) { + this.requiredSignatures = requiredSignatures; + return this; + } + @CustomType.Setter + public Builder requiredStatusChecks(@Nullable RepositoryRulesetRulesRequiredStatusChecks requiredStatusChecks) { + this.requiredStatusChecks = requiredStatusChecks; + return this; + } + @CustomType.Setter + public Builder tagNamePattern(@Nullable RepositoryRulesetRulesTagNamePattern tagNamePattern) { + this.tagNamePattern = tagNamePattern; + return this; + } + @CustomType.Setter + public Builder update(@Nullable Boolean update) { + this.update = update; + return this; + } + @CustomType.Setter + public Builder updateAllowsFetchAndMerge(@Nullable Boolean updateAllowsFetchAndMerge) { + this.updateAllowsFetchAndMerge = updateAllowsFetchAndMerge; + return this; + } + public RepositoryRulesetRules build() { + final var o = new RepositoryRulesetRules(); + o.branchNamePattern = branchNamePattern; + o.commitAuthorEmailPattern = commitAuthorEmailPattern; + o.commitMessagePattern = commitMessagePattern; + o.committerEmailPattern = committerEmailPattern; + o.creation = creation; + o.deletion = deletion; + o.nonFastForward = nonFastForward; + o.pullRequest = pullRequest; + o.requiredDeployments = requiredDeployments; + o.requiredLinearHistory = requiredLinearHistory; + o.requiredSignatures = requiredSignatures; + o.requiredStatusChecks = requiredStatusChecks; + o.tagNamePattern = tagNamePattern; + o.update = update; + o.updateAllowsFetchAndMerge = updateAllowsFetchAndMerge; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesBranchNamePattern.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesBranchNamePattern.java new file mode 100644 index 00000000..5b033635 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesBranchNamePattern.java @@ -0,0 +1,117 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class RepositoryRulesetRulesBranchNamePattern { + /** + * @return (String) The name of the ruleset. + * + */ + private @Nullable String name; + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + private @Nullable Boolean negate; + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + private String operator; + /** + * @return (String) The pattern to match with. + * + */ + private String pattern; + + private RepositoryRulesetRulesBranchNamePattern() {} + /** + * @return (String) The name of the ruleset. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional negate() { + return Optional.ofNullable(this.negate); + } + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public String operator() { + return this.operator; + } + /** + * @return (String) The pattern to match with. + * + */ + public String pattern() { + return this.pattern; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetRulesBranchNamePattern defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String name; + private @Nullable Boolean negate; + private String operator; + private String pattern; + public Builder() {} + public Builder(RepositoryRulesetRulesBranchNamePattern defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + this.negate = defaults.negate; + this.operator = defaults.operator; + this.pattern = defaults.pattern; + } + + @CustomType.Setter + public Builder name(@Nullable String name) { + this.name = name; + return this; + } + @CustomType.Setter + public Builder negate(@Nullable Boolean negate) { + this.negate = negate; + return this; + } + @CustomType.Setter + public Builder operator(String operator) { + this.operator = Objects.requireNonNull(operator); + return this; + } + @CustomType.Setter + public Builder pattern(String pattern) { + this.pattern = Objects.requireNonNull(pattern); + return this; + } + public RepositoryRulesetRulesBranchNamePattern build() { + final var o = new RepositoryRulesetRulesBranchNamePattern(); + o.name = name; + o.negate = negate; + o.operator = operator; + o.pattern = pattern; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitAuthorEmailPattern.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitAuthorEmailPattern.java new file mode 100644 index 00000000..e7d5018a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitAuthorEmailPattern.java @@ -0,0 +1,117 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class RepositoryRulesetRulesCommitAuthorEmailPattern { + /** + * @return (String) The name of the ruleset. + * + */ + private @Nullable String name; + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + private @Nullable Boolean negate; + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + private String operator; + /** + * @return (String) The pattern to match with. + * + */ + private String pattern; + + private RepositoryRulesetRulesCommitAuthorEmailPattern() {} + /** + * @return (String) The name of the ruleset. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional negate() { + return Optional.ofNullable(this.negate); + } + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public String operator() { + return this.operator; + } + /** + * @return (String) The pattern to match with. + * + */ + public String pattern() { + return this.pattern; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetRulesCommitAuthorEmailPattern defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String name; + private @Nullable Boolean negate; + private String operator; + private String pattern; + public Builder() {} + public Builder(RepositoryRulesetRulesCommitAuthorEmailPattern defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + this.negate = defaults.negate; + this.operator = defaults.operator; + this.pattern = defaults.pattern; + } + + @CustomType.Setter + public Builder name(@Nullable String name) { + this.name = name; + return this; + } + @CustomType.Setter + public Builder negate(@Nullable Boolean negate) { + this.negate = negate; + return this; + } + @CustomType.Setter + public Builder operator(String operator) { + this.operator = Objects.requireNonNull(operator); + return this; + } + @CustomType.Setter + public Builder pattern(String pattern) { + this.pattern = Objects.requireNonNull(pattern); + return this; + } + public RepositoryRulesetRulesCommitAuthorEmailPattern build() { + final var o = new RepositoryRulesetRulesCommitAuthorEmailPattern(); + o.name = name; + o.negate = negate; + o.operator = operator; + o.pattern = pattern; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitMessagePattern.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitMessagePattern.java new file mode 100644 index 00000000..944d7ff9 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitMessagePattern.java @@ -0,0 +1,117 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class RepositoryRulesetRulesCommitMessagePattern { + /** + * @return (String) The name of the ruleset. + * + */ + private @Nullable String name; + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + private @Nullable Boolean negate; + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + private String operator; + /** + * @return (String) The pattern to match with. + * + */ + private String pattern; + + private RepositoryRulesetRulesCommitMessagePattern() {} + /** + * @return (String) The name of the ruleset. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional negate() { + return Optional.ofNullable(this.negate); + } + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public String operator() { + return this.operator; + } + /** + * @return (String) The pattern to match with. + * + */ + public String pattern() { + return this.pattern; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetRulesCommitMessagePattern defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String name; + private @Nullable Boolean negate; + private String operator; + private String pattern; + public Builder() {} + public Builder(RepositoryRulesetRulesCommitMessagePattern defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + this.negate = defaults.negate; + this.operator = defaults.operator; + this.pattern = defaults.pattern; + } + + @CustomType.Setter + public Builder name(@Nullable String name) { + this.name = name; + return this; + } + @CustomType.Setter + public Builder negate(@Nullable Boolean negate) { + this.negate = negate; + return this; + } + @CustomType.Setter + public Builder operator(String operator) { + this.operator = Objects.requireNonNull(operator); + return this; + } + @CustomType.Setter + public Builder pattern(String pattern) { + this.pattern = Objects.requireNonNull(pattern); + return this; + } + public RepositoryRulesetRulesCommitMessagePattern build() { + final var o = new RepositoryRulesetRulesCommitMessagePattern(); + o.name = name; + o.negate = negate; + o.operator = operator; + o.pattern = pattern; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitterEmailPattern.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitterEmailPattern.java new file mode 100644 index 00000000..008051cc --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesCommitterEmailPattern.java @@ -0,0 +1,117 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class RepositoryRulesetRulesCommitterEmailPattern { + /** + * @return (String) The name of the ruleset. + * + */ + private @Nullable String name; + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + private @Nullable Boolean negate; + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + private String operator; + /** + * @return (String) The pattern to match with. + * + */ + private String pattern; + + private RepositoryRulesetRulesCommitterEmailPattern() {} + /** + * @return (String) The name of the ruleset. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional negate() { + return Optional.ofNullable(this.negate); + } + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public String operator() { + return this.operator; + } + /** + * @return (String) The pattern to match with. + * + */ + public String pattern() { + return this.pattern; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetRulesCommitterEmailPattern defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String name; + private @Nullable Boolean negate; + private String operator; + private String pattern; + public Builder() {} + public Builder(RepositoryRulesetRulesCommitterEmailPattern defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + this.negate = defaults.negate; + this.operator = defaults.operator; + this.pattern = defaults.pattern; + } + + @CustomType.Setter + public Builder name(@Nullable String name) { + this.name = name; + return this; + } + @CustomType.Setter + public Builder negate(@Nullable Boolean negate) { + this.negate = negate; + return this; + } + @CustomType.Setter + public Builder operator(String operator) { + this.operator = Objects.requireNonNull(operator); + return this; + } + @CustomType.Setter + public Builder pattern(String pattern) { + this.pattern = Objects.requireNonNull(pattern); + return this; + } + public RepositoryRulesetRulesCommitterEmailPattern build() { + final var o = new RepositoryRulesetRulesCommitterEmailPattern(); + o.name = name; + o.negate = negate; + o.operator = operator; + o.pattern = pattern; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesPullRequest.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesPullRequest.java new file mode 100644 index 00000000..9bf45385 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesPullRequest.java @@ -0,0 +1,137 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.Integer; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class RepositoryRulesetRulesPullRequest { + /** + * @return (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + */ + private @Nullable Boolean dismissStaleReviewsOnPush; + /** + * @return (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + */ + private @Nullable Boolean requireCodeOwnerReview; + /** + * @return (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + */ + private @Nullable Boolean requireLastPushApproval; + /** + * @return (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + */ + private @Nullable Integer requiredApprovingReviewCount; + /** + * @return (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + */ + private @Nullable Boolean requiredReviewThreadResolution; + + private RepositoryRulesetRulesPullRequest() {} + /** + * @return (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + * + */ + public Optional dismissStaleReviewsOnPush() { + return Optional.ofNullable(this.dismissStaleReviewsOnPush); + } + /** + * @return (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + * + */ + public Optional requireCodeOwnerReview() { + return Optional.ofNullable(this.requireCodeOwnerReview); + } + /** + * @return (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + * + */ + public Optional requireLastPushApproval() { + return Optional.ofNullable(this.requireLastPushApproval); + } + /** + * @return (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + * + */ + public Optional requiredApprovingReviewCount() { + return Optional.ofNullable(this.requiredApprovingReviewCount); + } + /** + * @return (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + * + */ + public Optional requiredReviewThreadResolution() { + return Optional.ofNullable(this.requiredReviewThreadResolution); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetRulesPullRequest defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable Boolean dismissStaleReviewsOnPush; + private @Nullable Boolean requireCodeOwnerReview; + private @Nullable Boolean requireLastPushApproval; + private @Nullable Integer requiredApprovingReviewCount; + private @Nullable Boolean requiredReviewThreadResolution; + public Builder() {} + public Builder(RepositoryRulesetRulesPullRequest defaults) { + Objects.requireNonNull(defaults); + this.dismissStaleReviewsOnPush = defaults.dismissStaleReviewsOnPush; + this.requireCodeOwnerReview = defaults.requireCodeOwnerReview; + this.requireLastPushApproval = defaults.requireLastPushApproval; + this.requiredApprovingReviewCount = defaults.requiredApprovingReviewCount; + this.requiredReviewThreadResolution = defaults.requiredReviewThreadResolution; + } + + @CustomType.Setter + public Builder dismissStaleReviewsOnPush(@Nullable Boolean dismissStaleReviewsOnPush) { + this.dismissStaleReviewsOnPush = dismissStaleReviewsOnPush; + return this; + } + @CustomType.Setter + public Builder requireCodeOwnerReview(@Nullable Boolean requireCodeOwnerReview) { + this.requireCodeOwnerReview = requireCodeOwnerReview; + return this; + } + @CustomType.Setter + public Builder requireLastPushApproval(@Nullable Boolean requireLastPushApproval) { + this.requireLastPushApproval = requireLastPushApproval; + return this; + } + @CustomType.Setter + public Builder requiredApprovingReviewCount(@Nullable Integer requiredApprovingReviewCount) { + this.requiredApprovingReviewCount = requiredApprovingReviewCount; + return this; + } + @CustomType.Setter + public Builder requiredReviewThreadResolution(@Nullable Boolean requiredReviewThreadResolution) { + this.requiredReviewThreadResolution = requiredReviewThreadResolution; + return this; + } + public RepositoryRulesetRulesPullRequest build() { + final var o = new RepositoryRulesetRulesPullRequest(); + o.dismissStaleReviewsOnPush = dismissStaleReviewsOnPush; + o.requireCodeOwnerReview = requireCodeOwnerReview; + o.requireLastPushApproval = requireLastPushApproval; + o.requiredApprovingReviewCount = requiredApprovingReviewCount; + o.requiredReviewThreadResolution = requiredReviewThreadResolution; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredDeployments.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredDeployments.java new file mode 100644 index 00000000..64d58a24 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredDeployments.java @@ -0,0 +1,58 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class RepositoryRulesetRulesRequiredDeployments { + /** + * @return (List of String) The environments that must be successfully deployed to before branches can be merged. + * + */ + private List requiredDeploymentEnvironments; + + private RepositoryRulesetRulesRequiredDeployments() {} + /** + * @return (List of String) The environments that must be successfully deployed to before branches can be merged. + * + */ + public List requiredDeploymentEnvironments() { + return this.requiredDeploymentEnvironments; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetRulesRequiredDeployments defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private List requiredDeploymentEnvironments; + public Builder() {} + public Builder(RepositoryRulesetRulesRequiredDeployments defaults) { + Objects.requireNonNull(defaults); + this.requiredDeploymentEnvironments = defaults.requiredDeploymentEnvironments; + } + + @CustomType.Setter + public Builder requiredDeploymentEnvironments(List requiredDeploymentEnvironments) { + this.requiredDeploymentEnvironments = Objects.requireNonNull(requiredDeploymentEnvironments); + return this; + } + public Builder requiredDeploymentEnvironments(String... requiredDeploymentEnvironments) { + return requiredDeploymentEnvironments(List.of(requiredDeploymentEnvironments)); + } + public RepositoryRulesetRulesRequiredDeployments build() { + final var o = new RepositoryRulesetRulesRequiredDeployments(); + o.requiredDeploymentEnvironments = requiredDeploymentEnvironments; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecks.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecks.java new file mode 100644 index 00000000..0343bbff --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecks.java @@ -0,0 +1,81 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.github.outputs.RepositoryRulesetRulesRequiredStatusChecksRequiredCheck; +import java.lang.Boolean; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class RepositoryRulesetRulesRequiredStatusChecks { + /** + * @return (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + */ + private List requiredChecks; + /** + * @return (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + */ + private @Nullable Boolean strictRequiredStatusChecksPolicy; + + private RepositoryRulesetRulesRequiredStatusChecks() {} + /** + * @return (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + * + */ + public List requiredChecks() { + return this.requiredChecks; + } + /** + * @return (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + * + */ + public Optional strictRequiredStatusChecksPolicy() { + return Optional.ofNullable(this.strictRequiredStatusChecksPolicy); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetRulesRequiredStatusChecks defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private List requiredChecks; + private @Nullable Boolean strictRequiredStatusChecksPolicy; + public Builder() {} + public Builder(RepositoryRulesetRulesRequiredStatusChecks defaults) { + Objects.requireNonNull(defaults); + this.requiredChecks = defaults.requiredChecks; + this.strictRequiredStatusChecksPolicy = defaults.strictRequiredStatusChecksPolicy; + } + + @CustomType.Setter + public Builder requiredChecks(List requiredChecks) { + this.requiredChecks = Objects.requireNonNull(requiredChecks); + return this; + } + public Builder requiredChecks(RepositoryRulesetRulesRequiredStatusChecksRequiredCheck... requiredChecks) { + return requiredChecks(List.of(requiredChecks)); + } + @CustomType.Setter + public Builder strictRequiredStatusChecksPolicy(@Nullable Boolean strictRequiredStatusChecksPolicy) { + this.strictRequiredStatusChecksPolicy = strictRequiredStatusChecksPolicy; + return this; + } + public RepositoryRulesetRulesRequiredStatusChecks build() { + final var o = new RepositoryRulesetRulesRequiredStatusChecks(); + o.requiredChecks = requiredChecks; + o.strictRequiredStatusChecksPolicy = strictRequiredStatusChecksPolicy; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheck.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheck.java new file mode 100644 index 00000000..3474a012 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesRequiredStatusChecksRequiredCheck.java @@ -0,0 +1,77 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class RepositoryRulesetRulesRequiredStatusChecksRequiredCheck { + /** + * @return (String) The status check context name that must be present on the commit. + * + */ + private String context; + /** + * @return (Number) The optional integration ID that this status check must originate from. + * + */ + private @Nullable Integer integrationId; + + private RepositoryRulesetRulesRequiredStatusChecksRequiredCheck() {} + /** + * @return (String) The status check context name that must be present on the commit. + * + */ + public String context() { + return this.context; + } + /** + * @return (Number) The optional integration ID that this status check must originate from. + * + */ + public Optional integrationId() { + return Optional.ofNullable(this.integrationId); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetRulesRequiredStatusChecksRequiredCheck defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String context; + private @Nullable Integer integrationId; + public Builder() {} + public Builder(RepositoryRulesetRulesRequiredStatusChecksRequiredCheck defaults) { + Objects.requireNonNull(defaults); + this.context = defaults.context; + this.integrationId = defaults.integrationId; + } + + @CustomType.Setter + public Builder context(String context) { + this.context = Objects.requireNonNull(context); + return this; + } + @CustomType.Setter + public Builder integrationId(@Nullable Integer integrationId) { + this.integrationId = integrationId; + return this; + } + public RepositoryRulesetRulesRequiredStatusChecksRequiredCheck build() { + final var o = new RepositoryRulesetRulesRequiredStatusChecksRequiredCheck(); + o.context = context; + o.integrationId = integrationId; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesTagNamePattern.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesTagNamePattern.java new file mode 100644 index 00000000..7506160c --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryRulesetRulesTagNamePattern.java @@ -0,0 +1,117 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class RepositoryRulesetRulesTagNamePattern { + /** + * @return (String) The name of the ruleset. + * + */ + private @Nullable String name; + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + private @Nullable Boolean negate; + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + private String operator; + /** + * @return (String) The pattern to match with. + * + */ + private String pattern; + + private RepositoryRulesetRulesTagNamePattern() {} + /** + * @return (String) The name of the ruleset. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return (Boolean) If true, the rule will fail if the pattern matches. + * + */ + public Optional negate() { + return Optional.ofNullable(this.negate); + } + /** + * @return (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + * + */ + public String operator() { + return this.operator; + } + /** + * @return (String) The pattern to match with. + * + */ + public String pattern() { + return this.pattern; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(RepositoryRulesetRulesTagNamePattern defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String name; + private @Nullable Boolean negate; + private String operator; + private String pattern; + public Builder() {} + public Builder(RepositoryRulesetRulesTagNamePattern defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + this.negate = defaults.negate; + this.operator = defaults.operator; + this.pattern = defaults.pattern; + } + + @CustomType.Setter + public Builder name(@Nullable String name) { + this.name = name; + return this; + } + @CustomType.Setter + public Builder negate(@Nullable Boolean negate) { + this.negate = negate; + return this; + } + @CustomType.Setter + public Builder operator(String operator) { + this.operator = Objects.requireNonNull(operator); + return this; + } + @CustomType.Setter + public Builder pattern(String pattern) { + this.pattern = Objects.requireNonNull(pattern); + return this; + } + public RepositoryRulesetRulesTagNamePattern build() { + final var o = new RepositoryRulesetRulesTagNamePattern(); + o.name = name; + o.negate = negate; + o.operator = operator; + o.pattern = pattern; + return o; + } + } +} diff --git a/sdk/nodejs/actionsSecret.ts b/sdk/nodejs/actionsSecret.ts index 6e3c85dd..f9a95c42 100644 --- a/sdk/nodejs/actionsSecret.ts +++ b/sdk/nodejs/actionsSecret.ts @@ -31,7 +31,7 @@ import * as utilities from "./utilities"; * This resource can be imported using an ID made up of the `repository` and `secret_name`: * * ```sh - * $ pulumi import github:index/actionsSecret:ActionsSecret example_secret / + * $ pulumi import github:index/actionsSecret:ActionsSecret example_secret repository/secret_name * ``` * NOTEthe implementation is limited in that it won't fetch the value of the `plaintext_value` or `encrypted_value` fields when importing. You may need to ignore changes for these as a workaround. */ diff --git a/sdk/nodejs/enterpriseOrganization.ts b/sdk/nodejs/enterpriseOrganization.ts index c7ee5305..9b49df77 100644 --- a/sdk/nodejs/enterpriseOrganization.ts +++ b/sdk/nodejs/enterpriseOrganization.ts @@ -15,6 +15,7 @@ import * as utilities from "./utilities"; * * const org = new github.EnterpriseOrganization("org", { * enterpriseId: data.github_enterprise.enterprise.id, + * displayName: "Some Awesome Org", * description: "Organization created with terraform", * billingEmail: "jon@winteriscoming.com", * adminLogins: ["jon-snow"], @@ -23,7 +24,11 @@ import * as utilities from "./utilities"; * * ## Import * - * Support for importing organizations is not currently supported. + * GitHub Enterprise Organization can be imported using the `slug` of the enterprise, combined with the `orgname` of the organization, separated by a `/` character. + * + * ```sh + * $ pulumi import github:index/enterpriseOrganization:EnterpriseOrganization org enterp/some-awesome-org + * ``` */ export class EnterpriseOrganization extends pulumi.CustomResource { /** @@ -65,6 +70,10 @@ export class EnterpriseOrganization extends pulumi.CustomResource { * The description of the organization. */ public readonly description!: pulumi.Output; + /** + * The display name of the organization. + */ + public readonly displayName!: pulumi.Output; /** * The ID of the enterprise. */ @@ -90,6 +99,7 @@ export class EnterpriseOrganization extends pulumi.CustomResource { resourceInputs["adminLogins"] = state ? state.adminLogins : undefined; resourceInputs["billingEmail"] = state ? state.billingEmail : undefined; resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["displayName"] = state ? state.displayName : undefined; resourceInputs["enterpriseId"] = state ? state.enterpriseId : undefined; resourceInputs["name"] = state ? state.name : undefined; } else { @@ -106,6 +116,7 @@ export class EnterpriseOrganization extends pulumi.CustomResource { resourceInputs["adminLogins"] = args ? args.adminLogins : undefined; resourceInputs["billingEmail"] = args ? args.billingEmail : undefined; resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["displayName"] = args ? args.displayName : undefined; resourceInputs["enterpriseId"] = args ? args.enterpriseId : undefined; resourceInputs["name"] = args ? args.name : undefined; } @@ -130,6 +141,10 @@ export interface EnterpriseOrganizationState { * The description of the organization. */ description?: pulumi.Input; + /** + * The display name of the organization. + */ + displayName?: pulumi.Input; /** * The ID of the enterprise. */ @@ -156,6 +171,10 @@ export interface EnterpriseOrganizationArgs { * The description of the organization. */ description?: pulumi.Input; + /** + * The display name of the organization. + */ + displayName?: pulumi.Input; /** * The ID of the enterprise. */ diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index 60c207ac..85c206ab 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -480,6 +480,11 @@ export type OrganizationProject = import("./organizationProject").OrganizationPr export const OrganizationProject: typeof import("./organizationProject").OrganizationProject = null as any; utilities.lazyLoad(exports, ["OrganizationProject"], () => require("./organizationProject")); +export { OrganizationRulesetArgs, OrganizationRulesetState } from "./organizationRuleset"; +export type OrganizationRuleset = import("./organizationRuleset").OrganizationRuleset; +export const OrganizationRuleset: typeof import("./organizationRuleset").OrganizationRuleset = null as any; +utilities.lazyLoad(exports, ["OrganizationRuleset"], () => require("./organizationRuleset")); + export { OrganizationSecurityManagerArgs, OrganizationSecurityManagerState } from "./organizationSecurityManager"; export type OrganizationSecurityManager = import("./organizationSecurityManager").OrganizationSecurityManager; export const OrganizationSecurityManager: typeof import("./organizationSecurityManager").OrganizationSecurityManager = null as any; @@ -580,11 +585,21 @@ export type RepositoryPullRequest = import("./repositoryPullRequest").Repository export const RepositoryPullRequest: typeof import("./repositoryPullRequest").RepositoryPullRequest = null as any; utilities.lazyLoad(exports, ["RepositoryPullRequest"], () => require("./repositoryPullRequest")); +export { RepositoryRulesetArgs, RepositoryRulesetState } from "./repositoryRuleset"; +export type RepositoryRuleset = import("./repositoryRuleset").RepositoryRuleset; +export const RepositoryRuleset: typeof import("./repositoryRuleset").RepositoryRuleset = null as any; +utilities.lazyLoad(exports, ["RepositoryRuleset"], () => require("./repositoryRuleset")); + export { RepositoryTagProtectionArgs, RepositoryTagProtectionState } from "./repositoryTagProtection"; export type RepositoryTagProtection = import("./repositoryTagProtection").RepositoryTagProtection; export const RepositoryTagProtection: typeof import("./repositoryTagProtection").RepositoryTagProtection = null as any; utilities.lazyLoad(exports, ["RepositoryTagProtection"], () => require("./repositoryTagProtection")); +export { RepositoryTopicsArgs, RepositoryTopicsState } from "./repositoryTopics"; +export type RepositoryTopics = import("./repositoryTopics").RepositoryTopics; +export const RepositoryTopics: typeof import("./repositoryTopics").RepositoryTopics = null as any; +utilities.lazyLoad(exports, ["RepositoryTopics"], () => require("./repositoryTopics")); + export { RepositoryWebhookArgs, RepositoryWebhookState } from "./repositoryWebhook"; export type RepositoryWebhook = import("./repositoryWebhook").RepositoryWebhook; export const RepositoryWebhook: typeof import("./repositoryWebhook").RepositoryWebhook = null as any; @@ -717,6 +732,8 @@ const _module = { return new OrganizationCustomRole(name, undefined, { urn }) case "github:index/organizationProject:OrganizationProject": return new OrganizationProject(name, undefined, { urn }) + case "github:index/organizationRuleset:OrganizationRuleset": + return new OrganizationRuleset(name, undefined, { urn }) case "github:index/organizationSecurityManager:OrganizationSecurityManager": return new OrganizationSecurityManager(name, undefined, { urn }) case "github:index/organizationSettings:OrganizationSettings": @@ -755,8 +772,12 @@ const _module = { return new RepositoryProject(name, undefined, { urn }) case "github:index/repositoryPullRequest:RepositoryPullRequest": return new RepositoryPullRequest(name, undefined, { urn }) + case "github:index/repositoryRuleset:RepositoryRuleset": + return new RepositoryRuleset(name, undefined, { urn }) case "github:index/repositoryTagProtection:RepositoryTagProtection": return new RepositoryTagProtection(name, undefined, { urn }) + case "github:index/repositoryTopics:RepositoryTopics": + return new RepositoryTopics(name, undefined, { urn }) case "github:index/repositoryWebhook:RepositoryWebhook": return new RepositoryWebhook(name, undefined, { urn }) case "github:index/team:Team": @@ -816,6 +837,7 @@ pulumi.runtime.registerResourceModule("github", "index/membership", _module) pulumi.runtime.registerResourceModule("github", "index/organizationBlock", _module) pulumi.runtime.registerResourceModule("github", "index/organizationCustomRole", _module) pulumi.runtime.registerResourceModule("github", "index/organizationProject", _module) +pulumi.runtime.registerResourceModule("github", "index/organizationRuleset", _module) pulumi.runtime.registerResourceModule("github", "index/organizationSecurityManager", _module) pulumi.runtime.registerResourceModule("github", "index/organizationSettings", _module) pulumi.runtime.registerResourceModule("github", "index/organizationWebhook", _module) @@ -835,7 +857,9 @@ pulumi.runtime.registerResourceModule("github", "index/repositoryFile", _module) pulumi.runtime.registerResourceModule("github", "index/repositoryMilestone", _module) pulumi.runtime.registerResourceModule("github", "index/repositoryProject", _module) pulumi.runtime.registerResourceModule("github", "index/repositoryPullRequest", _module) +pulumi.runtime.registerResourceModule("github", "index/repositoryRuleset", _module) pulumi.runtime.registerResourceModule("github", "index/repositoryTagProtection", _module) +pulumi.runtime.registerResourceModule("github", "index/repositoryTopics", _module) pulumi.runtime.registerResourceModule("github", "index/repositoryWebhook", _module) pulumi.runtime.registerResourceModule("github", "index/team", _module) pulumi.runtime.registerResourceModule("github", "index/teamMembers", _module) diff --git a/sdk/nodejs/organizationRuleset.ts b/sdk/nodejs/organizationRuleset.ts new file mode 100644 index 00000000..3e8dc298 --- /dev/null +++ b/sdk/nodejs/organizationRuleset.ts @@ -0,0 +1,205 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * Creates a GitHub organization ruleset. + * + * This resource allows you to create and manage rulesets on the organization level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + * + * ## Import + * + * GitHub Organization Rulesets can be imported using the GitHub ruleset ID e.g. + * + * ```sh + * $ pulumi import github:index/organizationRuleset:OrganizationRuleset example 12345` + * ``` + */ +export class OrganizationRuleset extends pulumi.CustomResource { + /** + * Get an existing OrganizationRuleset resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: OrganizationRulesetState, opts?: pulumi.CustomResourceOptions): OrganizationRuleset { + return new OrganizationRuleset(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'github:index/organizationRuleset:OrganizationRuleset'; + + /** + * Returns true if the given object is an instance of OrganizationRuleset. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is OrganizationRuleset { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === OrganizationRuleset.__pulumiType; + } + + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + */ + public readonly bypassActors!: pulumi.Output; + /** + * (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + */ + public readonly conditions!: pulumi.Output; + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + */ + public readonly enforcement!: pulumi.Output; + /** + * (String) + */ + public /*out*/ readonly etag!: pulumi.Output; + /** + * (String) The name of the ruleset. + */ + public readonly name!: pulumi.Output; + /** + * (String) GraphQL global node id for use with v4 API. + */ + public /*out*/ readonly nodeId!: pulumi.Output; + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + */ + public readonly rules!: pulumi.Output; + /** + * (Number) GitHub ID for the ruleset. + */ + public /*out*/ readonly rulesetId!: pulumi.Output; + /** + * (String) Possible values are `branch` and `tag`. + */ + public readonly target!: pulumi.Output; + + /** + * Create a OrganizationRuleset resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: OrganizationRulesetArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: OrganizationRulesetArgs | OrganizationRulesetState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as OrganizationRulesetState | undefined; + resourceInputs["bypassActors"] = state ? state.bypassActors : undefined; + resourceInputs["conditions"] = state ? state.conditions : undefined; + resourceInputs["enforcement"] = state ? state.enforcement : undefined; + resourceInputs["etag"] = state ? state.etag : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["nodeId"] = state ? state.nodeId : undefined; + resourceInputs["rules"] = state ? state.rules : undefined; + resourceInputs["rulesetId"] = state ? state.rulesetId : undefined; + resourceInputs["target"] = state ? state.target : undefined; + } else { + const args = argsOrState as OrganizationRulesetArgs | undefined; + if ((!args || args.enforcement === undefined) && !opts.urn) { + throw new Error("Missing required property 'enforcement'"); + } + if ((!args || args.rules === undefined) && !opts.urn) { + throw new Error("Missing required property 'rules'"); + } + if ((!args || args.target === undefined) && !opts.urn) { + throw new Error("Missing required property 'target'"); + } + resourceInputs["bypassActors"] = args ? args.bypassActors : undefined; + resourceInputs["conditions"] = args ? args.conditions : undefined; + resourceInputs["enforcement"] = args ? args.enforcement : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["rules"] = args ? args.rules : undefined; + resourceInputs["target"] = args ? args.target : undefined; + resourceInputs["etag"] = undefined /*out*/; + resourceInputs["nodeId"] = undefined /*out*/; + resourceInputs["rulesetId"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(OrganizationRuleset.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering OrganizationRuleset resources. + */ +export interface OrganizationRulesetState { + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + */ + bypassActors?: pulumi.Input[]>; + /** + * (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + */ + conditions?: pulumi.Input; + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + */ + enforcement?: pulumi.Input; + /** + * (String) + */ + etag?: pulumi.Input; + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (String) GraphQL global node id for use with v4 API. + */ + nodeId?: pulumi.Input; + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + */ + rules?: pulumi.Input; + /** + * (Number) GitHub ID for the ruleset. + */ + rulesetId?: pulumi.Input; + /** + * (String) Possible values are `branch` and `tag`. + */ + target?: pulumi.Input; +} + +/** + * The set of arguments for constructing a OrganizationRuleset resource. + */ +export interface OrganizationRulesetArgs { + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + */ + bypassActors?: pulumi.Input[]>; + /** + * (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + */ + conditions?: pulumi.Input; + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + */ + enforcement: pulumi.Input; + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + */ + rules: pulumi.Input; + /** + * (String) Possible values are `branch` and `tag`. + */ + target: pulumi.Input; +} diff --git a/sdk/nodejs/repository.ts b/sdk/nodejs/repository.ts index 833ef64d..1af6e3ee 100644 --- a/sdk/nodejs/repository.ts +++ b/sdk/nodejs/repository.ts @@ -253,7 +253,7 @@ export class Repository extends pulumi.CustomResource { /** * The list of topics of the repository. */ - public readonly topics!: pulumi.Output; + public readonly topics!: pulumi.Output; /** * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be `internal`. The `visibility` parameter overrides the `private` parameter. */ diff --git a/sdk/nodejs/repositoryRuleset.ts b/sdk/nodejs/repositoryRuleset.ts new file mode 100644 index 00000000..002c0bff --- /dev/null +++ b/sdk/nodejs/repositoryRuleset.ts @@ -0,0 +1,254 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * Creates a GitHub repository ruleset. + * + * This resource allows you to create and manage rulesets on the repository level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const exampleRepository = new github.Repository("exampleRepository", {description: "Example repository"}); + * const exampleRepositoryRuleset = new github.RepositoryRuleset("exampleRepositoryRuleset", { + * repository: exampleRepository.name, + * target: "branch", + * enforcement: "active", + * conditions: { + * refName: { + * includes: ["~ALL"], + * excludes: [], + * }, + * }, + * bypassActors: [{ + * actorId: 13473, + * actorType: "Integration", + * bypassMode: "always", + * }], + * rules: { + * creation: true, + * update: true, + * deletion: true, + * requiredLinearHistory: true, + * requiredSignatures: true, + * requiredDeployments: { + * requiredDeploymentEnvironments: ["test"], + * }, + * }, + * }); + * ``` + * + * ## Import + * + * GitHub Repository Rulesets can be imported using the GitHub repository name and ruleset ID e.g. + * + * ```sh + * $ pulumi import github:index/repositoryRuleset:RepositoryRuleset example example:12345` + * ``` + */ +export class RepositoryRuleset extends pulumi.CustomResource { + /** + * Get an existing RepositoryRuleset resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: RepositoryRulesetState, opts?: pulumi.CustomResourceOptions): RepositoryRuleset { + return new RepositoryRuleset(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'github:index/repositoryRuleset:RepositoryRuleset'; + + /** + * Returns true if the given object is an instance of RepositoryRuleset. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is RepositoryRuleset { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === RepositoryRuleset.__pulumiType; + } + + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + */ + public readonly bypassActors!: pulumi.Output; + /** + * (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + */ + public readonly conditions!: pulumi.Output; + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + */ + public readonly enforcement!: pulumi.Output; + /** + * (String) + */ + public /*out*/ readonly etag!: pulumi.Output; + /** + * (String) The name of the ruleset. + */ + public readonly name!: pulumi.Output; + /** + * (String) GraphQL global node id for use with v4 API. + */ + public /*out*/ readonly nodeId!: pulumi.Output; + /** + * (String) Name of the repository to apply rulset to. + */ + public readonly repository!: pulumi.Output; + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + */ + public readonly rules!: pulumi.Output; + /** + * (Number) GitHub ID for the ruleset. + */ + public /*out*/ readonly rulesetId!: pulumi.Output; + /** + * (String) Possible values are `branch` and `tag`. + */ + public readonly target!: pulumi.Output; + + /** + * Create a RepositoryRuleset resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: RepositoryRulesetArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: RepositoryRulesetArgs | RepositoryRulesetState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as RepositoryRulesetState | undefined; + resourceInputs["bypassActors"] = state ? state.bypassActors : undefined; + resourceInputs["conditions"] = state ? state.conditions : undefined; + resourceInputs["enforcement"] = state ? state.enforcement : undefined; + resourceInputs["etag"] = state ? state.etag : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["nodeId"] = state ? state.nodeId : undefined; + resourceInputs["repository"] = state ? state.repository : undefined; + resourceInputs["rules"] = state ? state.rules : undefined; + resourceInputs["rulesetId"] = state ? state.rulesetId : undefined; + resourceInputs["target"] = state ? state.target : undefined; + } else { + const args = argsOrState as RepositoryRulesetArgs | undefined; + if ((!args || args.enforcement === undefined) && !opts.urn) { + throw new Error("Missing required property 'enforcement'"); + } + if ((!args || args.rules === undefined) && !opts.urn) { + throw new Error("Missing required property 'rules'"); + } + if ((!args || args.target === undefined) && !opts.urn) { + throw new Error("Missing required property 'target'"); + } + resourceInputs["bypassActors"] = args ? args.bypassActors : undefined; + resourceInputs["conditions"] = args ? args.conditions : undefined; + resourceInputs["enforcement"] = args ? args.enforcement : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["repository"] = args ? args.repository : undefined; + resourceInputs["rules"] = args ? args.rules : undefined; + resourceInputs["target"] = args ? args.target : undefined; + resourceInputs["etag"] = undefined /*out*/; + resourceInputs["nodeId"] = undefined /*out*/; + resourceInputs["rulesetId"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(RepositoryRuleset.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering RepositoryRuleset resources. + */ +export interface RepositoryRulesetState { + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + */ + bypassActors?: pulumi.Input[]>; + /** + * (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + */ + conditions?: pulumi.Input; + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + */ + enforcement?: pulumi.Input; + /** + * (String) + */ + etag?: pulumi.Input; + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (String) GraphQL global node id for use with v4 API. + */ + nodeId?: pulumi.Input; + /** + * (String) Name of the repository to apply rulset to. + */ + repository?: pulumi.Input; + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + */ + rules?: pulumi.Input; + /** + * (Number) GitHub ID for the ruleset. + */ + rulesetId?: pulumi.Input; + /** + * (String) Possible values are `branch` and `tag`. + */ + target?: pulumi.Input; +} + +/** + * The set of arguments for constructing a RepositoryRuleset resource. + */ +export interface RepositoryRulesetArgs { + /** + * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + */ + bypassActors?: pulumi.Input[]>; + /** + * (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + */ + conditions?: pulumi.Input; + /** + * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + */ + enforcement: pulumi.Input; + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (String) Name of the repository to apply rulset to. + */ + repository?: pulumi.Input; + /** + * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + */ + rules: pulumi.Input; + /** + * (String) Possible values are `branch` and `tag`. + */ + target: pulumi.Input; +} diff --git a/sdk/nodejs/repositoryTopics.ts b/sdk/nodejs/repositoryTopics.ts new file mode 100644 index 00000000..cf427700 --- /dev/null +++ b/sdk/nodejs/repositoryTopics.ts @@ -0,0 +1,128 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const testRepository = github.getRepository({ + * name: "test", + * }); + * const testRepositoryTopics = new github.RepositoryTopics("testRepositoryTopics", { + * repository: github_repository.test.name, + * topics: [ + * "topic-1", + * "topic-2", + * ], + * }); + * ``` + * + * ## Import + * + * Repository topics can be imported using the `name` of the repository. + * + * ```sh + * $ pulumi import github:index/repositoryTopics:RepositoryTopics terraform terraform + * ``` + */ +export class RepositoryTopics extends pulumi.CustomResource { + /** + * Get an existing RepositoryTopics resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: RepositoryTopicsState, opts?: pulumi.CustomResourceOptions): RepositoryTopics { + return new RepositoryTopics(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'github:index/repositoryTopics:RepositoryTopics'; + + /** + * Returns true if the given object is an instance of RepositoryTopics. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is RepositoryTopics { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === RepositoryTopics.__pulumiType; + } + + /** + * The repository name. + */ + public readonly repository!: pulumi.Output; + /** + * A list of topics to add to the repository. + */ + public readonly topics!: pulumi.Output; + + /** + * Create a RepositoryTopics resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: RepositoryTopicsArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: RepositoryTopicsArgs | RepositoryTopicsState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as RepositoryTopicsState | undefined; + resourceInputs["repository"] = state ? state.repository : undefined; + resourceInputs["topics"] = state ? state.topics : undefined; + } else { + const args = argsOrState as RepositoryTopicsArgs | undefined; + if ((!args || args.repository === undefined) && !opts.urn) { + throw new Error("Missing required property 'repository'"); + } + if ((!args || args.topics === undefined) && !opts.urn) { + throw new Error("Missing required property 'topics'"); + } + resourceInputs["repository"] = args ? args.repository : undefined; + resourceInputs["topics"] = args ? args.topics : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(RepositoryTopics.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering RepositoryTopics resources. + */ +export interface RepositoryTopicsState { + /** + * The repository name. + */ + repository?: pulumi.Input; + /** + * A list of topics to add to the repository. + */ + topics?: pulumi.Input[]>; +} + +/** + * The set of arguments for constructing a RepositoryTopics resource. + */ +export interface RepositoryTopicsArgs { + /** + * The repository name. + */ + repository: pulumi.Input; + /** + * A list of topics to add to the repository. + */ + topics: pulumi.Input[]>; +} diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index 3f4d220e..d2ac2359 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -111,6 +111,7 @@ "organizationBlock.ts", "organizationCustomRole.ts", "organizationProject.ts", + "organizationRuleset.ts", "organizationSecurityManager.ts", "organizationSettings.ts", "organizationWebhook.ts", @@ -131,7 +132,9 @@ "repositoryMilestone.ts", "repositoryProject.ts", "repositoryPullRequest.ts", + "repositoryRuleset.ts", "repositoryTagProtection.ts", + "repositoryTopics.ts", "repositoryWebhook.ts", "team.ts", "teamMembers.ts", diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 6c293491..5cc53d3f 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -171,6 +171,256 @@ export interface BranchProtectionV3Restrictions { users?: pulumi.Input[]>; } +export interface OrganizationRulesetBypassActor { + /** + * (Number) The ID of the actor that can bypass a ruleset + */ + actorId: pulumi.Input; + /** + * The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + */ + actorType: pulumi.Input; + /** + * (String) When the specified actor can bypass the ruleset. pullRequest means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pullRequest`. + */ + bypassMode?: pulumi.Input; +} + +export interface OrganizationRulesetConditions { + /** + * (Block List, Min: 1, Max: 1) (see below for nested schema) + */ + refName: pulumi.Input; + /** + * The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repositoryName`. + */ + repositoryId?: pulumi.Input; + /** + * Conflicts with `repositoryId`. (see below for nested schema) + * + * One of `repositoryId` and `repositoryName` must be set for the rule to target any repositories. + */ + repositoryName?: pulumi.Input; +} + +export interface OrganizationRulesetConditionsRefName { + /** + * (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + */ + excludes: pulumi.Input[]>; + /** + * (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + */ + includes: pulumi.Input[]>; +} + +export interface OrganizationRulesetConditionsRepositoryName { + /** + * (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + */ + excludes: pulumi.Input[]>; + /** + * (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + */ + inlcudes: pulumi.Input[]>; + protected?: pulumi.Input; +} + +export interface OrganizationRulesetRules { + /** + * (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + */ + branchNamePattern?: pulumi.Input; + /** + * (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + commitAuthorEmailPattern?: pulumi.Input; + /** + * (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + commitMessagePattern?: pulumi.Input; + /** + * (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + committerEmailPattern?: pulumi.Input; + /** + * (Boolean) Only allow users with bypass permission to create matching refs. + */ + creation?: pulumi.Input; + /** + * (Boolean) Only allow users with bypass permissions to delete matching refs. + */ + deletion?: pulumi.Input; + /** + * (Boolean) Prevent users with push access from force pushing to branches. + */ + nonFastForward?: pulumi.Input; + /** + * (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + */ + pullRequest?: pulumi.Input; + /** + * (Boolean) Prevent merge commits from being pushed to matching branches. + */ + requiredLinearHistory?: pulumi.Input; + /** + * (Boolean) Commits pushed to matching branches must have verified signatures. + */ + requiredSignatures?: pulumi.Input; + /** + * (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + */ + requiredStatusChecks?: pulumi.Input; + /** + * (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + */ + tagNamePattern?: pulumi.Input; + /** + * (Boolean) Only allow users with bypass permission to update matching refs. + */ + update?: pulumi.Input; +} + +export interface OrganizationRulesetRulesBranchNamePattern { + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: pulumi.Input; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: pulumi.Input; + /** + * (String) The pattern to match with. + */ + pattern: pulumi.Input; +} + +export interface OrganizationRulesetRulesCommitAuthorEmailPattern { + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: pulumi.Input; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: pulumi.Input; + /** + * (String) The pattern to match with. + */ + pattern: pulumi.Input; +} + +export interface OrganizationRulesetRulesCommitMessagePattern { + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: pulumi.Input; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: pulumi.Input; + /** + * (String) The pattern to match with. + */ + pattern: pulumi.Input; +} + +export interface OrganizationRulesetRulesCommitterEmailPattern { + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: pulumi.Input; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: pulumi.Input; + /** + * (String) The pattern to match with. + */ + pattern: pulumi.Input; +} + +export interface OrganizationRulesetRulesPullRequest { + /** + * (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + */ + dismissStaleReviewsOnPush?: pulumi.Input; + /** + * (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + */ + requireCodeOwnerReview?: pulumi.Input; + /** + * (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + */ + requireLastPushApproval?: pulumi.Input; + /** + * (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + */ + requiredApprovingReviewCount?: pulumi.Input; + /** + * (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + */ + requiredReviewThreadResolution?: pulumi.Input; +} + +export interface OrganizationRulesetRulesRequiredStatusChecks { + /** + * (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + */ + requiredChecks: pulumi.Input[]>; + /** + * (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + */ + strictRequiredStatusChecksPolicy?: pulumi.Input; +} + +export interface OrganizationRulesetRulesRequiredStatusChecksRequiredCheck { + /** + * (String) The status check context name that must be present on the commit. + */ + context: pulumi.Input; + /** + * (Number) The optional integration ID that this status check must originate from. + */ + integrationId?: pulumi.Input; +} + +export interface OrganizationRulesetRulesTagNamePattern { + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: pulumi.Input; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: pulumi.Input; + /** + * (String) The pattern to match with. + */ + pattern: pulumi.Input; +} + export interface OrganizationWebhookConfiguration { contentType?: pulumi.Input; insecureSsl?: pulumi.Input; @@ -271,6 +521,249 @@ export interface RepositoryPagesSource { path?: pulumi.Input; } +export interface RepositoryRulesetBypassActor { + /** + * (Number) The ID of the actor that can bypass a ruleset + */ + actorId: pulumi.Input; + /** + * The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + */ + actorType: pulumi.Input; + /** + * (String) When the specified actor can bypass the ruleset. pullRequest means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pullRequest`. + */ + bypassMode?: pulumi.Input; +} + +export interface RepositoryRulesetConditions { + /** + * (Block List, Min: 1, Max: 1) (see below for nested schema) + */ + refName: pulumi.Input; +} + +export interface RepositoryRulesetConditionsRefName { + /** + * (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + */ + excludes: pulumi.Input[]>; + /** + * (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + */ + includes: pulumi.Input[]>; +} + +export interface RepositoryRulesetRules { + /** + * (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + */ + branchNamePattern?: pulumi.Input; + /** + * (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + commitAuthorEmailPattern?: pulumi.Input; + /** + * (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + commitMessagePattern?: pulumi.Input; + /** + * (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + committerEmailPattern?: pulumi.Input; + /** + * (Boolean) Only allow users with bypass permission to create matching refs. + */ + creation?: pulumi.Input; + /** + * (Boolean) Only allow users with bypass permissions to delete matching refs. + */ + deletion?: pulumi.Input; + /** + * (Boolean) Prevent users with push access from force pushing to branches. + */ + nonFastForward?: pulumi.Input; + /** + * (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + */ + pullRequest?: pulumi.Input; + /** + * (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + */ + requiredDeployments?: pulumi.Input; + /** + * (Boolean) Prevent merge commits from being pushed to matching branches. + */ + requiredLinearHistory?: pulumi.Input; + /** + * (Boolean) Commits pushed to matching branches must have verified signatures. + */ + requiredSignatures?: pulumi.Input; + /** + * (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + */ + requiredStatusChecks?: pulumi.Input; + /** + * (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + */ + tagNamePattern?: pulumi.Input; + /** + * (Boolean) Only allow users with bypass permission to update matching refs. + */ + update?: pulumi.Input; + /** + * (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + */ + updateAllowsFetchAndMerge?: pulumi.Input; +} + +export interface RepositoryRulesetRulesBranchNamePattern { + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: pulumi.Input; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: pulumi.Input; + /** + * (String) The pattern to match with. + */ + pattern: pulumi.Input; +} + +export interface RepositoryRulesetRulesCommitAuthorEmailPattern { + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: pulumi.Input; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: pulumi.Input; + /** + * (String) The pattern to match with. + */ + pattern: pulumi.Input; +} + +export interface RepositoryRulesetRulesCommitMessagePattern { + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: pulumi.Input; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: pulumi.Input; + /** + * (String) The pattern to match with. + */ + pattern: pulumi.Input; +} + +export interface RepositoryRulesetRulesCommitterEmailPattern { + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: pulumi.Input; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: pulumi.Input; + /** + * (String) The pattern to match with. + */ + pattern: pulumi.Input; +} + +export interface RepositoryRulesetRulesPullRequest { + /** + * (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + */ + dismissStaleReviewsOnPush?: pulumi.Input; + /** + * (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + */ + requireCodeOwnerReview?: pulumi.Input; + /** + * (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + */ + requireLastPushApproval?: pulumi.Input; + /** + * (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + */ + requiredApprovingReviewCount?: pulumi.Input; + /** + * (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + */ + requiredReviewThreadResolution?: pulumi.Input; +} + +export interface RepositoryRulesetRulesRequiredDeployments { + /** + * (List of String) The environments that must be successfully deployed to before branches can be merged. + */ + requiredDeploymentEnvironments: pulumi.Input[]>; +} + +export interface RepositoryRulesetRulesRequiredStatusChecks { + /** + * (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + */ + requiredChecks: pulumi.Input[]>; + /** + * (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + */ + strictRequiredStatusChecksPolicy?: pulumi.Input; +} + +export interface RepositoryRulesetRulesRequiredStatusChecksRequiredCheck { + /** + * (String) The status check context name that must be present on the commit. + */ + context: pulumi.Input; + /** + * (Number) The optional integration ID that this status check must originate from. + */ + integrationId?: pulumi.Input; +} + +export interface RepositoryRulesetRulesTagNamePattern { + /** + * (String) The name of the ruleset. + */ + name?: pulumi.Input; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: pulumi.Input; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: pulumi.Input; + /** + * (String) The pattern to match with. + */ + pattern: pulumi.Input; +} + export interface RepositorySecurityAndAnalysis { /** * The advanced security configuration for the repository. See Advanced Security Configuration below for details. If a repository's visibility is `public`, advanced security is always enabled and cannot be changed, so this setting cannot be supplied. diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index b740b06c..70b22dfd 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -848,6 +848,256 @@ export interface GetTreeEntry { type: string; } +export interface OrganizationRulesetBypassActor { + /** + * (Number) The ID of the actor that can bypass a ruleset + */ + actorId: number; + /** + * The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + */ + actorType: string; + /** + * (String) When the specified actor can bypass the ruleset. pullRequest means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pullRequest`. + */ + bypassMode?: string; +} + +export interface OrganizationRulesetConditions { + /** + * (Block List, Min: 1, Max: 1) (see below for nested schema) + */ + refName: outputs.OrganizationRulesetConditionsRefName; + /** + * The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repositoryName`. + */ + repositoryId?: number; + /** + * Conflicts with `repositoryId`. (see below for nested schema) + * + * One of `repositoryId` and `repositoryName` must be set for the rule to target any repositories. + */ + repositoryName?: outputs.OrganizationRulesetConditionsRepositoryName; +} + +export interface OrganizationRulesetConditionsRefName { + /** + * (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + */ + excludes: string[]; + /** + * (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + */ + includes: string[]; +} + +export interface OrganizationRulesetConditionsRepositoryName { + /** + * (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + */ + excludes: string[]; + /** + * (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. + */ + inlcudes: string[]; + protected?: boolean; +} + +export interface OrganizationRulesetRules { + /** + * (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + */ + branchNamePattern?: outputs.OrganizationRulesetRulesBranchNamePattern; + /** + * (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + commitAuthorEmailPattern?: outputs.OrganizationRulesetRulesCommitAuthorEmailPattern; + /** + * (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + commitMessagePattern?: outputs.OrganizationRulesetRulesCommitMessagePattern; + /** + * (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + committerEmailPattern?: outputs.OrganizationRulesetRulesCommitterEmailPattern; + /** + * (Boolean) Only allow users with bypass permission to create matching refs. + */ + creation?: boolean; + /** + * (Boolean) Only allow users with bypass permissions to delete matching refs. + */ + deletion?: boolean; + /** + * (Boolean) Prevent users with push access from force pushing to branches. + */ + nonFastForward?: boolean; + /** + * (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + */ + pullRequest?: outputs.OrganizationRulesetRulesPullRequest; + /** + * (Boolean) Prevent merge commits from being pushed to matching branches. + */ + requiredLinearHistory?: boolean; + /** + * (Boolean) Commits pushed to matching branches must have verified signatures. + */ + requiredSignatures?: boolean; + /** + * (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + */ + requiredStatusChecks?: outputs.OrganizationRulesetRulesRequiredStatusChecks; + /** + * (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + */ + tagNamePattern?: outputs.OrganizationRulesetRulesTagNamePattern; + /** + * (Boolean) Only allow users with bypass permission to update matching refs. + */ + update?: boolean; +} + +export interface OrganizationRulesetRulesBranchNamePattern { + /** + * (String) The name of the ruleset. + */ + name?: string; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: boolean; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: string; + /** + * (String) The pattern to match with. + */ + pattern: string; +} + +export interface OrganizationRulesetRulesCommitAuthorEmailPattern { + /** + * (String) The name of the ruleset. + */ + name?: string; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: boolean; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: string; + /** + * (String) The pattern to match with. + */ + pattern: string; +} + +export interface OrganizationRulesetRulesCommitMessagePattern { + /** + * (String) The name of the ruleset. + */ + name?: string; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: boolean; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: string; + /** + * (String) The pattern to match with. + */ + pattern: string; +} + +export interface OrganizationRulesetRulesCommitterEmailPattern { + /** + * (String) The name of the ruleset. + */ + name?: string; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: boolean; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: string; + /** + * (String) The pattern to match with. + */ + pattern: string; +} + +export interface OrganizationRulesetRulesPullRequest { + /** + * (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + */ + dismissStaleReviewsOnPush?: boolean; + /** + * (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + */ + requireCodeOwnerReview?: boolean; + /** + * (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + */ + requireLastPushApproval?: boolean; + /** + * (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + */ + requiredApprovingReviewCount?: number; + /** + * (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + */ + requiredReviewThreadResolution?: boolean; +} + +export interface OrganizationRulesetRulesRequiredStatusChecks { + /** + * (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + */ + requiredChecks: outputs.OrganizationRulesetRulesRequiredStatusChecksRequiredCheck[]; + /** + * (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + */ + strictRequiredStatusChecksPolicy?: boolean; +} + +export interface OrganizationRulesetRulesRequiredStatusChecksRequiredCheck { + /** + * (String) The status check context name that must be present on the commit. + */ + context: string; + /** + * (Number) The optional integration ID that this status check must originate from. + */ + integrationId?: number; +} + +export interface OrganizationRulesetRulesTagNamePattern { + /** + * (String) The name of the ruleset. + */ + name?: string; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: boolean; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: string; + /** + * (String) The pattern to match with. + */ + pattern: string; +} + export interface OrganizationWebhookConfiguration { contentType?: string; insecureSsl?: boolean; @@ -942,6 +1192,249 @@ export interface RepositoryPagesSource { path?: string; } +export interface RepositoryRulesetBypassActor { + /** + * (Number) The ID of the actor that can bypass a ruleset + */ + actorId: number; + /** + * The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + */ + actorType: string; + /** + * (String) When the specified actor can bypass the ruleset. pullRequest means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pullRequest`. + */ + bypassMode?: string; +} + +export interface RepositoryRulesetConditions { + /** + * (Block List, Min: 1, Max: 1) (see below for nested schema) + */ + refName: outputs.RepositoryRulesetConditionsRefName; +} + +export interface RepositoryRulesetConditionsRefName { + /** + * (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + */ + excludes: string[]; + /** + * (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + */ + includes: string[]; +} + +export interface RepositoryRulesetRules { + /** + * (Block List, Max: 1) Parameters to be used for the branchNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tagNamePattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + */ + branchNamePattern?: outputs.RepositoryRulesetRulesBranchNamePattern; + /** + * (Block List, Max: 1) Parameters to be used for the commitAuthorEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + commitAuthorEmailPattern?: outputs.RepositoryRulesetRulesCommitAuthorEmailPattern; + /** + * (Block List, Max: 1) Parameters to be used for the commitMessagePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + commitMessagePattern?: outputs.RepositoryRulesetRulesCommitMessagePattern; + /** + * (Block List, Max: 1) Parameters to be used for the committerEmailPattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + */ + committerEmailPattern?: outputs.RepositoryRulesetRulesCommitterEmailPattern; + /** + * (Boolean) Only allow users with bypass permission to create matching refs. + */ + creation?: boolean; + /** + * (Boolean) Only allow users with bypass permissions to delete matching refs. + */ + deletion?: boolean; + /** + * (Boolean) Prevent users with push access from force pushing to branches. + */ + nonFastForward?: boolean; + /** + * (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + */ + pullRequest?: outputs.RepositoryRulesetRulesPullRequest; + /** + * (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + */ + requiredDeployments?: outputs.RepositoryRulesetRulesRequiredDeployments; + /** + * (Boolean) Prevent merge commits from being pushed to matching branches. + */ + requiredLinearHistory?: boolean; + /** + * (Boolean) Commits pushed to matching branches must have verified signatures. + */ + requiredSignatures?: boolean; + /** + * (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + */ + requiredStatusChecks?: outputs.RepositoryRulesetRulesRequiredStatusChecks; + /** + * (Block List, Max: 1) Parameters to be used for the tagNamePattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branchNamePattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + */ + tagNamePattern?: outputs.RepositoryRulesetRulesTagNamePattern; + /** + * (Boolean) Only allow users with bypass permission to update matching refs. + */ + update?: boolean; + /** + * (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + */ + updateAllowsFetchAndMerge?: boolean; +} + +export interface RepositoryRulesetRulesBranchNamePattern { + /** + * (String) The name of the ruleset. + */ + name?: string; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: boolean; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: string; + /** + * (String) The pattern to match with. + */ + pattern: string; +} + +export interface RepositoryRulesetRulesCommitAuthorEmailPattern { + /** + * (String) The name of the ruleset. + */ + name?: string; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: boolean; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: string; + /** + * (String) The pattern to match with. + */ + pattern: string; +} + +export interface RepositoryRulesetRulesCommitMessagePattern { + /** + * (String) The name of the ruleset. + */ + name?: string; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: boolean; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: string; + /** + * (String) The pattern to match with. + */ + pattern: string; +} + +export interface RepositoryRulesetRulesCommitterEmailPattern { + /** + * (String) The name of the ruleset. + */ + name?: string; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: boolean; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: string; + /** + * (String) The pattern to match with. + */ + pattern: string; +} + +export interface RepositoryRulesetRulesPullRequest { + /** + * (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + */ + dismissStaleReviewsOnPush?: boolean; + /** + * (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + */ + requireCodeOwnerReview?: boolean; + /** + * (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + */ + requireLastPushApproval?: boolean; + /** + * (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + */ + requiredApprovingReviewCount?: number; + /** + * (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + */ + requiredReviewThreadResolution?: boolean; +} + +export interface RepositoryRulesetRulesRequiredDeployments { + /** + * (List of String) The environments that must be successfully deployed to before branches can be merged. + */ + requiredDeploymentEnvironments: string[]; +} + +export interface RepositoryRulesetRulesRequiredStatusChecks { + /** + * (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + */ + requiredChecks: outputs.RepositoryRulesetRulesRequiredStatusChecksRequiredCheck[]; + /** + * (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + */ + strictRequiredStatusChecksPolicy?: boolean; +} + +export interface RepositoryRulesetRulesRequiredStatusChecksRequiredCheck { + /** + * (String) The status check context name that must be present on the commit. + */ + context: string; + /** + * (Number) The optional integration ID that this status check must originate from. + */ + integrationId?: number; +} + +export interface RepositoryRulesetRulesTagNamePattern { + /** + * (String) The name of the ruleset. + */ + name?: string; + /** + * (Boolean) If true, the rule will fail if the pattern matches. + */ + negate?: boolean; + /** + * (String) The operator to use for matching. Can be one of: `startsWith`, `endsWith`, `contains`, `regex`. + */ + operator: string; + /** + * (String) The pattern to match with. + */ + pattern: string; +} + export interface RepositorySecurityAndAnalysis { /** * The advanced security configuration for the repository. See Advanced Security Configuration below for details. If a repository's visibility is `public`, advanced security is always enabled and cannot be changed, so this setting cannot be supplied. diff --git a/sdk/python/pulumi_github/__init__.py b/sdk/python/pulumi_github/__init__.py index 86a8ebb3..0e1c54f9 100644 --- a/sdk/python/pulumi_github/__init__.py +++ b/sdk/python/pulumi_github/__init__.py @@ -100,6 +100,7 @@ from .organization_block import * from .organization_custom_role import * from .organization_project import * +from .organization_ruleset import * from .organization_security_manager import * from .organization_settings import * from .organization_webhook import * @@ -120,7 +121,9 @@ from .repository_milestone import * from .repository_project import * from .repository_pull_request import * +from .repository_ruleset import * from .repository_tag_protection import * +from .repository_topics import * from .repository_webhook import * from .team import * from .team_members import * @@ -416,6 +419,14 @@ "github:index/organizationProject:OrganizationProject": "OrganizationProject" } }, + { + "pkg": "github", + "mod": "index/organizationRuleset", + "fqn": "pulumi_github", + "classes": { + "github:index/organizationRuleset:OrganizationRuleset": "OrganizationRuleset" + } + }, { "pkg": "github", "mod": "index/organizationSecurityManager", @@ -568,6 +579,14 @@ "github:index/repositoryPullRequest:RepositoryPullRequest": "RepositoryPullRequest" } }, + { + "pkg": "github", + "mod": "index/repositoryRuleset", + "fqn": "pulumi_github", + "classes": { + "github:index/repositoryRuleset:RepositoryRuleset": "RepositoryRuleset" + } + }, { "pkg": "github", "mod": "index/repositoryTagProtection", @@ -576,6 +595,14 @@ "github:index/repositoryTagProtection:RepositoryTagProtection": "RepositoryTagProtection" } }, + { + "pkg": "github", + "mod": "index/repositoryTopics", + "fqn": "pulumi_github", + "classes": { + "github:index/repositoryTopics:RepositoryTopics": "RepositoryTopics" + } + }, { "pkg": "github", "mod": "index/repositoryWebhook", diff --git a/sdk/python/pulumi_github/_inputs.py b/sdk/python/pulumi_github/_inputs.py index c6eaeee7..eabd76e2 100644 --- a/sdk/python/pulumi_github/_inputs.py +++ b/sdk/python/pulumi_github/_inputs.py @@ -19,6 +19,19 @@ 'BranchProtectionV3RequiredPullRequestReviewsBypassPullRequestAllowancesArgs', 'BranchProtectionV3RequiredStatusChecksArgs', 'BranchProtectionV3RestrictionsArgs', + 'OrganizationRulesetBypassActorArgs', + 'OrganizationRulesetConditionsArgs', + 'OrganizationRulesetConditionsRefNameArgs', + 'OrganizationRulesetConditionsRepositoryNameArgs', + 'OrganizationRulesetRulesArgs', + 'OrganizationRulesetRulesBranchNamePatternArgs', + 'OrganizationRulesetRulesCommitAuthorEmailPatternArgs', + 'OrganizationRulesetRulesCommitMessagePatternArgs', + 'OrganizationRulesetRulesCommitterEmailPatternArgs', + 'OrganizationRulesetRulesPullRequestArgs', + 'OrganizationRulesetRulesRequiredStatusChecksArgs', + 'OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs', + 'OrganizationRulesetRulesTagNamePatternArgs', 'OrganizationWebhookConfigurationArgs', 'ProviderAppAuthArgs', 'RepositoryCollaboratorsTeamArgs', @@ -27,6 +40,19 @@ 'RepositoryEnvironmentReviewerArgs', 'RepositoryPagesArgs', 'RepositoryPagesSourceArgs', + 'RepositoryRulesetBypassActorArgs', + 'RepositoryRulesetConditionsArgs', + 'RepositoryRulesetConditionsRefNameArgs', + 'RepositoryRulesetRulesArgs', + 'RepositoryRulesetRulesBranchNamePatternArgs', + 'RepositoryRulesetRulesCommitAuthorEmailPatternArgs', + 'RepositoryRulesetRulesCommitMessagePatternArgs', + 'RepositoryRulesetRulesCommitterEmailPatternArgs', + 'RepositoryRulesetRulesPullRequestArgs', + 'RepositoryRulesetRulesRequiredDeploymentsArgs', + 'RepositoryRulesetRulesRequiredStatusChecksArgs', + 'RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs', + 'RepositoryRulesetRulesTagNamePatternArgs', 'RepositorySecurityAndAnalysisArgs', 'RepositorySecurityAndAnalysisAdvancedSecurityArgs', 'RepositorySecurityAndAnalysisSecretScanningArgs', @@ -647,408 +673,2217 @@ def users(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): @pulumi.input_type -class OrganizationWebhookConfigurationArgs: +class OrganizationRulesetBypassActorArgs: def __init__(__self__, *, - url: pulumi.Input[str], - content_type: Optional[pulumi.Input[str]] = None, - insecure_ssl: Optional[pulumi.Input[bool]] = None, - secret: Optional[pulumi.Input[str]] = None): + actor_id: pulumi.Input[int], + actor_type: pulumi.Input[str], + bypass_mode: Optional[pulumi.Input[str]] = None): """ - :param pulumi.Input[str] url: URL of the webhook + :param pulumi.Input[int] actor_id: (Number) The ID of the actor that can bypass a ruleset + :param pulumi.Input[str] actor_type: The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + :param pulumi.Input[str] bypass_mode: (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. """ - pulumi.set(__self__, "url", url) - if content_type is not None: - pulumi.set(__self__, "content_type", content_type) - if insecure_ssl is not None: - pulumi.set(__self__, "insecure_ssl", insecure_ssl) - if secret is not None: - pulumi.set(__self__, "secret", secret) + pulumi.set(__self__, "actor_id", actor_id) + pulumi.set(__self__, "actor_type", actor_type) + if bypass_mode is not None: + pulumi.set(__self__, "bypass_mode", bypass_mode) @property - @pulumi.getter - def url(self) -> pulumi.Input[str]: + @pulumi.getter(name="actorId") + def actor_id(self) -> pulumi.Input[int]: """ - URL of the webhook + (Number) The ID of the actor that can bypass a ruleset """ - return pulumi.get(self, "url") - - @url.setter - def url(self, value: pulumi.Input[str]): - pulumi.set(self, "url", value) - - @property - @pulumi.getter(name="contentType") - def content_type(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "content_type") + return pulumi.get(self, "actor_id") - @content_type.setter - def content_type(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "content_type", value) + @actor_id.setter + def actor_id(self, value: pulumi.Input[int]): + pulumi.set(self, "actor_id", value) @property - @pulumi.getter(name="insecureSsl") - def insecure_ssl(self) -> Optional[pulumi.Input[bool]]: - return pulumi.get(self, "insecure_ssl") + @pulumi.getter(name="actorType") + def actor_type(self) -> pulumi.Input[str]: + """ + The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + """ + return pulumi.get(self, "actor_type") - @insecure_ssl.setter - def insecure_ssl(self, value: Optional[pulumi.Input[bool]]): - pulumi.set(self, "insecure_ssl", value) + @actor_type.setter + def actor_type(self, value: pulumi.Input[str]): + pulumi.set(self, "actor_type", value) @property - @pulumi.getter - def secret(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "secret") + @pulumi.getter(name="bypassMode") + def bypass_mode(self) -> Optional[pulumi.Input[str]]: + """ + (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + """ + return pulumi.get(self, "bypass_mode") - @secret.setter - def secret(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "secret", value) + @bypass_mode.setter + def bypass_mode(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "bypass_mode", value) @pulumi.input_type -class ProviderAppAuthArgs: +class OrganizationRulesetConditionsArgs: def __init__(__self__, *, - id: pulumi.Input[str], - installation_id: pulumi.Input[str], - pem_file: pulumi.Input[str]): - pulumi.set(__self__, "id", id) - pulumi.set(__self__, "installation_id", installation_id) - pulumi.set(__self__, "pem_file", pem_file) + ref_name: pulumi.Input['OrganizationRulesetConditionsRefNameArgs'], + repository_id: Optional[pulumi.Input[int]] = None, + repository_name: Optional[pulumi.Input['OrganizationRulesetConditionsRepositoryNameArgs']] = None): + """ + :param pulumi.Input['OrganizationRulesetConditionsRefNameArgs'] ref_name: (Block List, Min: 1, Max: 1) (see below for nested schema) + :param pulumi.Input[int] repository_id: The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + :param pulumi.Input['OrganizationRulesetConditionsRepositoryNameArgs'] repository_name: Conflicts with `repository_id`. (see below for nested schema) + + One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + """ + pulumi.set(__self__, "ref_name", ref_name) + if repository_id is not None: + pulumi.set(__self__, "repository_id", repository_id) + if repository_name is not None: + pulumi.set(__self__, "repository_name", repository_name) @property - @pulumi.getter - def id(self) -> pulumi.Input[str]: - return pulumi.get(self, "id") + @pulumi.getter(name="refName") + def ref_name(self) -> pulumi.Input['OrganizationRulesetConditionsRefNameArgs']: + """ + (Block List, Min: 1, Max: 1) (see below for nested schema) + """ + return pulumi.get(self, "ref_name") - @id.setter - def id(self, value: pulumi.Input[str]): - pulumi.set(self, "id", value) + @ref_name.setter + def ref_name(self, value: pulumi.Input['OrganizationRulesetConditionsRefNameArgs']): + pulumi.set(self, "ref_name", value) @property - @pulumi.getter(name="installationId") - def installation_id(self) -> pulumi.Input[str]: - return pulumi.get(self, "installation_id") + @pulumi.getter(name="repositoryId") + def repository_id(self) -> Optional[pulumi.Input[int]]: + """ + The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + """ + return pulumi.get(self, "repository_id") - @installation_id.setter - def installation_id(self, value: pulumi.Input[str]): - pulumi.set(self, "installation_id", value) + @repository_id.setter + def repository_id(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "repository_id", value) @property - @pulumi.getter(name="pemFile") - def pem_file(self) -> pulumi.Input[str]: - return pulumi.get(self, "pem_file") + @pulumi.getter(name="repositoryName") + def repository_name(self) -> Optional[pulumi.Input['OrganizationRulesetConditionsRepositoryNameArgs']]: + """ + Conflicts with `repository_id`. (see below for nested schema) - @pem_file.setter - def pem_file(self, value: pulumi.Input[str]): - pulumi.set(self, "pem_file", value) + One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + """ + return pulumi.get(self, "repository_name") + + @repository_name.setter + def repository_name(self, value: Optional[pulumi.Input['OrganizationRulesetConditionsRepositoryNameArgs']]): + pulumi.set(self, "repository_name", value) @pulumi.input_type -class RepositoryCollaboratorsTeamArgs: +class OrganizationRulesetConditionsRefNameArgs: def __init__(__self__, *, - team_id: pulumi.Input[str], - permission: Optional[pulumi.Input[str]] = None): + excludes: pulumi.Input[Sequence[pulumi.Input[str]]], + includes: pulumi.Input[Sequence[pulumi.Input[str]]]): """ - :param pulumi.Input[str] team_id: The GitHub team id or the GitHub team slug - :param pulumi.Input[str] permission: The permission of the outside collaborators for the repository. - Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. - Must be `push` for personal repositories. Defaults to `push`. + :param pulumi.Input[Sequence[pulumi.Input[str]]] excludes: (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + :param pulumi.Input[Sequence[pulumi.Input[str]]] includes: (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. """ - pulumi.set(__self__, "team_id", team_id) - if permission is not None: - pulumi.set(__self__, "permission", permission) + pulumi.set(__self__, "excludes", excludes) + pulumi.set(__self__, "includes", includes) @property - @pulumi.getter(name="teamId") - def team_id(self) -> pulumi.Input[str]: + @pulumi.getter + def excludes(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: """ - The GitHub team id or the GitHub team slug + (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. """ - return pulumi.get(self, "team_id") + return pulumi.get(self, "excludes") - @team_id.setter - def team_id(self, value: pulumi.Input[str]): - pulumi.set(self, "team_id", value) + @excludes.setter + def excludes(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "excludes", value) @property @pulumi.getter - def permission(self) -> Optional[pulumi.Input[str]]: + def includes(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: """ - The permission of the outside collaborators for the repository. - Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. - Must be `push` for personal repositories. Defaults to `push`. + (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. """ - return pulumi.get(self, "permission") + return pulumi.get(self, "includes") - @permission.setter - def permission(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "permission", value) + @includes.setter + def includes(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "includes", value) @pulumi.input_type -class RepositoryCollaboratorsUserArgs: +class OrganizationRulesetConditionsRepositoryNameArgs: def __init__(__self__, *, - username: pulumi.Input[str], - permission: Optional[pulumi.Input[str]] = None): + excludes: pulumi.Input[Sequence[pulumi.Input[str]]], + inlcudes: pulumi.Input[Sequence[pulumi.Input[str]]], + protected: Optional[pulumi.Input[bool]] = None): """ - :param pulumi.Input[str] permission: The permission of the outside collaborators for the repository. - Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. - Must be `push` for personal repositories. Defaults to `push`. + :param pulumi.Input[Sequence[pulumi.Input[str]]] excludes: (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + :param pulumi.Input[Sequence[pulumi.Input[str]]] inlcudes: (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. """ - pulumi.set(__self__, "username", username) - if permission is not None: - pulumi.set(__self__, "permission", permission) + pulumi.set(__self__, "excludes", excludes) + pulumi.set(__self__, "inlcudes", inlcudes) + if protected is not None: + pulumi.set(__self__, "protected", protected) @property @pulumi.getter - def username(self) -> pulumi.Input[str]: - return pulumi.get(self, "username") + def excludes(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + """ + return pulumi.get(self, "excludes") - @username.setter - def username(self, value: pulumi.Input[str]): - pulumi.set(self, "username", value) + @excludes.setter + def excludes(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "excludes", value) @property @pulumi.getter - def permission(self) -> Optional[pulumi.Input[str]]: + def inlcudes(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: """ - The permission of the outside collaborators for the repository. - Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. - Must be `push` for personal repositories. Defaults to `push`. + (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. """ - return pulumi.get(self, "permission") + return pulumi.get(self, "inlcudes") - @permission.setter - def permission(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "permission", value) + @inlcudes.setter + def inlcudes(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "inlcudes", value) + + @property + @pulumi.getter + def protected(self) -> Optional[pulumi.Input[bool]]: + return pulumi.get(self, "protected") + + @protected.setter + def protected(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "protected", value) @pulumi.input_type -class RepositoryEnvironmentDeploymentBranchPolicyArgs: +class OrganizationRulesetRulesArgs: def __init__(__self__, *, - custom_branch_policies: pulumi.Input[bool], - protected_branches: pulumi.Input[bool]): + branch_name_pattern: Optional[pulumi.Input['OrganizationRulesetRulesBranchNamePatternArgs']] = None, + commit_author_email_pattern: Optional[pulumi.Input['OrganizationRulesetRulesCommitAuthorEmailPatternArgs']] = None, + commit_message_pattern: Optional[pulumi.Input['OrganizationRulesetRulesCommitMessagePatternArgs']] = None, + committer_email_pattern: Optional[pulumi.Input['OrganizationRulesetRulesCommitterEmailPatternArgs']] = None, + creation: Optional[pulumi.Input[bool]] = None, + deletion: Optional[pulumi.Input[bool]] = None, + non_fast_forward: Optional[pulumi.Input[bool]] = None, + pull_request: Optional[pulumi.Input['OrganizationRulesetRulesPullRequestArgs']] = None, + required_linear_history: Optional[pulumi.Input[bool]] = None, + required_signatures: Optional[pulumi.Input[bool]] = None, + required_status_checks: Optional[pulumi.Input['OrganizationRulesetRulesRequiredStatusChecksArgs']] = None, + tag_name_pattern: Optional[pulumi.Input['OrganizationRulesetRulesTagNamePatternArgs']] = None, + update: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input['OrganizationRulesetRulesBranchNamePatternArgs'] branch_name_pattern: (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + :param pulumi.Input['OrganizationRulesetRulesCommitAuthorEmailPatternArgs'] commit_author_email_pattern: (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param pulumi.Input['OrganizationRulesetRulesCommitMessagePatternArgs'] commit_message_pattern: (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param pulumi.Input['OrganizationRulesetRulesCommitterEmailPatternArgs'] committer_email_pattern: (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param pulumi.Input[bool] creation: (Boolean) Only allow users with bypass permission to create matching refs. + :param pulumi.Input[bool] deletion: (Boolean) Only allow users with bypass permissions to delete matching refs. + :param pulumi.Input[bool] non_fast_forward: (Boolean) Prevent users with push access from force pushing to branches. + :param pulumi.Input['OrganizationRulesetRulesPullRequestArgs'] pull_request: (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + :param pulumi.Input[bool] required_linear_history: (Boolean) Prevent merge commits from being pushed to matching branches. + :param pulumi.Input[bool] required_signatures: (Boolean) Commits pushed to matching branches must have verified signatures. + :param pulumi.Input['OrganizationRulesetRulesRequiredStatusChecksArgs'] required_status_checks: (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + :param pulumi.Input['OrganizationRulesetRulesTagNamePatternArgs'] tag_name_pattern: (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + :param pulumi.Input[bool] update: (Boolean) Only allow users with bypass permission to update matching refs. + """ + if branch_name_pattern is not None: + pulumi.set(__self__, "branch_name_pattern", branch_name_pattern) + if commit_author_email_pattern is not None: + pulumi.set(__self__, "commit_author_email_pattern", commit_author_email_pattern) + if commit_message_pattern is not None: + pulumi.set(__self__, "commit_message_pattern", commit_message_pattern) + if committer_email_pattern is not None: + pulumi.set(__self__, "committer_email_pattern", committer_email_pattern) + if creation is not None: + pulumi.set(__self__, "creation", creation) + if deletion is not None: + pulumi.set(__self__, "deletion", deletion) + if non_fast_forward is not None: + pulumi.set(__self__, "non_fast_forward", non_fast_forward) + if pull_request is not None: + pulumi.set(__self__, "pull_request", pull_request) + if required_linear_history is not None: + pulumi.set(__self__, "required_linear_history", required_linear_history) + if required_signatures is not None: + pulumi.set(__self__, "required_signatures", required_signatures) + if required_status_checks is not None: + pulumi.set(__self__, "required_status_checks", required_status_checks) + if tag_name_pattern is not None: + pulumi.set(__self__, "tag_name_pattern", tag_name_pattern) + if update is not None: + pulumi.set(__self__, "update", update) + + @property + @pulumi.getter(name="branchNamePattern") + def branch_name_pattern(self) -> Optional[pulumi.Input['OrganizationRulesetRulesBranchNamePatternArgs']]: + """ + (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + """ + return pulumi.get(self, "branch_name_pattern") + + @branch_name_pattern.setter + def branch_name_pattern(self, value: Optional[pulumi.Input['OrganizationRulesetRulesBranchNamePatternArgs']]): + pulumi.set(self, "branch_name_pattern", value) + + @property + @pulumi.getter(name="commitAuthorEmailPattern") + def commit_author_email_pattern(self) -> Optional[pulumi.Input['OrganizationRulesetRulesCommitAuthorEmailPatternArgs']]: + """ + (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "commit_author_email_pattern") + + @commit_author_email_pattern.setter + def commit_author_email_pattern(self, value: Optional[pulumi.Input['OrganizationRulesetRulesCommitAuthorEmailPatternArgs']]): + pulumi.set(self, "commit_author_email_pattern", value) + + @property + @pulumi.getter(name="commitMessagePattern") + def commit_message_pattern(self) -> Optional[pulumi.Input['OrganizationRulesetRulesCommitMessagePatternArgs']]: + """ + (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "commit_message_pattern") + + @commit_message_pattern.setter + def commit_message_pattern(self, value: Optional[pulumi.Input['OrganizationRulesetRulesCommitMessagePatternArgs']]): + pulumi.set(self, "commit_message_pattern", value) + + @property + @pulumi.getter(name="committerEmailPattern") + def committer_email_pattern(self) -> Optional[pulumi.Input['OrganizationRulesetRulesCommitterEmailPatternArgs']]: + """ + (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "committer_email_pattern") + + @committer_email_pattern.setter + def committer_email_pattern(self, value: Optional[pulumi.Input['OrganizationRulesetRulesCommitterEmailPatternArgs']]): + pulumi.set(self, "committer_email_pattern", value) + + @property + @pulumi.getter + def creation(self) -> Optional[pulumi.Input[bool]]: """ - :param pulumi.Input[bool] custom_branch_policies: Whether only branches that match the specified name patterns can deploy to this environment. - :param pulumi.Input[bool] protected_branches: Whether only branches with branch protection rules can deploy to this environment. + (Boolean) Only allow users with bypass permission to create matching refs. """ - pulumi.set(__self__, "custom_branch_policies", custom_branch_policies) - pulumi.set(__self__, "protected_branches", protected_branches) + return pulumi.get(self, "creation") + + @creation.setter + def creation(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "creation", value) @property - @pulumi.getter(name="customBranchPolicies") - def custom_branch_policies(self) -> pulumi.Input[bool]: + @pulumi.getter + def deletion(self) -> Optional[pulumi.Input[bool]]: """ - Whether only branches that match the specified name patterns can deploy to this environment. + (Boolean) Only allow users with bypass permissions to delete matching refs. """ - return pulumi.get(self, "custom_branch_policies") + return pulumi.get(self, "deletion") - @custom_branch_policies.setter - def custom_branch_policies(self, value: pulumi.Input[bool]): - pulumi.set(self, "custom_branch_policies", value) + @deletion.setter + def deletion(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "deletion", value) @property - @pulumi.getter(name="protectedBranches") - def protected_branches(self) -> pulumi.Input[bool]: + @pulumi.getter(name="nonFastForward") + def non_fast_forward(self) -> Optional[pulumi.Input[bool]]: """ - Whether only branches with branch protection rules can deploy to this environment. + (Boolean) Prevent users with push access from force pushing to branches. """ - return pulumi.get(self, "protected_branches") + return pulumi.get(self, "non_fast_forward") - @protected_branches.setter - def protected_branches(self, value: pulumi.Input[bool]): - pulumi.set(self, "protected_branches", value) + @non_fast_forward.setter + def non_fast_forward(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "non_fast_forward", value) + @property + @pulumi.getter(name="pullRequest") + def pull_request(self) -> Optional[pulumi.Input['OrganizationRulesetRulesPullRequestArgs']]: + """ + (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + """ + return pulumi.get(self, "pull_request") -@pulumi.input_type -class RepositoryEnvironmentReviewerArgs: - def __init__(__self__, *, - teams: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, - users: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None): + @pull_request.setter + def pull_request(self, value: Optional[pulumi.Input['OrganizationRulesetRulesPullRequestArgs']]): + pulumi.set(self, "pull_request", value) + + @property + @pulumi.getter(name="requiredLinearHistory") + def required_linear_history(self) -> Optional[pulumi.Input[bool]]: """ - :param pulumi.Input[Sequence[pulumi.Input[int]]] teams: Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. - :param pulumi.Input[Sequence[pulumi.Input[int]]] users: Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + (Boolean) Prevent merge commits from being pushed to matching branches. """ - if teams is not None: - pulumi.set(__self__, "teams", teams) - if users is not None: - pulumi.set(__self__, "users", users) + return pulumi.get(self, "required_linear_history") + + @required_linear_history.setter + def required_linear_history(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "required_linear_history", value) @property - @pulumi.getter - def teams(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]: + @pulumi.getter(name="requiredSignatures") + def required_signatures(self) -> Optional[pulumi.Input[bool]]: """ - Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + (Boolean) Commits pushed to matching branches must have verified signatures. """ - return pulumi.get(self, "teams") + return pulumi.get(self, "required_signatures") - @teams.setter - def teams(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]): - pulumi.set(self, "teams", value) + @required_signatures.setter + def required_signatures(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "required_signatures", value) + + @property + @pulumi.getter(name="requiredStatusChecks") + def required_status_checks(self) -> Optional[pulumi.Input['OrganizationRulesetRulesRequiredStatusChecksArgs']]: + """ + (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + """ + return pulumi.get(self, "required_status_checks") + + @required_status_checks.setter + def required_status_checks(self, value: Optional[pulumi.Input['OrganizationRulesetRulesRequiredStatusChecksArgs']]): + pulumi.set(self, "required_status_checks", value) + + @property + @pulumi.getter(name="tagNamePattern") + def tag_name_pattern(self) -> Optional[pulumi.Input['OrganizationRulesetRulesTagNamePatternArgs']]: + """ + (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + """ + return pulumi.get(self, "tag_name_pattern") + + @tag_name_pattern.setter + def tag_name_pattern(self, value: Optional[pulumi.Input['OrganizationRulesetRulesTagNamePatternArgs']]): + pulumi.set(self, "tag_name_pattern", value) @property @pulumi.getter - def users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]: + def update(self) -> Optional[pulumi.Input[bool]]: """ - Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + (Boolean) Only allow users with bypass permission to update matching refs. """ - return pulumi.get(self, "users") + return pulumi.get(self, "update") - @users.setter - def users(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]): - pulumi.set(self, "users", value) + @update.setter + def update(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "update", value) @pulumi.input_type -class RepositoryPagesArgs: +class OrganizationRulesetRulesBranchNamePatternArgs: def __init__(__self__, *, - build_type: Optional[pulumi.Input[str]] = None, - cname: Optional[pulumi.Input[str]] = None, - custom404: Optional[pulumi.Input[bool]] = None, - html_url: Optional[pulumi.Input[str]] = None, - source: Optional[pulumi.Input['RepositoryPagesSourceArgs']] = None, - status: Optional[pulumi.Input[str]] = None, - url: Optional[pulumi.Input[str]] = None): + operator: pulumi.Input[str], + pattern: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + negate: Optional[pulumi.Input[bool]] = None): """ - :param pulumi.Input[str] build_type: The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. - :param pulumi.Input[str] cname: The custom domain for the repository. This can only be set after the repository has been created. - :param pulumi.Input[bool] custom404: Whether the rendered GitHub Pages site has a custom 404 page. - :param pulumi.Input[str] html_url: The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. - :param pulumi.Input['RepositoryPagesSourceArgs'] source: The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. - :param pulumi.Input[str] status: Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. + :param pulumi.Input[str] operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param pulumi.Input[str] pattern: (String) The pattern to match with. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[bool] negate: (Boolean) If true, the rule will fail if the pattern matches. """ - if build_type is not None: - pulumi.set(__self__, "build_type", build_type) - if cname is not None: - pulumi.set(__self__, "cname", cname) - if custom404 is not None: - pulumi.set(__self__, "custom404", custom404) - if html_url is not None: - pulumi.set(__self__, "html_url", html_url) - if source is not None: - pulumi.set(__self__, "source", source) - if status is not None: - pulumi.set(__self__, "status", status) - if url is not None: - pulumi.set(__self__, "url", url) + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) @property - @pulumi.getter(name="buildType") - def build_type(self) -> Optional[pulumi.Input[str]]: + @pulumi.getter + def operator(self) -> pulumi.Input[str]: """ - The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. """ - return pulumi.get(self, "build_type") + return pulumi.get(self, "operator") - @build_type.setter - def build_type(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "build_type", value) + @operator.setter + def operator(self, value: pulumi.Input[str]): + pulumi.set(self, "operator", value) @property @pulumi.getter - def cname(self) -> Optional[pulumi.Input[str]]: + def pattern(self) -> pulumi.Input[str]: """ - The custom domain for the repository. This can only be set after the repository has been created. + (String) The pattern to match with. """ - return pulumi.get(self, "cname") + return pulumi.get(self, "pattern") - @cname.setter - def cname(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "cname", value) + @pattern.setter + def pattern(self, value: pulumi.Input[str]): + pulumi.set(self, "pattern", value) @property @pulumi.getter - def custom404(self) -> Optional[pulumi.Input[bool]]: + def name(self) -> Optional[pulumi.Input[str]]: """ - Whether the rendered GitHub Pages site has a custom 404 page. + (String) The name of the ruleset. """ - return pulumi.get(self, "custom404") + return pulumi.get(self, "name") - @custom404.setter - def custom404(self, value: Optional[pulumi.Input[bool]]): - pulumi.set(self, "custom404", value) + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) @property - @pulumi.getter(name="htmlUrl") - def html_url(self) -> Optional[pulumi.Input[str]]: + @pulumi.getter + def negate(self) -> Optional[pulumi.Input[bool]]: """ - The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. + (Boolean) If true, the rule will fail if the pattern matches. """ - return pulumi.get(self, "html_url") + return pulumi.get(self, "negate") - @html_url.setter - def html_url(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "html_url", value) + @negate.setter + def negate(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "negate", value) + + +@pulumi.input_type +class OrganizationRulesetRulesCommitAuthorEmailPatternArgs: + def __init__(__self__, *, + operator: pulumi.Input[str], + pattern: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + negate: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param pulumi.Input[str] pattern: (String) The pattern to match with. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[bool] negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> pulumi.Input[str]: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @operator.setter + def operator(self, value: pulumi.Input[str]): + pulumi.set(self, "operator", value) + + @property + @pulumi.getter + def pattern(self) -> pulumi.Input[str]: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @pattern.setter + def pattern(self, value: pulumi.Input[str]): + pulumi.set(self, "pattern", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def negate(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + @negate.setter + def negate(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "negate", value) + + +@pulumi.input_type +class OrganizationRulesetRulesCommitMessagePatternArgs: + def __init__(__self__, *, + operator: pulumi.Input[str], + pattern: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + negate: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param pulumi.Input[str] pattern: (String) The pattern to match with. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[bool] negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> pulumi.Input[str]: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @operator.setter + def operator(self, value: pulumi.Input[str]): + pulumi.set(self, "operator", value) + + @property + @pulumi.getter + def pattern(self) -> pulumi.Input[str]: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @pattern.setter + def pattern(self, value: pulumi.Input[str]): + pulumi.set(self, "pattern", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def negate(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + @negate.setter + def negate(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "negate", value) + + +@pulumi.input_type +class OrganizationRulesetRulesCommitterEmailPatternArgs: + def __init__(__self__, *, + operator: pulumi.Input[str], + pattern: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + negate: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param pulumi.Input[str] pattern: (String) The pattern to match with. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[bool] negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> pulumi.Input[str]: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @operator.setter + def operator(self, value: pulumi.Input[str]): + pulumi.set(self, "operator", value) + + @property + @pulumi.getter + def pattern(self) -> pulumi.Input[str]: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @pattern.setter + def pattern(self, value: pulumi.Input[str]): + pulumi.set(self, "pattern", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def negate(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + @negate.setter + def negate(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "negate", value) + + +@pulumi.input_type +class OrganizationRulesetRulesPullRequestArgs: + def __init__(__self__, *, + dismiss_stale_reviews_on_push: Optional[pulumi.Input[bool]] = None, + require_code_owner_review: Optional[pulumi.Input[bool]] = None, + require_last_push_approval: Optional[pulumi.Input[bool]] = None, + required_approving_review_count: Optional[pulumi.Input[int]] = None, + required_review_thread_resolution: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[bool] dismiss_stale_reviews_on_push: (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + :param pulumi.Input[bool] require_code_owner_review: (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + :param pulumi.Input[bool] require_last_push_approval: (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + :param pulumi.Input[int] required_approving_review_count: (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + :param pulumi.Input[bool] required_review_thread_resolution: (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + """ + if dismiss_stale_reviews_on_push is not None: + pulumi.set(__self__, "dismiss_stale_reviews_on_push", dismiss_stale_reviews_on_push) + if require_code_owner_review is not None: + pulumi.set(__self__, "require_code_owner_review", require_code_owner_review) + if require_last_push_approval is not None: + pulumi.set(__self__, "require_last_push_approval", require_last_push_approval) + if required_approving_review_count is not None: + pulumi.set(__self__, "required_approving_review_count", required_approving_review_count) + if required_review_thread_resolution is not None: + pulumi.set(__self__, "required_review_thread_resolution", required_review_thread_resolution) + + @property + @pulumi.getter(name="dismissStaleReviewsOnPush") + def dismiss_stale_reviews_on_push(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + """ + return pulumi.get(self, "dismiss_stale_reviews_on_push") + + @dismiss_stale_reviews_on_push.setter + def dismiss_stale_reviews_on_push(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "dismiss_stale_reviews_on_push", value) + + @property + @pulumi.getter(name="requireCodeOwnerReview") + def require_code_owner_review(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + """ + return pulumi.get(self, "require_code_owner_review") + + @require_code_owner_review.setter + def require_code_owner_review(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "require_code_owner_review", value) + + @property + @pulumi.getter(name="requireLastPushApproval") + def require_last_push_approval(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + """ + return pulumi.get(self, "require_last_push_approval") + + @require_last_push_approval.setter + def require_last_push_approval(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "require_last_push_approval", value) + + @property + @pulumi.getter(name="requiredApprovingReviewCount") + def required_approving_review_count(self) -> Optional[pulumi.Input[int]]: + """ + (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + """ + return pulumi.get(self, "required_approving_review_count") + + @required_approving_review_count.setter + def required_approving_review_count(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "required_approving_review_count", value) + + @property + @pulumi.getter(name="requiredReviewThreadResolution") + def required_review_thread_resolution(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + """ + return pulumi.get(self, "required_review_thread_resolution") + + @required_review_thread_resolution.setter + def required_review_thread_resolution(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "required_review_thread_resolution", value) + + +@pulumi.input_type +class OrganizationRulesetRulesRequiredStatusChecksArgs: + def __init__(__self__, *, + required_checks: pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs']]], + strict_required_status_checks_policy: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs']]] required_checks: (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + :param pulumi.Input[bool] strict_required_status_checks_policy: (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + """ + pulumi.set(__self__, "required_checks", required_checks) + if strict_required_status_checks_policy is not None: + pulumi.set(__self__, "strict_required_status_checks_policy", strict_required_status_checks_policy) + + @property + @pulumi.getter(name="requiredChecks") + def required_checks(self) -> pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs']]]: + """ + (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + """ + return pulumi.get(self, "required_checks") + + @required_checks.setter + def required_checks(self, value: pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs']]]): + pulumi.set(self, "required_checks", value) + + @property + @pulumi.getter(name="strictRequiredStatusChecksPolicy") + def strict_required_status_checks_policy(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + """ + return pulumi.get(self, "strict_required_status_checks_policy") + + @strict_required_status_checks_policy.setter + def strict_required_status_checks_policy(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "strict_required_status_checks_policy", value) + + +@pulumi.input_type +class OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs: + def __init__(__self__, *, + context: pulumi.Input[str], + integration_id: Optional[pulumi.Input[int]] = None): + """ + :param pulumi.Input[str] context: (String) The status check context name that must be present on the commit. + :param pulumi.Input[int] integration_id: (Number) The optional integration ID that this status check must originate from. + """ + pulumi.set(__self__, "context", context) + if integration_id is not None: + pulumi.set(__self__, "integration_id", integration_id) + + @property + @pulumi.getter + def context(self) -> pulumi.Input[str]: + """ + (String) The status check context name that must be present on the commit. + """ + return pulumi.get(self, "context") + + @context.setter + def context(self, value: pulumi.Input[str]): + pulumi.set(self, "context", value) + + @property + @pulumi.getter(name="integrationId") + def integration_id(self) -> Optional[pulumi.Input[int]]: + """ + (Number) The optional integration ID that this status check must originate from. + """ + return pulumi.get(self, "integration_id") + + @integration_id.setter + def integration_id(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "integration_id", value) + + +@pulumi.input_type +class OrganizationRulesetRulesTagNamePatternArgs: + def __init__(__self__, *, + operator: pulumi.Input[str], + pattern: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + negate: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param pulumi.Input[str] pattern: (String) The pattern to match with. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[bool] negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> pulumi.Input[str]: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @operator.setter + def operator(self, value: pulumi.Input[str]): + pulumi.set(self, "operator", value) + + @property + @pulumi.getter + def pattern(self) -> pulumi.Input[str]: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @pattern.setter + def pattern(self, value: pulumi.Input[str]): + pulumi.set(self, "pattern", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def negate(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + @negate.setter + def negate(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "negate", value) + + +@pulumi.input_type +class OrganizationWebhookConfigurationArgs: + def __init__(__self__, *, + url: pulumi.Input[str], + content_type: Optional[pulumi.Input[str]] = None, + insecure_ssl: Optional[pulumi.Input[bool]] = None, + secret: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] url: URL of the webhook + """ + pulumi.set(__self__, "url", url) + if content_type is not None: + pulumi.set(__self__, "content_type", content_type) + if insecure_ssl is not None: + pulumi.set(__self__, "insecure_ssl", insecure_ssl) + if secret is not None: + pulumi.set(__self__, "secret", secret) + + @property + @pulumi.getter + def url(self) -> pulumi.Input[str]: + """ + URL of the webhook + """ + return pulumi.get(self, "url") + + @url.setter + def url(self, value: pulumi.Input[str]): + pulumi.set(self, "url", value) + + @property + @pulumi.getter(name="contentType") + def content_type(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "content_type") + + @content_type.setter + def content_type(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "content_type", value) + + @property + @pulumi.getter(name="insecureSsl") + def insecure_ssl(self) -> Optional[pulumi.Input[bool]]: + return pulumi.get(self, "insecure_ssl") + + @insecure_ssl.setter + def insecure_ssl(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "insecure_ssl", value) + + @property + @pulumi.getter + def secret(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "secret") + + @secret.setter + def secret(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "secret", value) + + +@pulumi.input_type +class ProviderAppAuthArgs: + def __init__(__self__, *, + id: pulumi.Input[str], + installation_id: pulumi.Input[str], + pem_file: pulumi.Input[str]): + pulumi.set(__self__, "id", id) + pulumi.set(__self__, "installation_id", installation_id) + pulumi.set(__self__, "pem_file", pem_file) + + @property + @pulumi.getter + def id(self) -> pulumi.Input[str]: + return pulumi.get(self, "id") + + @id.setter + def id(self, value: pulumi.Input[str]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="installationId") + def installation_id(self) -> pulumi.Input[str]: + return pulumi.get(self, "installation_id") + + @installation_id.setter + def installation_id(self, value: pulumi.Input[str]): + pulumi.set(self, "installation_id", value) + + @property + @pulumi.getter(name="pemFile") + def pem_file(self) -> pulumi.Input[str]: + return pulumi.get(self, "pem_file") + + @pem_file.setter + def pem_file(self, value: pulumi.Input[str]): + pulumi.set(self, "pem_file", value) + + +@pulumi.input_type +class RepositoryCollaboratorsTeamArgs: + def __init__(__self__, *, + team_id: pulumi.Input[str], + permission: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] team_id: The GitHub team id or the GitHub team slug + :param pulumi.Input[str] permission: The permission of the outside collaborators for the repository. + Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. + Must be `push` for personal repositories. Defaults to `push`. + """ + pulumi.set(__self__, "team_id", team_id) + if permission is not None: + pulumi.set(__self__, "permission", permission) + + @property + @pulumi.getter(name="teamId") + def team_id(self) -> pulumi.Input[str]: + """ + The GitHub team id or the GitHub team slug + """ + return pulumi.get(self, "team_id") + + @team_id.setter + def team_id(self, value: pulumi.Input[str]): + pulumi.set(self, "team_id", value) + + @property + @pulumi.getter + def permission(self) -> Optional[pulumi.Input[str]]: + """ + The permission of the outside collaborators for the repository. + Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. + Must be `push` for personal repositories. Defaults to `push`. + """ + return pulumi.get(self, "permission") + + @permission.setter + def permission(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "permission", value) + + +@pulumi.input_type +class RepositoryCollaboratorsUserArgs: + def __init__(__self__, *, + username: pulumi.Input[str], + permission: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] permission: The permission of the outside collaborators for the repository. + Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. + Must be `push` for personal repositories. Defaults to `push`. + """ + pulumi.set(__self__, "username", username) + if permission is not None: + pulumi.set(__self__, "permission", permission) + + @property + @pulumi.getter + def username(self) -> pulumi.Input[str]: + return pulumi.get(self, "username") + + @username.setter + def username(self, value: pulumi.Input[str]): + pulumi.set(self, "username", value) + + @property + @pulumi.getter + def permission(self) -> Optional[pulumi.Input[str]]: + """ + The permission of the outside collaborators for the repository. + Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. + Must be `push` for personal repositories. Defaults to `push`. + """ + return pulumi.get(self, "permission") + + @permission.setter + def permission(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "permission", value) + + +@pulumi.input_type +class RepositoryEnvironmentDeploymentBranchPolicyArgs: + def __init__(__self__, *, + custom_branch_policies: pulumi.Input[bool], + protected_branches: pulumi.Input[bool]): + """ + :param pulumi.Input[bool] custom_branch_policies: Whether only branches that match the specified name patterns can deploy to this environment. + :param pulumi.Input[bool] protected_branches: Whether only branches with branch protection rules can deploy to this environment. + """ + pulumi.set(__self__, "custom_branch_policies", custom_branch_policies) + pulumi.set(__self__, "protected_branches", protected_branches) + + @property + @pulumi.getter(name="customBranchPolicies") + def custom_branch_policies(self) -> pulumi.Input[bool]: + """ + Whether only branches that match the specified name patterns can deploy to this environment. + """ + return pulumi.get(self, "custom_branch_policies") + + @custom_branch_policies.setter + def custom_branch_policies(self, value: pulumi.Input[bool]): + pulumi.set(self, "custom_branch_policies", value) + + @property + @pulumi.getter(name="protectedBranches") + def protected_branches(self) -> pulumi.Input[bool]: + """ + Whether only branches with branch protection rules can deploy to this environment. + """ + return pulumi.get(self, "protected_branches") + + @protected_branches.setter + def protected_branches(self, value: pulumi.Input[bool]): + pulumi.set(self, "protected_branches", value) + + +@pulumi.input_type +class RepositoryEnvironmentReviewerArgs: + def __init__(__self__, *, + teams: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + users: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None): + """ + :param pulumi.Input[Sequence[pulumi.Input[int]]] teams: Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + :param pulumi.Input[Sequence[pulumi.Input[int]]] users: Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + """ + if teams is not None: + pulumi.set(__self__, "teams", teams) + if users is not None: + pulumi.set(__self__, "users", users) + + @property + @pulumi.getter + def teams(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]: + """ + Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + """ + return pulumi.get(self, "teams") + + @teams.setter + def teams(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]): + pulumi.set(self, "teams", value) + + @property + @pulumi.getter + def users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]: + """ + Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + """ + return pulumi.get(self, "users") + + @users.setter + def users(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]): + pulumi.set(self, "users", value) + + +@pulumi.input_type +class RepositoryPagesArgs: + def __init__(__self__, *, + build_type: Optional[pulumi.Input[str]] = None, + cname: Optional[pulumi.Input[str]] = None, + custom404: Optional[pulumi.Input[bool]] = None, + html_url: Optional[pulumi.Input[str]] = None, + source: Optional[pulumi.Input['RepositoryPagesSourceArgs']] = None, + status: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] build_type: The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. + :param pulumi.Input[str] cname: The custom domain for the repository. This can only be set after the repository has been created. + :param pulumi.Input[bool] custom404: Whether the rendered GitHub Pages site has a custom 404 page. + :param pulumi.Input[str] html_url: The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. + :param pulumi.Input['RepositoryPagesSourceArgs'] source: The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + :param pulumi.Input[str] status: Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. + """ + if build_type is not None: + pulumi.set(__self__, "build_type", build_type) + if cname is not None: + pulumi.set(__self__, "cname", cname) + if custom404 is not None: + pulumi.set(__self__, "custom404", custom404) + if html_url is not None: + pulumi.set(__self__, "html_url", html_url) + if source is not None: + pulumi.set(__self__, "source", source) + if status is not None: + pulumi.set(__self__, "status", status) + if url is not None: + pulumi.set(__self__, "url", url) + + @property + @pulumi.getter(name="buildType") + def build_type(self) -> Optional[pulumi.Input[str]]: + """ + The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. + """ + return pulumi.get(self, "build_type") + + @build_type.setter + def build_type(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "build_type", value) + + @property + @pulumi.getter + def cname(self) -> Optional[pulumi.Input[str]]: + """ + The custom domain for the repository. This can only be set after the repository has been created. + """ + return pulumi.get(self, "cname") + + @cname.setter + def cname(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "cname", value) + + @property + @pulumi.getter + def custom404(self) -> Optional[pulumi.Input[bool]]: + """ + Whether the rendered GitHub Pages site has a custom 404 page. + """ + return pulumi.get(self, "custom404") + + @custom404.setter + def custom404(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "custom404", value) + + @property + @pulumi.getter(name="htmlUrl") + def html_url(self) -> Optional[pulumi.Input[str]]: + """ + The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. + """ + return pulumi.get(self, "html_url") + + @html_url.setter + def html_url(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "html_url", value) + + @property + @pulumi.getter + def source(self) -> Optional[pulumi.Input['RepositoryPagesSourceArgs']]: + """ + The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + """ + return pulumi.get(self, "source") + + @source.setter + def source(self, value: Optional[pulumi.Input['RepositoryPagesSourceArgs']]): + pulumi.set(self, "source", value) + + @property + @pulumi.getter + def status(self) -> Optional[pulumi.Input[str]]: + """ + Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. + """ + return pulumi.get(self, "status") + + @status.setter + def status(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "status", value) + + @property + @pulumi.getter + def url(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "url") + + @url.setter + def url(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "url", value) + + +@pulumi.input_type +class RepositoryPagesSourceArgs: + def __init__(__self__, *, + branch: pulumi.Input[str], + path: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] branch: The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. + :param pulumi.Input[str] path: The repository directory from which the site publishes (Default: `/`). + """ + pulumi.set(__self__, "branch", branch) + if path is not None: + pulumi.set(__self__, "path", path) + + @property + @pulumi.getter + def branch(self) -> pulumi.Input[str]: + """ + The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. + """ + return pulumi.get(self, "branch") + + @branch.setter + def branch(self, value: pulumi.Input[str]): + pulumi.set(self, "branch", value) + + @property + @pulumi.getter + def path(self) -> Optional[pulumi.Input[str]]: + """ + The repository directory from which the site publishes (Default: `/`). + """ + return pulumi.get(self, "path") + + @path.setter + def path(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "path", value) + + +@pulumi.input_type +class RepositoryRulesetBypassActorArgs: + def __init__(__self__, *, + actor_id: pulumi.Input[int], + actor_type: pulumi.Input[str], + bypass_mode: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[int] actor_id: (Number) The ID of the actor that can bypass a ruleset + :param pulumi.Input[str] actor_type: The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + :param pulumi.Input[str] bypass_mode: (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + """ + pulumi.set(__self__, "actor_id", actor_id) + pulumi.set(__self__, "actor_type", actor_type) + if bypass_mode is not None: + pulumi.set(__self__, "bypass_mode", bypass_mode) + + @property + @pulumi.getter(name="actorId") + def actor_id(self) -> pulumi.Input[int]: + """ + (Number) The ID of the actor that can bypass a ruleset + """ + return pulumi.get(self, "actor_id") + + @actor_id.setter + def actor_id(self, value: pulumi.Input[int]): + pulumi.set(self, "actor_id", value) + + @property + @pulumi.getter(name="actorType") + def actor_type(self) -> pulumi.Input[str]: + """ + The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + """ + return pulumi.get(self, "actor_type") + + @actor_type.setter + def actor_type(self, value: pulumi.Input[str]): + pulumi.set(self, "actor_type", value) + + @property + @pulumi.getter(name="bypassMode") + def bypass_mode(self) -> Optional[pulumi.Input[str]]: + """ + (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + """ + return pulumi.get(self, "bypass_mode") + + @bypass_mode.setter + def bypass_mode(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "bypass_mode", value) + + +@pulumi.input_type +class RepositoryRulesetConditionsArgs: + def __init__(__self__, *, + ref_name: pulumi.Input['RepositoryRulesetConditionsRefNameArgs']): + """ + :param pulumi.Input['RepositoryRulesetConditionsRefNameArgs'] ref_name: (Block List, Min: 1, Max: 1) (see below for nested schema) + """ + pulumi.set(__self__, "ref_name", ref_name) + + @property + @pulumi.getter(name="refName") + def ref_name(self) -> pulumi.Input['RepositoryRulesetConditionsRefNameArgs']: + """ + (Block List, Min: 1, Max: 1) (see below for nested schema) + """ + return pulumi.get(self, "ref_name") + + @ref_name.setter + def ref_name(self, value: pulumi.Input['RepositoryRulesetConditionsRefNameArgs']): + pulumi.set(self, "ref_name", value) + + +@pulumi.input_type +class RepositoryRulesetConditionsRefNameArgs: + def __init__(__self__, *, + excludes: pulumi.Input[Sequence[pulumi.Input[str]]], + includes: pulumi.Input[Sequence[pulumi.Input[str]]]): + """ + :param pulumi.Input[Sequence[pulumi.Input[str]]] excludes: (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + :param pulumi.Input[Sequence[pulumi.Input[str]]] includes: (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + """ + pulumi.set(__self__, "excludes", excludes) + pulumi.set(__self__, "includes", includes) + + @property + @pulumi.getter + def excludes(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + """ + return pulumi.get(self, "excludes") + + @excludes.setter + def excludes(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "excludes", value) + + @property + @pulumi.getter + def includes(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + """ + return pulumi.get(self, "includes") + + @includes.setter + def includes(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "includes", value) + + +@pulumi.input_type +class RepositoryRulesetRulesArgs: + def __init__(__self__, *, + branch_name_pattern: Optional[pulumi.Input['RepositoryRulesetRulesBranchNamePatternArgs']] = None, + commit_author_email_pattern: Optional[pulumi.Input['RepositoryRulesetRulesCommitAuthorEmailPatternArgs']] = None, + commit_message_pattern: Optional[pulumi.Input['RepositoryRulesetRulesCommitMessagePatternArgs']] = None, + committer_email_pattern: Optional[pulumi.Input['RepositoryRulesetRulesCommitterEmailPatternArgs']] = None, + creation: Optional[pulumi.Input[bool]] = None, + deletion: Optional[pulumi.Input[bool]] = None, + non_fast_forward: Optional[pulumi.Input[bool]] = None, + pull_request: Optional[pulumi.Input['RepositoryRulesetRulesPullRequestArgs']] = None, + required_deployments: Optional[pulumi.Input['RepositoryRulesetRulesRequiredDeploymentsArgs']] = None, + required_linear_history: Optional[pulumi.Input[bool]] = None, + required_signatures: Optional[pulumi.Input[bool]] = None, + required_status_checks: Optional[pulumi.Input['RepositoryRulesetRulesRequiredStatusChecksArgs']] = None, + tag_name_pattern: Optional[pulumi.Input['RepositoryRulesetRulesTagNamePatternArgs']] = None, + update: Optional[pulumi.Input[bool]] = None, + update_allows_fetch_and_merge: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input['RepositoryRulesetRulesBranchNamePatternArgs'] branch_name_pattern: (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + :param pulumi.Input['RepositoryRulesetRulesCommitAuthorEmailPatternArgs'] commit_author_email_pattern: (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param pulumi.Input['RepositoryRulesetRulesCommitMessagePatternArgs'] commit_message_pattern: (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param pulumi.Input['RepositoryRulesetRulesCommitterEmailPatternArgs'] committer_email_pattern: (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param pulumi.Input[bool] creation: (Boolean) Only allow users with bypass permission to create matching refs. + :param pulumi.Input[bool] deletion: (Boolean) Only allow users with bypass permissions to delete matching refs. + :param pulumi.Input[bool] non_fast_forward: (Boolean) Prevent users with push access from force pushing to branches. + :param pulumi.Input['RepositoryRulesetRulesPullRequestArgs'] pull_request: (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + :param pulumi.Input['RepositoryRulesetRulesRequiredDeploymentsArgs'] required_deployments: (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + :param pulumi.Input[bool] required_linear_history: (Boolean) Prevent merge commits from being pushed to matching branches. + :param pulumi.Input[bool] required_signatures: (Boolean) Commits pushed to matching branches must have verified signatures. + :param pulumi.Input['RepositoryRulesetRulesRequiredStatusChecksArgs'] required_status_checks: (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + :param pulumi.Input['RepositoryRulesetRulesTagNamePatternArgs'] tag_name_pattern: (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + :param pulumi.Input[bool] update: (Boolean) Only allow users with bypass permission to update matching refs. + :param pulumi.Input[bool] update_allows_fetch_and_merge: (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + """ + if branch_name_pattern is not None: + pulumi.set(__self__, "branch_name_pattern", branch_name_pattern) + if commit_author_email_pattern is not None: + pulumi.set(__self__, "commit_author_email_pattern", commit_author_email_pattern) + if commit_message_pattern is not None: + pulumi.set(__self__, "commit_message_pattern", commit_message_pattern) + if committer_email_pattern is not None: + pulumi.set(__self__, "committer_email_pattern", committer_email_pattern) + if creation is not None: + pulumi.set(__self__, "creation", creation) + if deletion is not None: + pulumi.set(__self__, "deletion", deletion) + if non_fast_forward is not None: + pulumi.set(__self__, "non_fast_forward", non_fast_forward) + if pull_request is not None: + pulumi.set(__self__, "pull_request", pull_request) + if required_deployments is not None: + pulumi.set(__self__, "required_deployments", required_deployments) + if required_linear_history is not None: + pulumi.set(__self__, "required_linear_history", required_linear_history) + if required_signatures is not None: + pulumi.set(__self__, "required_signatures", required_signatures) + if required_status_checks is not None: + pulumi.set(__self__, "required_status_checks", required_status_checks) + if tag_name_pattern is not None: + pulumi.set(__self__, "tag_name_pattern", tag_name_pattern) + if update is not None: + pulumi.set(__self__, "update", update) + if update_allows_fetch_and_merge is not None: + pulumi.set(__self__, "update_allows_fetch_and_merge", update_allows_fetch_and_merge) + + @property + @pulumi.getter(name="branchNamePattern") + def branch_name_pattern(self) -> Optional[pulumi.Input['RepositoryRulesetRulesBranchNamePatternArgs']]: + """ + (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + """ + return pulumi.get(self, "branch_name_pattern") + + @branch_name_pattern.setter + def branch_name_pattern(self, value: Optional[pulumi.Input['RepositoryRulesetRulesBranchNamePatternArgs']]): + pulumi.set(self, "branch_name_pattern", value) + + @property + @pulumi.getter(name="commitAuthorEmailPattern") + def commit_author_email_pattern(self) -> Optional[pulumi.Input['RepositoryRulesetRulesCommitAuthorEmailPatternArgs']]: + """ + (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "commit_author_email_pattern") + + @commit_author_email_pattern.setter + def commit_author_email_pattern(self, value: Optional[pulumi.Input['RepositoryRulesetRulesCommitAuthorEmailPatternArgs']]): + pulumi.set(self, "commit_author_email_pattern", value) + + @property + @pulumi.getter(name="commitMessagePattern") + def commit_message_pattern(self) -> Optional[pulumi.Input['RepositoryRulesetRulesCommitMessagePatternArgs']]: + """ + (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "commit_message_pattern") + + @commit_message_pattern.setter + def commit_message_pattern(self, value: Optional[pulumi.Input['RepositoryRulesetRulesCommitMessagePatternArgs']]): + pulumi.set(self, "commit_message_pattern", value) + + @property + @pulumi.getter(name="committerEmailPattern") + def committer_email_pattern(self) -> Optional[pulumi.Input['RepositoryRulesetRulesCommitterEmailPatternArgs']]: + """ + (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "committer_email_pattern") + + @committer_email_pattern.setter + def committer_email_pattern(self, value: Optional[pulumi.Input['RepositoryRulesetRulesCommitterEmailPatternArgs']]): + pulumi.set(self, "committer_email_pattern", value) + + @property + @pulumi.getter + def creation(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Only allow users with bypass permission to create matching refs. + """ + return pulumi.get(self, "creation") + + @creation.setter + def creation(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "creation", value) + + @property + @pulumi.getter + def deletion(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Only allow users with bypass permissions to delete matching refs. + """ + return pulumi.get(self, "deletion") + + @deletion.setter + def deletion(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "deletion", value) + + @property + @pulumi.getter(name="nonFastForward") + def non_fast_forward(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Prevent users with push access from force pushing to branches. + """ + return pulumi.get(self, "non_fast_forward") + + @non_fast_forward.setter + def non_fast_forward(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "non_fast_forward", value) + + @property + @pulumi.getter(name="pullRequest") + def pull_request(self) -> Optional[pulumi.Input['RepositoryRulesetRulesPullRequestArgs']]: + """ + (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + """ + return pulumi.get(self, "pull_request") + + @pull_request.setter + def pull_request(self, value: Optional[pulumi.Input['RepositoryRulesetRulesPullRequestArgs']]): + pulumi.set(self, "pull_request", value) + + @property + @pulumi.getter(name="requiredDeployments") + def required_deployments(self) -> Optional[pulumi.Input['RepositoryRulesetRulesRequiredDeploymentsArgs']]: + """ + (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + """ + return pulumi.get(self, "required_deployments") + + @required_deployments.setter + def required_deployments(self, value: Optional[pulumi.Input['RepositoryRulesetRulesRequiredDeploymentsArgs']]): + pulumi.set(self, "required_deployments", value) + + @property + @pulumi.getter(name="requiredLinearHistory") + def required_linear_history(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Prevent merge commits from being pushed to matching branches. + """ + return pulumi.get(self, "required_linear_history") + + @required_linear_history.setter + def required_linear_history(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "required_linear_history", value) + + @property + @pulumi.getter(name="requiredSignatures") + def required_signatures(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Commits pushed to matching branches must have verified signatures. + """ + return pulumi.get(self, "required_signatures") + + @required_signatures.setter + def required_signatures(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "required_signatures", value) + + @property + @pulumi.getter(name="requiredStatusChecks") + def required_status_checks(self) -> Optional[pulumi.Input['RepositoryRulesetRulesRequiredStatusChecksArgs']]: + """ + (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + """ + return pulumi.get(self, "required_status_checks") + + @required_status_checks.setter + def required_status_checks(self, value: Optional[pulumi.Input['RepositoryRulesetRulesRequiredStatusChecksArgs']]): + pulumi.set(self, "required_status_checks", value) + + @property + @pulumi.getter(name="tagNamePattern") + def tag_name_pattern(self) -> Optional[pulumi.Input['RepositoryRulesetRulesTagNamePatternArgs']]: + """ + (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + """ + return pulumi.get(self, "tag_name_pattern") + + @tag_name_pattern.setter + def tag_name_pattern(self, value: Optional[pulumi.Input['RepositoryRulesetRulesTagNamePatternArgs']]): + pulumi.set(self, "tag_name_pattern", value) @property @pulumi.getter - def source(self) -> Optional[pulumi.Input['RepositoryPagesSourceArgs']]: + def update(self) -> Optional[pulumi.Input[bool]]: """ - The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + (Boolean) Only allow users with bypass permission to update matching refs. """ - return pulumi.get(self, "source") + return pulumi.get(self, "update") - @source.setter - def source(self, value: Optional[pulumi.Input['RepositoryPagesSourceArgs']]): - pulumi.set(self, "source", value) + @update.setter + def update(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "update", value) + + @property + @pulumi.getter(name="updateAllowsFetchAndMerge") + def update_allows_fetch_and_merge(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + """ + return pulumi.get(self, "update_allows_fetch_and_merge") + + @update_allows_fetch_and_merge.setter + def update_allows_fetch_and_merge(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "update_allows_fetch_and_merge", value) + + +@pulumi.input_type +class RepositoryRulesetRulesBranchNamePatternArgs: + def __init__(__self__, *, + operator: pulumi.Input[str], + pattern: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + negate: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param pulumi.Input[str] pattern: (String) The pattern to match with. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[bool] negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) @property @pulumi.getter - def status(self) -> Optional[pulumi.Input[str]]: + def operator(self) -> pulumi.Input[str]: """ - Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. """ - return pulumi.get(self, "status") + return pulumi.get(self, "operator") - @status.setter - def status(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "status", value) + @operator.setter + def operator(self, value: pulumi.Input[str]): + pulumi.set(self, "operator", value) @property @pulumi.getter - def url(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "url") + def pattern(self) -> pulumi.Input[str]: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") - @url.setter - def url(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "url", value) + @pattern.setter + def pattern(self, value: pulumi.Input[str]): + pulumi.set(self, "pattern", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def negate(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + @negate.setter + def negate(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "negate", value) @pulumi.input_type -class RepositoryPagesSourceArgs: +class RepositoryRulesetRulesCommitAuthorEmailPatternArgs: def __init__(__self__, *, - branch: pulumi.Input[str], - path: Optional[pulumi.Input[str]] = None): + operator: pulumi.Input[str], + pattern: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + negate: Optional[pulumi.Input[bool]] = None): """ - :param pulumi.Input[str] branch: The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. - :param pulumi.Input[str] path: The repository directory from which the site publishes (Default: `/`). + :param pulumi.Input[str] operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param pulumi.Input[str] pattern: (String) The pattern to match with. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[bool] negate: (Boolean) If true, the rule will fail if the pattern matches. """ - pulumi.set(__self__, "branch", branch) - if path is not None: - pulumi.set(__self__, "path", path) + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) @property @pulumi.getter - def branch(self) -> pulumi.Input[str]: + def operator(self) -> pulumi.Input[str]: """ - The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. """ - return pulumi.get(self, "branch") + return pulumi.get(self, "operator") - @branch.setter - def branch(self, value: pulumi.Input[str]): - pulumi.set(self, "branch", value) + @operator.setter + def operator(self, value: pulumi.Input[str]): + pulumi.set(self, "operator", value) @property @pulumi.getter - def path(self) -> Optional[pulumi.Input[str]]: + def pattern(self) -> pulumi.Input[str]: """ - The repository directory from which the site publishes (Default: `/`). + (String) The pattern to match with. """ - return pulumi.get(self, "path") + return pulumi.get(self, "pattern") - @path.setter - def path(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "path", value) + @pattern.setter + def pattern(self, value: pulumi.Input[str]): + pulumi.set(self, "pattern", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def negate(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + @negate.setter + def negate(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "negate", value) + + +@pulumi.input_type +class RepositoryRulesetRulesCommitMessagePatternArgs: + def __init__(__self__, *, + operator: pulumi.Input[str], + pattern: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + negate: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param pulumi.Input[str] pattern: (String) The pattern to match with. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[bool] negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> pulumi.Input[str]: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @operator.setter + def operator(self, value: pulumi.Input[str]): + pulumi.set(self, "operator", value) + + @property + @pulumi.getter + def pattern(self) -> pulumi.Input[str]: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @pattern.setter + def pattern(self, value: pulumi.Input[str]): + pulumi.set(self, "pattern", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def negate(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + @negate.setter + def negate(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "negate", value) + + +@pulumi.input_type +class RepositoryRulesetRulesCommitterEmailPatternArgs: + def __init__(__self__, *, + operator: pulumi.Input[str], + pattern: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + negate: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param pulumi.Input[str] pattern: (String) The pattern to match with. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[bool] negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> pulumi.Input[str]: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @operator.setter + def operator(self, value: pulumi.Input[str]): + pulumi.set(self, "operator", value) + + @property + @pulumi.getter + def pattern(self) -> pulumi.Input[str]: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @pattern.setter + def pattern(self, value: pulumi.Input[str]): + pulumi.set(self, "pattern", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def negate(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + @negate.setter + def negate(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "negate", value) + + +@pulumi.input_type +class RepositoryRulesetRulesPullRequestArgs: + def __init__(__self__, *, + dismiss_stale_reviews_on_push: Optional[pulumi.Input[bool]] = None, + require_code_owner_review: Optional[pulumi.Input[bool]] = None, + require_last_push_approval: Optional[pulumi.Input[bool]] = None, + required_approving_review_count: Optional[pulumi.Input[int]] = None, + required_review_thread_resolution: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[bool] dismiss_stale_reviews_on_push: (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + :param pulumi.Input[bool] require_code_owner_review: (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + :param pulumi.Input[bool] require_last_push_approval: (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + :param pulumi.Input[int] required_approving_review_count: (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + :param pulumi.Input[bool] required_review_thread_resolution: (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + """ + if dismiss_stale_reviews_on_push is not None: + pulumi.set(__self__, "dismiss_stale_reviews_on_push", dismiss_stale_reviews_on_push) + if require_code_owner_review is not None: + pulumi.set(__self__, "require_code_owner_review", require_code_owner_review) + if require_last_push_approval is not None: + pulumi.set(__self__, "require_last_push_approval", require_last_push_approval) + if required_approving_review_count is not None: + pulumi.set(__self__, "required_approving_review_count", required_approving_review_count) + if required_review_thread_resolution is not None: + pulumi.set(__self__, "required_review_thread_resolution", required_review_thread_resolution) + + @property + @pulumi.getter(name="dismissStaleReviewsOnPush") + def dismiss_stale_reviews_on_push(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + """ + return pulumi.get(self, "dismiss_stale_reviews_on_push") + + @dismiss_stale_reviews_on_push.setter + def dismiss_stale_reviews_on_push(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "dismiss_stale_reviews_on_push", value) + + @property + @pulumi.getter(name="requireCodeOwnerReview") + def require_code_owner_review(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + """ + return pulumi.get(self, "require_code_owner_review") + + @require_code_owner_review.setter + def require_code_owner_review(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "require_code_owner_review", value) + + @property + @pulumi.getter(name="requireLastPushApproval") + def require_last_push_approval(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + """ + return pulumi.get(self, "require_last_push_approval") + + @require_last_push_approval.setter + def require_last_push_approval(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "require_last_push_approval", value) + + @property + @pulumi.getter(name="requiredApprovingReviewCount") + def required_approving_review_count(self) -> Optional[pulumi.Input[int]]: + """ + (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + """ + return pulumi.get(self, "required_approving_review_count") + + @required_approving_review_count.setter + def required_approving_review_count(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "required_approving_review_count", value) + + @property + @pulumi.getter(name="requiredReviewThreadResolution") + def required_review_thread_resolution(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + """ + return pulumi.get(self, "required_review_thread_resolution") + + @required_review_thread_resolution.setter + def required_review_thread_resolution(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "required_review_thread_resolution", value) + + +@pulumi.input_type +class RepositoryRulesetRulesRequiredDeploymentsArgs: + def __init__(__self__, *, + required_deployment_environments: pulumi.Input[Sequence[pulumi.Input[str]]]): + """ + :param pulumi.Input[Sequence[pulumi.Input[str]]] required_deployment_environments: (List of String) The environments that must be successfully deployed to before branches can be merged. + """ + pulumi.set(__self__, "required_deployment_environments", required_deployment_environments) + + @property + @pulumi.getter(name="requiredDeploymentEnvironments") + def required_deployment_environments(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + (List of String) The environments that must be successfully deployed to before branches can be merged. + """ + return pulumi.get(self, "required_deployment_environments") + + @required_deployment_environments.setter + def required_deployment_environments(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "required_deployment_environments", value) + + +@pulumi.input_type +class RepositoryRulesetRulesRequiredStatusChecksArgs: + def __init__(__self__, *, + required_checks: pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs']]], + strict_required_status_checks_policy: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs']]] required_checks: (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + :param pulumi.Input[bool] strict_required_status_checks_policy: (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + """ + pulumi.set(__self__, "required_checks", required_checks) + if strict_required_status_checks_policy is not None: + pulumi.set(__self__, "strict_required_status_checks_policy", strict_required_status_checks_policy) + + @property + @pulumi.getter(name="requiredChecks") + def required_checks(self) -> pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs']]]: + """ + (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + """ + return pulumi.get(self, "required_checks") + + @required_checks.setter + def required_checks(self, value: pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs']]]): + pulumi.set(self, "required_checks", value) + + @property + @pulumi.getter(name="strictRequiredStatusChecksPolicy") + def strict_required_status_checks_policy(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + """ + return pulumi.get(self, "strict_required_status_checks_policy") + + @strict_required_status_checks_policy.setter + def strict_required_status_checks_policy(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "strict_required_status_checks_policy", value) + + +@pulumi.input_type +class RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs: + def __init__(__self__, *, + context: pulumi.Input[str], + integration_id: Optional[pulumi.Input[int]] = None): + """ + :param pulumi.Input[str] context: (String) The status check context name that must be present on the commit. + :param pulumi.Input[int] integration_id: (Number) The optional integration ID that this status check must originate from. + """ + pulumi.set(__self__, "context", context) + if integration_id is not None: + pulumi.set(__self__, "integration_id", integration_id) + + @property + @pulumi.getter + def context(self) -> pulumi.Input[str]: + """ + (String) The status check context name that must be present on the commit. + """ + return pulumi.get(self, "context") + + @context.setter + def context(self, value: pulumi.Input[str]): + pulumi.set(self, "context", value) + + @property + @pulumi.getter(name="integrationId") + def integration_id(self) -> Optional[pulumi.Input[int]]: + """ + (Number) The optional integration ID that this status check must originate from. + """ + return pulumi.get(self, "integration_id") + + @integration_id.setter + def integration_id(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "integration_id", value) + + +@pulumi.input_type +class RepositoryRulesetRulesTagNamePatternArgs: + def __init__(__self__, *, + operator: pulumi.Input[str], + pattern: pulumi.Input[str], + name: Optional[pulumi.Input[str]] = None, + negate: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param pulumi.Input[str] pattern: (String) The pattern to match with. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[bool] negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> pulumi.Input[str]: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @operator.setter + def operator(self, value: pulumi.Input[str]): + pulumi.set(self, "operator", value) + + @property + @pulumi.getter + def pattern(self) -> pulumi.Input[str]: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @pattern.setter + def pattern(self, value: pulumi.Input[str]): + pulumi.set(self, "pattern", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def negate(self) -> Optional[pulumi.Input[bool]]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + @negate.setter + def negate(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "negate", value) @pulumi.input_type diff --git a/sdk/python/pulumi_github/actions_secret.py b/sdk/python/pulumi_github/actions_secret.py index 3969fa1c..1573040d 100644 --- a/sdk/python/pulumi_github/actions_secret.py +++ b/sdk/python/pulumi_github/actions_secret.py @@ -218,7 +218,7 @@ def __init__(__self__, This resource can be imported using an ID made up of the `repository` and `secret_name`: ```sh - $ pulumi import github:index/actionsSecret:ActionsSecret example_secret / + $ pulumi import github:index/actionsSecret:ActionsSecret example_secret repository/secret_name ``` NOTEthe implementation is limited in that it won't fetch the value of the `plaintext_value` or `encrypted_value` fields when importing. You may need to ignore changes for these as a workaround. @@ -258,7 +258,7 @@ def __init__(__self__, This resource can be imported using an ID made up of the `repository` and `secret_name`: ```sh - $ pulumi import github:index/actionsSecret:ActionsSecret example_secret / + $ pulumi import github:index/actionsSecret:ActionsSecret example_secret repository/secret_name ``` NOTEthe implementation is limited in that it won't fetch the value of the `plaintext_value` or `encrypted_value` fields when importing. You may need to ignore changes for these as a workaround. diff --git a/sdk/python/pulumi_github/enterprise_organization.py b/sdk/python/pulumi_github/enterprise_organization.py index 4ea190b7..739c9d94 100644 --- a/sdk/python/pulumi_github/enterprise_organization.py +++ b/sdk/python/pulumi_github/enterprise_organization.py @@ -18,6 +18,7 @@ def __init__(__self__, *, billing_email: pulumi.Input[str], enterprise_id: pulumi.Input[str], description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a EnterpriseOrganization resource. @@ -25,6 +26,7 @@ def __init__(__self__, *, :param pulumi.Input[str] billing_email: The billing email address. :param pulumi.Input[str] enterprise_id: The ID of the enterprise. :param pulumi.Input[str] description: The description of the organization. + :param pulumi.Input[str] display_name: The display name of the organization. :param pulumi.Input[str] name: The name of the organization. """ pulumi.set(__self__, "admin_logins", admin_logins) @@ -32,6 +34,8 @@ def __init__(__self__, *, pulumi.set(__self__, "enterprise_id", enterprise_id) if description is not None: pulumi.set(__self__, "description", description) + if display_name is not None: + pulumi.set(__self__, "display_name", display_name) if name is not None: pulumi.set(__self__, "name", name) @@ -83,6 +87,18 @@ def description(self) -> Optional[pulumi.Input[str]]: def description(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "description", value) + @property + @pulumi.getter(name="displayName") + def display_name(self) -> Optional[pulumi.Input[str]]: + """ + The display name of the organization. + """ + return pulumi.get(self, "display_name") + + @display_name.setter + def display_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "display_name", value) + @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: @@ -102,6 +118,7 @@ def __init__(__self__, *, admin_logins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, billing_email: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, enterprise_id: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None): """ @@ -109,6 +126,7 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] admin_logins: List of organization owner usernames. :param pulumi.Input[str] billing_email: The billing email address. :param pulumi.Input[str] description: The description of the organization. + :param pulumi.Input[str] display_name: The display name of the organization. :param pulumi.Input[str] enterprise_id: The ID of the enterprise. :param pulumi.Input[str] name: The name of the organization. """ @@ -118,6 +136,8 @@ def __init__(__self__, *, pulumi.set(__self__, "billing_email", billing_email) if description is not None: pulumi.set(__self__, "description", description) + if display_name is not None: + pulumi.set(__self__, "display_name", display_name) if enterprise_id is not None: pulumi.set(__self__, "enterprise_id", enterprise_id) if name is not None: @@ -159,6 +179,18 @@ def description(self) -> Optional[pulumi.Input[str]]: def description(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "description", value) + @property + @pulumi.getter(name="displayName") + def display_name(self) -> Optional[pulumi.Input[str]]: + """ + The display name of the organization. + """ + return pulumi.get(self, "display_name") + + @display_name.setter + def display_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "display_name", value) + @property @pulumi.getter(name="enterpriseId") def enterprise_id(self) -> Optional[pulumi.Input[str]]: @@ -192,6 +224,7 @@ def __init__(__self__, admin_logins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, billing_email: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, enterprise_id: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, __props__=None): @@ -206,6 +239,7 @@ def __init__(__self__, org = github.EnterpriseOrganization("org", enterprise_id=data["github_enterprise"]["enterprise"]["id"], + display_name="Some Awesome Org", description="Organization created with terraform", billing_email="jon@winteriscoming.com", admin_logins=["jon-snow"]) @@ -213,13 +247,18 @@ def __init__(__self__, ## Import - Support for importing organizations is not currently supported. + GitHub Enterprise Organization can be imported using the `slug` of the enterprise, combined with the `orgname` of the organization, separated by a `/` character. + + ```sh + $ pulumi import github:index/enterpriseOrganization:EnterpriseOrganization org enterp/some-awesome-org + ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] admin_logins: List of organization owner usernames. :param pulumi.Input[str] billing_email: The billing email address. :param pulumi.Input[str] description: The description of the organization. + :param pulumi.Input[str] display_name: The display name of the organization. :param pulumi.Input[str] enterprise_id: The ID of the enterprise. :param pulumi.Input[str] name: The name of the organization. """ @@ -240,6 +279,7 @@ def __init__(__self__, org = github.EnterpriseOrganization("org", enterprise_id=data["github_enterprise"]["enterprise"]["id"], + display_name="Some Awesome Org", description="Organization created with terraform", billing_email="jon@winteriscoming.com", admin_logins=["jon-snow"]) @@ -247,7 +287,11 @@ def __init__(__self__, ## Import - Support for importing organizations is not currently supported. + GitHub Enterprise Organization can be imported using the `slug` of the enterprise, combined with the `orgname` of the organization, separated by a `/` character. + + ```sh + $ pulumi import github:index/enterpriseOrganization:EnterpriseOrganization org enterp/some-awesome-org + ``` :param str resource_name: The name of the resource. :param EnterpriseOrganizationArgs args: The arguments to use to populate this resource's properties. @@ -267,6 +311,7 @@ def _internal_init(__self__, admin_logins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, billing_email: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, enterprise_id: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, __props__=None): @@ -285,6 +330,7 @@ def _internal_init(__self__, raise TypeError("Missing required property 'billing_email'") __props__.__dict__["billing_email"] = billing_email __props__.__dict__["description"] = description + __props__.__dict__["display_name"] = display_name if enterprise_id is None and not opts.urn: raise TypeError("Missing required property 'enterprise_id'") __props__.__dict__["enterprise_id"] = enterprise_id @@ -302,6 +348,7 @@ def get(resource_name: str, admin_logins: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, billing_email: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, enterprise_id: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None) -> 'EnterpriseOrganization': """ @@ -314,6 +361,7 @@ def get(resource_name: str, :param pulumi.Input[Sequence[pulumi.Input[str]]] admin_logins: List of organization owner usernames. :param pulumi.Input[str] billing_email: The billing email address. :param pulumi.Input[str] description: The description of the organization. + :param pulumi.Input[str] display_name: The display name of the organization. :param pulumi.Input[str] enterprise_id: The ID of the enterprise. :param pulumi.Input[str] name: The name of the organization. """ @@ -324,6 +372,7 @@ def get(resource_name: str, __props__.__dict__["admin_logins"] = admin_logins __props__.__dict__["billing_email"] = billing_email __props__.__dict__["description"] = description + __props__.__dict__["display_name"] = display_name __props__.__dict__["enterprise_id"] = enterprise_id __props__.__dict__["name"] = name return EnterpriseOrganization(resource_name, opts=opts, __props__=__props__) @@ -352,6 +401,14 @@ def description(self) -> pulumi.Output[Optional[str]]: """ return pulumi.get(self, "description") + @property + @pulumi.getter(name="displayName") + def display_name(self) -> pulumi.Output[Optional[str]]: + """ + The display name of the organization. + """ + return pulumi.get(self, "display_name") + @property @pulumi.getter(name="enterpriseId") def enterprise_id(self) -> pulumi.Output[str]: diff --git a/sdk/python/pulumi_github/organization_ruleset.py b/sdk/python/pulumi_github/organization_ruleset.py new file mode 100644 index 00000000..974103b5 --- /dev/null +++ b/sdk/python/pulumi_github/organization_ruleset.py @@ -0,0 +1,489 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities +from . import outputs +from ._inputs import * + +__all__ = ['OrganizationRulesetArgs', 'OrganizationRuleset'] + +@pulumi.input_type +class OrganizationRulesetArgs: + def __init__(__self__, *, + enforcement: pulumi.Input[str], + rules: pulumi.Input['OrganizationRulesetRulesArgs'], + target: pulumi.Input[str], + bypass_actors: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetBypassActorArgs']]]] = None, + conditions: Optional[pulumi.Input['OrganizationRulesetConditionsArgs']] = None, + name: Optional[pulumi.Input[str]] = None): + """ + The set of arguments for constructing a OrganizationRuleset resource. + :param pulumi.Input[str] enforcement: (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + :param pulumi.Input['OrganizationRulesetRulesArgs'] rules: (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + :param pulumi.Input[str] target: (String) Possible values are `branch` and `tag`. + :param pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetBypassActorArgs']]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + :param pulumi.Input['OrganizationRulesetConditionsArgs'] conditions: (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + :param pulumi.Input[str] name: (String) The name of the ruleset. + """ + pulumi.set(__self__, "enforcement", enforcement) + pulumi.set(__self__, "rules", rules) + pulumi.set(__self__, "target", target) + if bypass_actors is not None: + pulumi.set(__self__, "bypass_actors", bypass_actors) + if conditions is not None: + pulumi.set(__self__, "conditions", conditions) + if name is not None: + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter + def enforcement(self) -> pulumi.Input[str]: + """ + (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + """ + return pulumi.get(self, "enforcement") + + @enforcement.setter + def enforcement(self, value: pulumi.Input[str]): + pulumi.set(self, "enforcement", value) + + @property + @pulumi.getter + def rules(self) -> pulumi.Input['OrganizationRulesetRulesArgs']: + """ + (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + """ + return pulumi.get(self, "rules") + + @rules.setter + def rules(self, value: pulumi.Input['OrganizationRulesetRulesArgs']): + pulumi.set(self, "rules", value) + + @property + @pulumi.getter + def target(self) -> pulumi.Input[str]: + """ + (String) Possible values are `branch` and `tag`. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: pulumi.Input[str]): + pulumi.set(self, "target", value) + + @property + @pulumi.getter(name="bypassActors") + def bypass_actors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetBypassActorArgs']]]]: + """ + (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + """ + return pulumi.get(self, "bypass_actors") + + @bypass_actors.setter + def bypass_actors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetBypassActorArgs']]]]): + pulumi.set(self, "bypass_actors", value) + + @property + @pulumi.getter + def conditions(self) -> Optional[pulumi.Input['OrganizationRulesetConditionsArgs']]: + """ + (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + """ + return pulumi.get(self, "conditions") + + @conditions.setter + def conditions(self, value: Optional[pulumi.Input['OrganizationRulesetConditionsArgs']]): + pulumi.set(self, "conditions", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + +@pulumi.input_type +class _OrganizationRulesetState: + def __init__(__self__, *, + bypass_actors: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetBypassActorArgs']]]] = None, + conditions: Optional[pulumi.Input['OrganizationRulesetConditionsArgs']] = None, + enforcement: Optional[pulumi.Input[str]] = None, + etag: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_id: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input['OrganizationRulesetRulesArgs']] = None, + ruleset_id: Optional[pulumi.Input[int]] = None, + target: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering OrganizationRuleset resources. + :param pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetBypassActorArgs']]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + :param pulumi.Input['OrganizationRulesetConditionsArgs'] conditions: (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + :param pulumi.Input[str] enforcement: (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + :param pulumi.Input[str] etag: (String) + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[str] node_id: (String) GraphQL global node id for use with v4 API. + :param pulumi.Input['OrganizationRulesetRulesArgs'] rules: (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + :param pulumi.Input[int] ruleset_id: (Number) GitHub ID for the ruleset. + :param pulumi.Input[str] target: (String) Possible values are `branch` and `tag`. + """ + if bypass_actors is not None: + pulumi.set(__self__, "bypass_actors", bypass_actors) + if conditions is not None: + pulumi.set(__self__, "conditions", conditions) + if enforcement is not None: + pulumi.set(__self__, "enforcement", enforcement) + if etag is not None: + pulumi.set(__self__, "etag", etag) + if name is not None: + pulumi.set(__self__, "name", name) + if node_id is not None: + pulumi.set(__self__, "node_id", node_id) + if rules is not None: + pulumi.set(__self__, "rules", rules) + if ruleset_id is not None: + pulumi.set(__self__, "ruleset_id", ruleset_id) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="bypassActors") + def bypass_actors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetBypassActorArgs']]]]: + """ + (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + """ + return pulumi.get(self, "bypass_actors") + + @bypass_actors.setter + def bypass_actors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationRulesetBypassActorArgs']]]]): + pulumi.set(self, "bypass_actors", value) + + @property + @pulumi.getter + def conditions(self) -> Optional[pulumi.Input['OrganizationRulesetConditionsArgs']]: + """ + (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + """ + return pulumi.get(self, "conditions") + + @conditions.setter + def conditions(self, value: Optional[pulumi.Input['OrganizationRulesetConditionsArgs']]): + pulumi.set(self, "conditions", value) + + @property + @pulumi.getter + def enforcement(self) -> Optional[pulumi.Input[str]]: + """ + (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + """ + return pulumi.get(self, "enforcement") + + @enforcement.setter + def enforcement(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "enforcement", value) + + @property + @pulumi.getter + def etag(self) -> Optional[pulumi.Input[str]]: + """ + (String) + """ + return pulumi.get(self, "etag") + + @etag.setter + def etag(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "etag", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter(name="nodeId") + def node_id(self) -> Optional[pulumi.Input[str]]: + """ + (String) GraphQL global node id for use with v4 API. + """ + return pulumi.get(self, "node_id") + + @node_id.setter + def node_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "node_id", value) + + @property + @pulumi.getter + def rules(self) -> Optional[pulumi.Input['OrganizationRulesetRulesArgs']]: + """ + (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + """ + return pulumi.get(self, "rules") + + @rules.setter + def rules(self, value: Optional[pulumi.Input['OrganizationRulesetRulesArgs']]): + pulumi.set(self, "rules", value) + + @property + @pulumi.getter(name="rulesetId") + def ruleset_id(self) -> Optional[pulumi.Input[int]]: + """ + (Number) GitHub ID for the ruleset. + """ + return pulumi.get(self, "ruleset_id") + + @ruleset_id.setter + def ruleset_id(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "ruleset_id", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input[str]]: + """ + (String) Possible values are `branch` and `tag`. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "target", value) + + +class OrganizationRuleset(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + bypass_actors: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['OrganizationRulesetBypassActorArgs']]]]] = None, + conditions: Optional[pulumi.Input[pulumi.InputType['OrganizationRulesetConditionsArgs']]] = None, + enforcement: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[pulumi.InputType['OrganizationRulesetRulesArgs']]] = None, + target: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + Creates a GitHub organization ruleset. + + This resource allows you to create and manage rulesets on the organization level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + + ## Import + + GitHub Organization Rulesets can be imported using the GitHub ruleset ID e.g. + + ```sh + $ pulumi import github:index/organizationRuleset:OrganizationRuleset example 12345` + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['OrganizationRulesetBypassActorArgs']]]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + :param pulumi.Input[pulumi.InputType['OrganizationRulesetConditionsArgs']] conditions: (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + :param pulumi.Input[str] enforcement: (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[pulumi.InputType['OrganizationRulesetRulesArgs']] rules: (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + :param pulumi.Input[str] target: (String) Possible values are `branch` and `tag`. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: OrganizationRulesetArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Creates a GitHub organization ruleset. + + This resource allows you to create and manage rulesets on the organization level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + + ## Import + + GitHub Organization Rulesets can be imported using the GitHub ruleset ID e.g. + + ```sh + $ pulumi import github:index/organizationRuleset:OrganizationRuleset example 12345` + ``` + + :param str resource_name: The name of the resource. + :param OrganizationRulesetArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(OrganizationRulesetArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + bypass_actors: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['OrganizationRulesetBypassActorArgs']]]]] = None, + conditions: Optional[pulumi.Input[pulumi.InputType['OrganizationRulesetConditionsArgs']]] = None, + enforcement: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[pulumi.InputType['OrganizationRulesetRulesArgs']]] = None, + target: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = OrganizationRulesetArgs.__new__(OrganizationRulesetArgs) + + __props__.__dict__["bypass_actors"] = bypass_actors + __props__.__dict__["conditions"] = conditions + if enforcement is None and not opts.urn: + raise TypeError("Missing required property 'enforcement'") + __props__.__dict__["enforcement"] = enforcement + __props__.__dict__["name"] = name + if rules is None and not opts.urn: + raise TypeError("Missing required property 'rules'") + __props__.__dict__["rules"] = rules + if target is None and not opts.urn: + raise TypeError("Missing required property 'target'") + __props__.__dict__["target"] = target + __props__.__dict__["etag"] = None + __props__.__dict__["node_id"] = None + __props__.__dict__["ruleset_id"] = None + super(OrganizationRuleset, __self__).__init__( + 'github:index/organizationRuleset:OrganizationRuleset', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + bypass_actors: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['OrganizationRulesetBypassActorArgs']]]]] = None, + conditions: Optional[pulumi.Input[pulumi.InputType['OrganizationRulesetConditionsArgs']]] = None, + enforcement: Optional[pulumi.Input[str]] = None, + etag: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_id: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[pulumi.InputType['OrganizationRulesetRulesArgs']]] = None, + ruleset_id: Optional[pulumi.Input[int]] = None, + target: Optional[pulumi.Input[str]] = None) -> 'OrganizationRuleset': + """ + Get an existing OrganizationRuleset resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['OrganizationRulesetBypassActorArgs']]]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + :param pulumi.Input[pulumi.InputType['OrganizationRulesetConditionsArgs']] conditions: (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + :param pulumi.Input[str] enforcement: (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + :param pulumi.Input[str] etag: (String) + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[str] node_id: (String) GraphQL global node id for use with v4 API. + :param pulumi.Input[pulumi.InputType['OrganizationRulesetRulesArgs']] rules: (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + :param pulumi.Input[int] ruleset_id: (Number) GitHub ID for the ruleset. + :param pulumi.Input[str] target: (String) Possible values are `branch` and `tag`. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _OrganizationRulesetState.__new__(_OrganizationRulesetState) + + __props__.__dict__["bypass_actors"] = bypass_actors + __props__.__dict__["conditions"] = conditions + __props__.__dict__["enforcement"] = enforcement + __props__.__dict__["etag"] = etag + __props__.__dict__["name"] = name + __props__.__dict__["node_id"] = node_id + __props__.__dict__["rules"] = rules + __props__.__dict__["ruleset_id"] = ruleset_id + __props__.__dict__["target"] = target + return OrganizationRuleset(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="bypassActors") + def bypass_actors(self) -> pulumi.Output[Optional[Sequence['outputs.OrganizationRulesetBypassActor']]]: + """ + (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + """ + return pulumi.get(self, "bypass_actors") + + @property + @pulumi.getter + def conditions(self) -> pulumi.Output[Optional['outputs.OrganizationRulesetConditions']]: + """ + (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see below for nested schema) + """ + return pulumi.get(self, "conditions") + + @property + @pulumi.getter + def enforcement(self) -> pulumi.Output[str]: + """ + (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + """ + return pulumi.get(self, "enforcement") + + @property + @pulumi.getter + def etag(self) -> pulumi.Output[str]: + """ + (String) + """ + return pulumi.get(self, "etag") + + @property + @pulumi.getter + def name(self) -> pulumi.Output[str]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="nodeId") + def node_id(self) -> pulumi.Output[str]: + """ + (String) GraphQL global node id for use with v4 API. + """ + return pulumi.get(self, "node_id") + + @property + @pulumi.getter + def rules(self) -> pulumi.Output['outputs.OrganizationRulesetRules']: + """ + (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + """ + return pulumi.get(self, "rules") + + @property + @pulumi.getter(name="rulesetId") + def ruleset_id(self) -> pulumi.Output[int]: + """ + (Number) GitHub ID for the ruleset. + """ + return pulumi.get(self, "ruleset_id") + + @property + @pulumi.getter + def target(self) -> pulumi.Output[str]: + """ + (String) Possible values are `branch` and `tag`. + """ + return pulumi.get(self, "target") + diff --git a/sdk/python/pulumi_github/outputs.py b/sdk/python/pulumi_github/outputs.py index eeffc786..a5a7a64f 100644 --- a/sdk/python/pulumi_github/outputs.py +++ b/sdk/python/pulumi_github/outputs.py @@ -20,6 +20,19 @@ 'BranchProtectionV3RequiredPullRequestReviewsBypassPullRequestAllowances', 'BranchProtectionV3RequiredStatusChecks', 'BranchProtectionV3Restrictions', + 'OrganizationRulesetBypassActor', + 'OrganizationRulesetConditions', + 'OrganizationRulesetConditionsRefName', + 'OrganizationRulesetConditionsRepositoryName', + 'OrganizationRulesetRules', + 'OrganizationRulesetRulesBranchNamePattern', + 'OrganizationRulesetRulesCommitAuthorEmailPattern', + 'OrganizationRulesetRulesCommitMessagePattern', + 'OrganizationRulesetRulesCommitterEmailPattern', + 'OrganizationRulesetRulesPullRequest', + 'OrganizationRulesetRulesRequiredStatusChecks', + 'OrganizationRulesetRulesRequiredStatusChecksRequiredCheck', + 'OrganizationRulesetRulesTagNamePattern', 'OrganizationWebhookConfiguration', 'RepositoryCollaboratorsTeam', 'RepositoryCollaboratorsUser', @@ -27,6 +40,19 @@ 'RepositoryEnvironmentReviewer', 'RepositoryPages', 'RepositoryPagesSource', + 'RepositoryRulesetBypassActor', + 'RepositoryRulesetConditions', + 'RepositoryRulesetConditionsRefName', + 'RepositoryRulesetRules', + 'RepositoryRulesetRulesBranchNamePattern', + 'RepositoryRulesetRulesCommitAuthorEmailPattern', + 'RepositoryRulesetRulesCommitMessagePattern', + 'RepositoryRulesetRulesCommitterEmailPattern', + 'RepositoryRulesetRulesPullRequest', + 'RepositoryRulesetRulesRequiredDeployments', + 'RepositoryRulesetRulesRequiredStatusChecks', + 'RepositoryRulesetRulesRequiredStatusChecksRequiredCheck', + 'RepositoryRulesetRulesTagNamePattern', 'RepositorySecurityAndAnalysis', 'RepositorySecurityAndAnalysisAdvancedSecurity', 'RepositorySecurityAndAnalysisSecretScanning', @@ -674,360 +700,2046 @@ def users(self) -> Optional[Sequence[str]]: @pulumi.output_type -class OrganizationWebhookConfiguration(dict): +class OrganizationRulesetBypassActor(dict): @staticmethod def __key_warning(key: str): suggest = None - if key == "contentType": - suggest = "content_type" - elif key == "insecureSsl": - suggest = "insecure_ssl" + if key == "actorId": + suggest = "actor_id" + elif key == "actorType": + suggest = "actor_type" + elif key == "bypassMode": + suggest = "bypass_mode" if suggest: - pulumi.log.warn(f"Key '{key}' not found in OrganizationWebhookConfiguration. Access the value via the '{suggest}' property getter instead.") + pulumi.log.warn(f"Key '{key}' not found in OrganizationRulesetBypassActor. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: - OrganizationWebhookConfiguration.__key_warning(key) + OrganizationRulesetBypassActor.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: - OrganizationWebhookConfiguration.__key_warning(key) + OrganizationRulesetBypassActor.__key_warning(key) return super().get(key, default) def __init__(__self__, *, - url: str, - content_type: Optional[str] = None, - insecure_ssl: Optional[bool] = None, - secret: Optional[str] = None): + actor_id: int, + actor_type: str, + bypass_mode: Optional[str] = None): """ - :param str url: URL of the webhook + :param int actor_id: (Number) The ID of the actor that can bypass a ruleset + :param str actor_type: The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + :param str bypass_mode: (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. """ - pulumi.set(__self__, "url", url) - if content_type is not None: - pulumi.set(__self__, "content_type", content_type) - if insecure_ssl is not None: - pulumi.set(__self__, "insecure_ssl", insecure_ssl) - if secret is not None: - pulumi.set(__self__, "secret", secret) + pulumi.set(__self__, "actor_id", actor_id) + pulumi.set(__self__, "actor_type", actor_type) + if bypass_mode is not None: + pulumi.set(__self__, "bypass_mode", bypass_mode) @property - @pulumi.getter - def url(self) -> str: + @pulumi.getter(name="actorId") + def actor_id(self) -> int: """ - URL of the webhook + (Number) The ID of the actor that can bypass a ruleset """ - return pulumi.get(self, "url") + return pulumi.get(self, "actor_id") @property - @pulumi.getter(name="contentType") - def content_type(self) -> Optional[str]: - return pulumi.get(self, "content_type") - - @property - @pulumi.getter(name="insecureSsl") - def insecure_ssl(self) -> Optional[bool]: - return pulumi.get(self, "insecure_ssl") + @pulumi.getter(name="actorType") + def actor_type(self) -> str: + """ + The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + """ + return pulumi.get(self, "actor_type") @property - @pulumi.getter - def secret(self) -> Optional[str]: - return pulumi.get(self, "secret") + @pulumi.getter(name="bypassMode") + def bypass_mode(self) -> Optional[str]: + """ + (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + """ + return pulumi.get(self, "bypass_mode") @pulumi.output_type -class RepositoryCollaboratorsTeam(dict): +class OrganizationRulesetConditions(dict): @staticmethod def __key_warning(key: str): suggest = None - if key == "teamId": - suggest = "team_id" + if key == "refName": + suggest = "ref_name" + elif key == "repositoryId": + suggest = "repository_id" + elif key == "repositoryName": + suggest = "repository_name" if suggest: - pulumi.log.warn(f"Key '{key}' not found in RepositoryCollaboratorsTeam. Access the value via the '{suggest}' property getter instead.") + pulumi.log.warn(f"Key '{key}' not found in OrganizationRulesetConditions. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: - RepositoryCollaboratorsTeam.__key_warning(key) + OrganizationRulesetConditions.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: - RepositoryCollaboratorsTeam.__key_warning(key) + OrganizationRulesetConditions.__key_warning(key) return super().get(key, default) def __init__(__self__, *, - team_id: str, - permission: Optional[str] = None): + ref_name: 'outputs.OrganizationRulesetConditionsRefName', + repository_id: Optional[int] = None, + repository_name: Optional['outputs.OrganizationRulesetConditionsRepositoryName'] = None): """ - :param str team_id: The GitHub team id or the GitHub team slug - :param str permission: The permission of the outside collaborators for the repository. - Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. - Must be `push` for personal repositories. Defaults to `push`. + :param 'OrganizationRulesetConditionsRefNameArgs' ref_name: (Block List, Min: 1, Max: 1) (see below for nested schema) + :param int repository_id: The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + :param 'OrganizationRulesetConditionsRepositoryNameArgs' repository_name: Conflicts with `repository_id`. (see below for nested schema) + + One of `repository_id` and `repository_name` must be set for the rule to target any repositories. """ - pulumi.set(__self__, "team_id", team_id) - if permission is not None: - pulumi.set(__self__, "permission", permission) + pulumi.set(__self__, "ref_name", ref_name) + if repository_id is not None: + pulumi.set(__self__, "repository_id", repository_id) + if repository_name is not None: + pulumi.set(__self__, "repository_name", repository_name) @property - @pulumi.getter(name="teamId") - def team_id(self) -> str: + @pulumi.getter(name="refName") + def ref_name(self) -> 'outputs.OrganizationRulesetConditionsRefName': """ - The GitHub team id or the GitHub team slug + (Block List, Min: 1, Max: 1) (see below for nested schema) """ - return pulumi.get(self, "team_id") + return pulumi.get(self, "ref_name") + + @property + @pulumi.getter(name="repositoryId") + def repository_id(self) -> Optional[int]: + """ + The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. + """ + return pulumi.get(self, "repository_id") + + @property + @pulumi.getter(name="repositoryName") + def repository_name(self) -> Optional['outputs.OrganizationRulesetConditionsRepositoryName']: + """ + Conflicts with `repository_id`. (see below for nested schema) + + One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + """ + return pulumi.get(self, "repository_name") + + +@pulumi.output_type +class OrganizationRulesetConditionsRefName(dict): + def __init__(__self__, *, + excludes: Sequence[str], + includes: Sequence[str]): + """ + :param Sequence[str] excludes: (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + :param Sequence[str] includes: (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + """ + pulumi.set(__self__, "excludes", excludes) + pulumi.set(__self__, "includes", includes) @property @pulumi.getter - def permission(self) -> Optional[str]: + def excludes(self) -> Sequence[str]: """ - The permission of the outside collaborators for the repository. - Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. - Must be `push` for personal repositories. Defaults to `push`. + (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. """ - return pulumi.get(self, "permission") + return pulumi.get(self, "excludes") + + @property + @pulumi.getter + def includes(self) -> Sequence[str]: + """ + (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + """ + return pulumi.get(self, "includes") @pulumi.output_type -class RepositoryCollaboratorsUser(dict): +class OrganizationRulesetConditionsRepositoryName(dict): def __init__(__self__, *, - username: str, - permission: Optional[str] = None): + excludes: Sequence[str], + inlcudes: Sequence[str], + protected: Optional[bool] = None): """ - :param str permission: The permission of the outside collaborators for the repository. - Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. - Must be `push` for personal repositories. Defaults to `push`. + :param Sequence[str] excludes: (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + :param Sequence[str] inlcudes: (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. """ - pulumi.set(__self__, "username", username) - if permission is not None: - pulumi.set(__self__, "permission", permission) + pulumi.set(__self__, "excludes", excludes) + pulumi.set(__self__, "inlcudes", inlcudes) + if protected is not None: + pulumi.set(__self__, "protected", protected) @property @pulumi.getter - def username(self) -> str: - return pulumi.get(self, "username") + def excludes(self) -> Sequence[str]: + """ + (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + """ + return pulumi.get(self, "excludes") @property @pulumi.getter - def permission(self) -> Optional[str]: + def inlcudes(self) -> Sequence[str]: """ - The permission of the outside collaborators for the repository. - Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. - Must be `push` for personal repositories. Defaults to `push`. + (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. """ - return pulumi.get(self, "permission") + return pulumi.get(self, "inlcudes") + + @property + @pulumi.getter + def protected(self) -> Optional[bool]: + return pulumi.get(self, "protected") @pulumi.output_type -class RepositoryEnvironmentDeploymentBranchPolicy(dict): +class OrganizationRulesetRules(dict): @staticmethod def __key_warning(key: str): suggest = None - if key == "customBranchPolicies": - suggest = "custom_branch_policies" - elif key == "protectedBranches": - suggest = "protected_branches" + if key == "branchNamePattern": + suggest = "branch_name_pattern" + elif key == "commitAuthorEmailPattern": + suggest = "commit_author_email_pattern" + elif key == "commitMessagePattern": + suggest = "commit_message_pattern" + elif key == "committerEmailPattern": + suggest = "committer_email_pattern" + elif key == "nonFastForward": + suggest = "non_fast_forward" + elif key == "pullRequest": + suggest = "pull_request" + elif key == "requiredLinearHistory": + suggest = "required_linear_history" + elif key == "requiredSignatures": + suggest = "required_signatures" + elif key == "requiredStatusChecks": + suggest = "required_status_checks" + elif key == "tagNamePattern": + suggest = "tag_name_pattern" if suggest: - pulumi.log.warn(f"Key '{key}' not found in RepositoryEnvironmentDeploymentBranchPolicy. Access the value via the '{suggest}' property getter instead.") + pulumi.log.warn(f"Key '{key}' not found in OrganizationRulesetRules. Access the value via the '{suggest}' property getter instead.") def __getitem__(self, key: str) -> Any: - RepositoryEnvironmentDeploymentBranchPolicy.__key_warning(key) + OrganizationRulesetRules.__key_warning(key) return super().__getitem__(key) def get(self, key: str, default = None) -> Any: - RepositoryEnvironmentDeploymentBranchPolicy.__key_warning(key) + OrganizationRulesetRules.__key_warning(key) return super().get(key, default) def __init__(__self__, *, - custom_branch_policies: bool, - protected_branches: bool): + branch_name_pattern: Optional['outputs.OrganizationRulesetRulesBranchNamePattern'] = None, + commit_author_email_pattern: Optional['outputs.OrganizationRulesetRulesCommitAuthorEmailPattern'] = None, + commit_message_pattern: Optional['outputs.OrganizationRulesetRulesCommitMessagePattern'] = None, + committer_email_pattern: Optional['outputs.OrganizationRulesetRulesCommitterEmailPattern'] = None, + creation: Optional[bool] = None, + deletion: Optional[bool] = None, + non_fast_forward: Optional[bool] = None, + pull_request: Optional['outputs.OrganizationRulesetRulesPullRequest'] = None, + required_linear_history: Optional[bool] = None, + required_signatures: Optional[bool] = None, + required_status_checks: Optional['outputs.OrganizationRulesetRulesRequiredStatusChecks'] = None, + tag_name_pattern: Optional['outputs.OrganizationRulesetRulesTagNamePattern'] = None, + update: Optional[bool] = None): + """ + :param 'OrganizationRulesetRulesBranchNamePatternArgs' branch_name_pattern: (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + :param 'OrganizationRulesetRulesCommitAuthorEmailPatternArgs' commit_author_email_pattern: (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param 'OrganizationRulesetRulesCommitMessagePatternArgs' commit_message_pattern: (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param 'OrganizationRulesetRulesCommitterEmailPatternArgs' committer_email_pattern: (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param bool creation: (Boolean) Only allow users with bypass permission to create matching refs. + :param bool deletion: (Boolean) Only allow users with bypass permissions to delete matching refs. + :param bool non_fast_forward: (Boolean) Prevent users with push access from force pushing to branches. + :param 'OrganizationRulesetRulesPullRequestArgs' pull_request: (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + :param bool required_linear_history: (Boolean) Prevent merge commits from being pushed to matching branches. + :param bool required_signatures: (Boolean) Commits pushed to matching branches must have verified signatures. + :param 'OrganizationRulesetRulesRequiredStatusChecksArgs' required_status_checks: (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + :param 'OrganizationRulesetRulesTagNamePatternArgs' tag_name_pattern: (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) + :param bool update: (Boolean) Only allow users with bypass permission to update matching refs. + """ + if branch_name_pattern is not None: + pulumi.set(__self__, "branch_name_pattern", branch_name_pattern) + if commit_author_email_pattern is not None: + pulumi.set(__self__, "commit_author_email_pattern", commit_author_email_pattern) + if commit_message_pattern is not None: + pulumi.set(__self__, "commit_message_pattern", commit_message_pattern) + if committer_email_pattern is not None: + pulumi.set(__self__, "committer_email_pattern", committer_email_pattern) + if creation is not None: + pulumi.set(__self__, "creation", creation) + if deletion is not None: + pulumi.set(__self__, "deletion", deletion) + if non_fast_forward is not None: + pulumi.set(__self__, "non_fast_forward", non_fast_forward) + if pull_request is not None: + pulumi.set(__self__, "pull_request", pull_request) + if required_linear_history is not None: + pulumi.set(__self__, "required_linear_history", required_linear_history) + if required_signatures is not None: + pulumi.set(__self__, "required_signatures", required_signatures) + if required_status_checks is not None: + pulumi.set(__self__, "required_status_checks", required_status_checks) + if tag_name_pattern is not None: + pulumi.set(__self__, "tag_name_pattern", tag_name_pattern) + if update is not None: + pulumi.set(__self__, "update", update) + + @property + @pulumi.getter(name="branchNamePattern") + def branch_name_pattern(self) -> Optional['outputs.OrganizationRulesetRulesBranchNamePattern']: + """ + (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see below for nested schema) + """ + return pulumi.get(self, "branch_name_pattern") + + @property + @pulumi.getter(name="commitAuthorEmailPattern") + def commit_author_email_pattern(self) -> Optional['outputs.OrganizationRulesetRulesCommitAuthorEmailPattern']: + """ + (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "commit_author_email_pattern") + + @property + @pulumi.getter(name="commitMessagePattern") + def commit_message_pattern(self) -> Optional['outputs.OrganizationRulesetRulesCommitMessagePattern']: + """ + (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "commit_message_pattern") + + @property + @pulumi.getter(name="committerEmailPattern") + def committer_email_pattern(self) -> Optional['outputs.OrganizationRulesetRulesCommitterEmailPattern']: + """ + (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "committer_email_pattern") + + @property + @pulumi.getter + def creation(self) -> Optional[bool]: """ - :param bool custom_branch_policies: Whether only branches that match the specified name patterns can deploy to this environment. - :param bool protected_branches: Whether only branches with branch protection rules can deploy to this environment. + (Boolean) Only allow users with bypass permission to create matching refs. """ - pulumi.set(__self__, "custom_branch_policies", custom_branch_policies) - pulumi.set(__self__, "protected_branches", protected_branches) + return pulumi.get(self, "creation") @property - @pulumi.getter(name="customBranchPolicies") - def custom_branch_policies(self) -> bool: + @pulumi.getter + def deletion(self) -> Optional[bool]: """ - Whether only branches that match the specified name patterns can deploy to this environment. + (Boolean) Only allow users with bypass permissions to delete matching refs. """ - return pulumi.get(self, "custom_branch_policies") + return pulumi.get(self, "deletion") @property - @pulumi.getter(name="protectedBranches") - def protected_branches(self) -> bool: + @pulumi.getter(name="nonFastForward") + def non_fast_forward(self) -> Optional[bool]: """ - Whether only branches with branch protection rules can deploy to this environment. + (Boolean) Prevent users with push access from force pushing to branches. """ - return pulumi.get(self, "protected_branches") + return pulumi.get(self, "non_fast_forward") - -@pulumi.output_type -class RepositoryEnvironmentReviewer(dict): - def __init__(__self__, *, - teams: Optional[Sequence[int]] = None, - users: Optional[Sequence[int]] = None): + @property + @pulumi.getter(name="pullRequest") + def pull_request(self) -> Optional['outputs.OrganizationRulesetRulesPullRequest']: """ - :param Sequence[int] teams: Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. - :param Sequence[int] users: Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) """ - if teams is not None: - pulumi.set(__self__, "teams", teams) - if users is not None: - pulumi.set(__self__, "users", users) + return pulumi.get(self, "pull_request") @property - @pulumi.getter - def teams(self) -> Optional[Sequence[int]]: + @pulumi.getter(name="requiredLinearHistory") + def required_linear_history(self) -> Optional[bool]: """ - Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + (Boolean) Prevent merge commits from being pushed to matching branches. """ - return pulumi.get(self, "teams") + return pulumi.get(self, "required_linear_history") @property - @pulumi.getter - def users(self) -> Optional[Sequence[int]]: + @pulumi.getter(name="requiredSignatures") + def required_signatures(self) -> Optional[bool]: """ - Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + (Boolean) Commits pushed to matching branches must have verified signatures. """ - return pulumi.get(self, "users") - - -@pulumi.output_type -class RepositoryPages(dict): - @staticmethod - def __key_warning(key: str): - suggest = None - if key == "buildType": - suggest = "build_type" - elif key == "htmlUrl": - suggest = "html_url" - - if suggest: - pulumi.log.warn(f"Key '{key}' not found in RepositoryPages. Access the value via the '{suggest}' property getter instead.") - - def __getitem__(self, key: str) -> Any: - RepositoryPages.__key_warning(key) - return super().__getitem__(key) - - def get(self, key: str, default = None) -> Any: - RepositoryPages.__key_warning(key) - return super().get(key, default) + return pulumi.get(self, "required_signatures") - def __init__(__self__, *, - build_type: Optional[str] = None, - cname: Optional[str] = None, - custom404: Optional[bool] = None, - html_url: Optional[str] = None, - source: Optional['outputs.RepositoryPagesSource'] = None, - status: Optional[str] = None, - url: Optional[str] = None): + @property + @pulumi.getter(name="requiredStatusChecks") + def required_status_checks(self) -> Optional['outputs.OrganizationRulesetRulesRequiredStatusChecks']: """ - :param str build_type: The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. - :param str cname: The custom domain for the repository. This can only be set after the repository has been created. - :param bool custom404: Whether the rendered GitHub Pages site has a custom 404 page. - :param str html_url: The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. - :param 'RepositoryPagesSourceArgs' source: The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. - :param str status: Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. + (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) """ - if build_type is not None: - pulumi.set(__self__, "build_type", build_type) - if cname is not None: - pulumi.set(__self__, "cname", cname) - if custom404 is not None: - pulumi.set(__self__, "custom404", custom404) - if html_url is not None: - pulumi.set(__self__, "html_url", html_url) - if source is not None: - pulumi.set(__self__, "source", source) - if status is not None: - pulumi.set(__self__, "status", status) - if url is not None: - pulumi.set(__self__, "url", url) + return pulumi.get(self, "required_status_checks") @property - @pulumi.getter(name="buildType") - def build_type(self) -> Optional[str]: + @pulumi.getter(name="tagNamePattern") + def tag_name_pattern(self) -> Optional['outputs.OrganizationRulesetRulesTagNamePattern']: """ - The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. + (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see below for nested schema) """ - return pulumi.get(self, "build_type") + return pulumi.get(self, "tag_name_pattern") @property @pulumi.getter - def cname(self) -> Optional[str]: + def update(self) -> Optional[bool]: """ - The custom domain for the repository. This can only be set after the repository has been created. + (Boolean) Only allow users with bypass permission to update matching refs. """ - return pulumi.get(self, "cname") + return pulumi.get(self, "update") - @property - @pulumi.getter - def custom404(self) -> Optional[bool]: + +@pulumi.output_type +class OrganizationRulesetRulesBranchNamePattern(dict): + def __init__(__self__, *, + operator: str, + pattern: str, + name: Optional[str] = None, + negate: Optional[bool] = None): """ - Whether the rendered GitHub Pages site has a custom 404 page. + :param str operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param str pattern: (String) The pattern to match with. + :param str name: (String) The name of the ruleset. + :param bool negate: (Boolean) If true, the rule will fail if the pattern matches. """ - return pulumi.get(self, "custom404") + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) @property - @pulumi.getter(name="htmlUrl") - def html_url(self) -> Optional[str]: + @pulumi.getter + def operator(self) -> str: """ - The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. """ - return pulumi.get(self, "html_url") + return pulumi.get(self, "operator") @property @pulumi.getter - def source(self) -> Optional['outputs.RepositoryPagesSource']: + def pattern(self) -> str: """ - The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + (String) The pattern to match with. """ - return pulumi.get(self, "source") + return pulumi.get(self, "pattern") @property @pulumi.getter - def status(self) -> Optional[str]: + def name(self) -> Optional[str]: """ - Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. + (String) The name of the ruleset. """ - return pulumi.get(self, "status") + return pulumi.get(self, "name") @property @pulumi.getter - def url(self) -> Optional[str]: - return pulumi.get(self, "url") + def negate(self) -> Optional[bool]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") @pulumi.output_type -class RepositoryPagesSource(dict): +class OrganizationRulesetRulesCommitAuthorEmailPattern(dict): def __init__(__self__, *, - branch: str, - path: Optional[str] = None): + operator: str, + pattern: str, + name: Optional[str] = None, + negate: Optional[bool] = None): """ - :param str branch: The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. - :param str path: The repository directory from which the site publishes (Default: `/`). + :param str operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param str pattern: (String) The pattern to match with. + :param str name: (String) The name of the ruleset. + :param bool negate: (Boolean) If true, the rule will fail if the pattern matches. """ - pulumi.set(__self__, "branch", branch) - if path is not None: - pulumi.set(__self__, "path", path) + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) @property @pulumi.getter - def branch(self) -> str: + def operator(self) -> str: """ - The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. """ - return pulumi.get(self, "branch") + return pulumi.get(self, "operator") @property @pulumi.getter - def path(self) -> Optional[str]: + def pattern(self) -> str: """ - The repository directory from which the site publishes (Default: `/`). + (String) The pattern to match with. """ - return pulumi.get(self, "path") + return pulumi.get(self, "pattern") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def negate(self) -> Optional[bool]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + +@pulumi.output_type +class OrganizationRulesetRulesCommitMessagePattern(dict): + def __init__(__self__, *, + operator: str, + pattern: str, + name: Optional[str] = None, + negate: Optional[bool] = None): + """ + :param str operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param str pattern: (String) The pattern to match with. + :param str name: (String) The name of the ruleset. + :param bool negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> str: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @property + @pulumi.getter + def pattern(self) -> str: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def negate(self) -> Optional[bool]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + +@pulumi.output_type +class OrganizationRulesetRulesCommitterEmailPattern(dict): + def __init__(__self__, *, + operator: str, + pattern: str, + name: Optional[str] = None, + negate: Optional[bool] = None): + """ + :param str operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param str pattern: (String) The pattern to match with. + :param str name: (String) The name of the ruleset. + :param bool negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> str: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @property + @pulumi.getter + def pattern(self) -> str: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def negate(self) -> Optional[bool]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + +@pulumi.output_type +class OrganizationRulesetRulesPullRequest(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "dismissStaleReviewsOnPush": + suggest = "dismiss_stale_reviews_on_push" + elif key == "requireCodeOwnerReview": + suggest = "require_code_owner_review" + elif key == "requireLastPushApproval": + suggest = "require_last_push_approval" + elif key == "requiredApprovingReviewCount": + suggest = "required_approving_review_count" + elif key == "requiredReviewThreadResolution": + suggest = "required_review_thread_resolution" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in OrganizationRulesetRulesPullRequest. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + OrganizationRulesetRulesPullRequest.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + OrganizationRulesetRulesPullRequest.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + dismiss_stale_reviews_on_push: Optional[bool] = None, + require_code_owner_review: Optional[bool] = None, + require_last_push_approval: Optional[bool] = None, + required_approving_review_count: Optional[int] = None, + required_review_thread_resolution: Optional[bool] = None): + """ + :param bool dismiss_stale_reviews_on_push: (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + :param bool require_code_owner_review: (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + :param bool require_last_push_approval: (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + :param int required_approving_review_count: (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + :param bool required_review_thread_resolution: (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + """ + if dismiss_stale_reviews_on_push is not None: + pulumi.set(__self__, "dismiss_stale_reviews_on_push", dismiss_stale_reviews_on_push) + if require_code_owner_review is not None: + pulumi.set(__self__, "require_code_owner_review", require_code_owner_review) + if require_last_push_approval is not None: + pulumi.set(__self__, "require_last_push_approval", require_last_push_approval) + if required_approving_review_count is not None: + pulumi.set(__self__, "required_approving_review_count", required_approving_review_count) + if required_review_thread_resolution is not None: + pulumi.set(__self__, "required_review_thread_resolution", required_review_thread_resolution) + + @property + @pulumi.getter(name="dismissStaleReviewsOnPush") + def dismiss_stale_reviews_on_push(self) -> Optional[bool]: + """ + (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + """ + return pulumi.get(self, "dismiss_stale_reviews_on_push") + + @property + @pulumi.getter(name="requireCodeOwnerReview") + def require_code_owner_review(self) -> Optional[bool]: + """ + (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + """ + return pulumi.get(self, "require_code_owner_review") + + @property + @pulumi.getter(name="requireLastPushApproval") + def require_last_push_approval(self) -> Optional[bool]: + """ + (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + """ + return pulumi.get(self, "require_last_push_approval") + + @property + @pulumi.getter(name="requiredApprovingReviewCount") + def required_approving_review_count(self) -> Optional[int]: + """ + (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + """ + return pulumi.get(self, "required_approving_review_count") + + @property + @pulumi.getter(name="requiredReviewThreadResolution") + def required_review_thread_resolution(self) -> Optional[bool]: + """ + (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + """ + return pulumi.get(self, "required_review_thread_resolution") + + +@pulumi.output_type +class OrganizationRulesetRulesRequiredStatusChecks(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "requiredChecks": + suggest = "required_checks" + elif key == "strictRequiredStatusChecksPolicy": + suggest = "strict_required_status_checks_policy" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in OrganizationRulesetRulesRequiredStatusChecks. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + OrganizationRulesetRulesRequiredStatusChecks.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + OrganizationRulesetRulesRequiredStatusChecks.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + required_checks: Sequence['outputs.OrganizationRulesetRulesRequiredStatusChecksRequiredCheck'], + strict_required_status_checks_policy: Optional[bool] = None): + """ + :param Sequence['OrganizationRulesetRulesRequiredStatusChecksRequiredCheckArgs'] required_checks: (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + :param bool strict_required_status_checks_policy: (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + """ + pulumi.set(__self__, "required_checks", required_checks) + if strict_required_status_checks_policy is not None: + pulumi.set(__self__, "strict_required_status_checks_policy", strict_required_status_checks_policy) + + @property + @pulumi.getter(name="requiredChecks") + def required_checks(self) -> Sequence['outputs.OrganizationRulesetRulesRequiredStatusChecksRequiredCheck']: + """ + (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + """ + return pulumi.get(self, "required_checks") + + @property + @pulumi.getter(name="strictRequiredStatusChecksPolicy") + def strict_required_status_checks_policy(self) -> Optional[bool]: + """ + (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + """ + return pulumi.get(self, "strict_required_status_checks_policy") + + +@pulumi.output_type +class OrganizationRulesetRulesRequiredStatusChecksRequiredCheck(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "integrationId": + suggest = "integration_id" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in OrganizationRulesetRulesRequiredStatusChecksRequiredCheck. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + OrganizationRulesetRulesRequiredStatusChecksRequiredCheck.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + OrganizationRulesetRulesRequiredStatusChecksRequiredCheck.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + context: str, + integration_id: Optional[int] = None): + """ + :param str context: (String) The status check context name that must be present on the commit. + :param int integration_id: (Number) The optional integration ID that this status check must originate from. + """ + pulumi.set(__self__, "context", context) + if integration_id is not None: + pulumi.set(__self__, "integration_id", integration_id) + + @property + @pulumi.getter + def context(self) -> str: + """ + (String) The status check context name that must be present on the commit. + """ + return pulumi.get(self, "context") + + @property + @pulumi.getter(name="integrationId") + def integration_id(self) -> Optional[int]: + """ + (Number) The optional integration ID that this status check must originate from. + """ + return pulumi.get(self, "integration_id") + + +@pulumi.output_type +class OrganizationRulesetRulesTagNamePattern(dict): + def __init__(__self__, *, + operator: str, + pattern: str, + name: Optional[str] = None, + negate: Optional[bool] = None): + """ + :param str operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param str pattern: (String) The pattern to match with. + :param str name: (String) The name of the ruleset. + :param bool negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> str: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @property + @pulumi.getter + def pattern(self) -> str: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def negate(self) -> Optional[bool]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + +@pulumi.output_type +class OrganizationWebhookConfiguration(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "contentType": + suggest = "content_type" + elif key == "insecureSsl": + suggest = "insecure_ssl" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in OrganizationWebhookConfiguration. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + OrganizationWebhookConfiguration.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + OrganizationWebhookConfiguration.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + url: str, + content_type: Optional[str] = None, + insecure_ssl: Optional[bool] = None, + secret: Optional[str] = None): + """ + :param str url: URL of the webhook + """ + pulumi.set(__self__, "url", url) + if content_type is not None: + pulumi.set(__self__, "content_type", content_type) + if insecure_ssl is not None: + pulumi.set(__self__, "insecure_ssl", insecure_ssl) + if secret is not None: + pulumi.set(__self__, "secret", secret) + + @property + @pulumi.getter + def url(self) -> str: + """ + URL of the webhook + """ + return pulumi.get(self, "url") + + @property + @pulumi.getter(name="contentType") + def content_type(self) -> Optional[str]: + return pulumi.get(self, "content_type") + + @property + @pulumi.getter(name="insecureSsl") + def insecure_ssl(self) -> Optional[bool]: + return pulumi.get(self, "insecure_ssl") + + @property + @pulumi.getter + def secret(self) -> Optional[str]: + return pulumi.get(self, "secret") + + +@pulumi.output_type +class RepositoryCollaboratorsTeam(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "teamId": + suggest = "team_id" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RepositoryCollaboratorsTeam. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RepositoryCollaboratorsTeam.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RepositoryCollaboratorsTeam.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + team_id: str, + permission: Optional[str] = None): + """ + :param str team_id: The GitHub team id or the GitHub team slug + :param str permission: The permission of the outside collaborators for the repository. + Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. + Must be `push` for personal repositories. Defaults to `push`. + """ + pulumi.set(__self__, "team_id", team_id) + if permission is not None: + pulumi.set(__self__, "permission", permission) + + @property + @pulumi.getter(name="teamId") + def team_id(self) -> str: + """ + The GitHub team id or the GitHub team slug + """ + return pulumi.get(self, "team_id") + + @property + @pulumi.getter + def permission(self) -> Optional[str]: + """ + The permission of the outside collaborators for the repository. + Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. + Must be `push` for personal repositories. Defaults to `push`. + """ + return pulumi.get(self, "permission") + + +@pulumi.output_type +class RepositoryCollaboratorsUser(dict): + def __init__(__self__, *, + username: str, + permission: Optional[str] = None): + """ + :param str permission: The permission of the outside collaborators for the repository. + Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. + Must be `push` for personal repositories. Defaults to `push`. + """ + pulumi.set(__self__, "username", username) + if permission is not None: + pulumi.set(__self__, "permission", permission) + + @property + @pulumi.getter + def username(self) -> str: + return pulumi.get(self, "username") + + @property + @pulumi.getter + def permission(self) -> Optional[str]: + """ + The permission of the outside collaborators for the repository. + Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. + Must be `push` for personal repositories. Defaults to `push`. + """ + return pulumi.get(self, "permission") + + +@pulumi.output_type +class RepositoryEnvironmentDeploymentBranchPolicy(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "customBranchPolicies": + suggest = "custom_branch_policies" + elif key == "protectedBranches": + suggest = "protected_branches" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RepositoryEnvironmentDeploymentBranchPolicy. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RepositoryEnvironmentDeploymentBranchPolicy.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RepositoryEnvironmentDeploymentBranchPolicy.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + custom_branch_policies: bool, + protected_branches: bool): + """ + :param bool custom_branch_policies: Whether only branches that match the specified name patterns can deploy to this environment. + :param bool protected_branches: Whether only branches with branch protection rules can deploy to this environment. + """ + pulumi.set(__self__, "custom_branch_policies", custom_branch_policies) + pulumi.set(__self__, "protected_branches", protected_branches) + + @property + @pulumi.getter(name="customBranchPolicies") + def custom_branch_policies(self) -> bool: + """ + Whether only branches that match the specified name patterns can deploy to this environment. + """ + return pulumi.get(self, "custom_branch_policies") + + @property + @pulumi.getter(name="protectedBranches") + def protected_branches(self) -> bool: + """ + Whether only branches with branch protection rules can deploy to this environment. + """ + return pulumi.get(self, "protected_branches") + + +@pulumi.output_type +class RepositoryEnvironmentReviewer(dict): + def __init__(__self__, *, + teams: Optional[Sequence[int]] = None, + users: Optional[Sequence[int]] = None): + """ + :param Sequence[int] teams: Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + :param Sequence[int] users: Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + """ + if teams is not None: + pulumi.set(__self__, "teams", teams) + if users is not None: + pulumi.set(__self__, "users", users) + + @property + @pulumi.getter + def teams(self) -> Optional[Sequence[int]]: + """ + Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + """ + return pulumi.get(self, "teams") + + @property + @pulumi.getter + def users(self) -> Optional[Sequence[int]]: + """ + Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + """ + return pulumi.get(self, "users") + + +@pulumi.output_type +class RepositoryPages(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "buildType": + suggest = "build_type" + elif key == "htmlUrl": + suggest = "html_url" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RepositoryPages. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RepositoryPages.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RepositoryPages.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + build_type: Optional[str] = None, + cname: Optional[str] = None, + custom404: Optional[bool] = None, + html_url: Optional[str] = None, + source: Optional['outputs.RepositoryPagesSource'] = None, + status: Optional[str] = None, + url: Optional[str] = None): + """ + :param str build_type: The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. + :param str cname: The custom domain for the repository. This can only be set after the repository has been created. + :param bool custom404: Whether the rendered GitHub Pages site has a custom 404 page. + :param str html_url: The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. + :param 'RepositoryPagesSourceArgs' source: The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + :param str status: Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. + """ + if build_type is not None: + pulumi.set(__self__, "build_type", build_type) + if cname is not None: + pulumi.set(__self__, "cname", cname) + if custom404 is not None: + pulumi.set(__self__, "custom404", custom404) + if html_url is not None: + pulumi.set(__self__, "html_url", html_url) + if source is not None: + pulumi.set(__self__, "source", source) + if status is not None: + pulumi.set(__self__, "status", status) + if url is not None: + pulumi.set(__self__, "url", url) + + @property + @pulumi.getter(name="buildType") + def build_type(self) -> Optional[str]: + """ + The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. + """ + return pulumi.get(self, "build_type") + + @property + @pulumi.getter + def cname(self) -> Optional[str]: + """ + The custom domain for the repository. This can only be set after the repository has been created. + """ + return pulumi.get(self, "cname") + + @property + @pulumi.getter + def custom404(self) -> Optional[bool]: + """ + Whether the rendered GitHub Pages site has a custom 404 page. + """ + return pulumi.get(self, "custom404") + + @property + @pulumi.getter(name="htmlUrl") + def html_url(self) -> Optional[str]: + """ + The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. + """ + return pulumi.get(self, "html_url") + + @property + @pulumi.getter + def source(self) -> Optional['outputs.RepositoryPagesSource']: + """ + The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + """ + return pulumi.get(self, "source") + + @property + @pulumi.getter + def status(self) -> Optional[str]: + """ + Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. + """ + return pulumi.get(self, "status") + + @property + @pulumi.getter + def url(self) -> Optional[str]: + return pulumi.get(self, "url") + + +@pulumi.output_type +class RepositoryPagesSource(dict): + def __init__(__self__, *, + branch: str, + path: Optional[str] = None): + """ + :param str branch: The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. + :param str path: The repository directory from which the site publishes (Default: `/`). + """ + pulumi.set(__self__, "branch", branch) + if path is not None: + pulumi.set(__self__, "path", path) + + @property + @pulumi.getter + def branch(self) -> str: + """ + The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. + """ + return pulumi.get(self, "branch") + + @property + @pulumi.getter + def path(self) -> Optional[str]: + """ + The repository directory from which the site publishes (Default: `/`). + """ + return pulumi.get(self, "path") + + +@pulumi.output_type +class RepositoryRulesetBypassActor(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "actorId": + suggest = "actor_id" + elif key == "actorType": + suggest = "actor_type" + elif key == "bypassMode": + suggest = "bypass_mode" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RepositoryRulesetBypassActor. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RepositoryRulesetBypassActor.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RepositoryRulesetBypassActor.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + actor_id: int, + actor_type: str, + bypass_mode: Optional[str] = None): + """ + :param int actor_id: (Number) The ID of the actor that can bypass a ruleset + :param str actor_type: The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + :param str bypass_mode: (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + """ + pulumi.set(__self__, "actor_id", actor_id) + pulumi.set(__self__, "actor_type", actor_type) + if bypass_mode is not None: + pulumi.set(__self__, "bypass_mode", bypass_mode) + + @property + @pulumi.getter(name="actorId") + def actor_id(self) -> int: + """ + (Number) The ID of the actor that can bypass a ruleset + """ + return pulumi.get(self, "actor_id") + + @property + @pulumi.getter(name="actorType") + def actor_type(self) -> str: + """ + The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + """ + return pulumi.get(self, "actor_type") + + @property + @pulumi.getter(name="bypassMode") + def bypass_mode(self) -> Optional[str]: + """ + (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`. + """ + return pulumi.get(self, "bypass_mode") + + +@pulumi.output_type +class RepositoryRulesetConditions(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "refName": + suggest = "ref_name" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RepositoryRulesetConditions. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RepositoryRulesetConditions.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RepositoryRulesetConditions.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + ref_name: 'outputs.RepositoryRulesetConditionsRefName'): + """ + :param 'RepositoryRulesetConditionsRefNameArgs' ref_name: (Block List, Min: 1, Max: 1) (see below for nested schema) + """ + pulumi.set(__self__, "ref_name", ref_name) + + @property + @pulumi.getter(name="refName") + def ref_name(self) -> 'outputs.RepositoryRulesetConditionsRefName': + """ + (Block List, Min: 1, Max: 1) (see below for nested schema) + """ + return pulumi.get(self, "ref_name") + + +@pulumi.output_type +class RepositoryRulesetConditionsRefName(dict): + def __init__(__self__, *, + excludes: Sequence[str], + includes: Sequence[str]): + """ + :param Sequence[str] excludes: (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + :param Sequence[str] includes: (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + """ + pulumi.set(__self__, "excludes", excludes) + pulumi.set(__self__, "includes", includes) + + @property + @pulumi.getter + def excludes(self) -> Sequence[str]: + """ + (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + """ + return pulumi.get(self, "excludes") + + @property + @pulumi.getter + def includes(self) -> Sequence[str]: + """ + (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + """ + return pulumi.get(self, "includes") + + +@pulumi.output_type +class RepositoryRulesetRules(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "branchNamePattern": + suggest = "branch_name_pattern" + elif key == "commitAuthorEmailPattern": + suggest = "commit_author_email_pattern" + elif key == "commitMessagePattern": + suggest = "commit_message_pattern" + elif key == "committerEmailPattern": + suggest = "committer_email_pattern" + elif key == "nonFastForward": + suggest = "non_fast_forward" + elif key == "pullRequest": + suggest = "pull_request" + elif key == "requiredDeployments": + suggest = "required_deployments" + elif key == "requiredLinearHistory": + suggest = "required_linear_history" + elif key == "requiredSignatures": + suggest = "required_signatures" + elif key == "requiredStatusChecks": + suggest = "required_status_checks" + elif key == "tagNamePattern": + suggest = "tag_name_pattern" + elif key == "updateAllowsFetchAndMerge": + suggest = "update_allows_fetch_and_merge" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RepositoryRulesetRules. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RepositoryRulesetRules.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RepositoryRulesetRules.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + branch_name_pattern: Optional['outputs.RepositoryRulesetRulesBranchNamePattern'] = None, + commit_author_email_pattern: Optional['outputs.RepositoryRulesetRulesCommitAuthorEmailPattern'] = None, + commit_message_pattern: Optional['outputs.RepositoryRulesetRulesCommitMessagePattern'] = None, + committer_email_pattern: Optional['outputs.RepositoryRulesetRulesCommitterEmailPattern'] = None, + creation: Optional[bool] = None, + deletion: Optional[bool] = None, + non_fast_forward: Optional[bool] = None, + pull_request: Optional['outputs.RepositoryRulesetRulesPullRequest'] = None, + required_deployments: Optional['outputs.RepositoryRulesetRulesRequiredDeployments'] = None, + required_linear_history: Optional[bool] = None, + required_signatures: Optional[bool] = None, + required_status_checks: Optional['outputs.RepositoryRulesetRulesRequiredStatusChecks'] = None, + tag_name_pattern: Optional['outputs.RepositoryRulesetRulesTagNamePattern'] = None, + update: Optional[bool] = None, + update_allows_fetch_and_merge: Optional[bool] = None): + """ + :param 'RepositoryRulesetRulesBranchNamePatternArgs' branch_name_pattern: (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + :param 'RepositoryRulesetRulesCommitAuthorEmailPatternArgs' commit_author_email_pattern: (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param 'RepositoryRulesetRulesCommitMessagePatternArgs' commit_message_pattern: (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param 'RepositoryRulesetRulesCommitterEmailPatternArgs' committer_email_pattern: (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + :param bool creation: (Boolean) Only allow users with bypass permission to create matching refs. + :param bool deletion: (Boolean) Only allow users with bypass permissions to delete matching refs. + :param bool non_fast_forward: (Boolean) Prevent users with push access from force pushing to branches. + :param 'RepositoryRulesetRulesPullRequestArgs' pull_request: (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + :param 'RepositoryRulesetRulesRequiredDeploymentsArgs' required_deployments: (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + :param bool required_linear_history: (Boolean) Prevent merge commits from being pushed to matching branches. + :param bool required_signatures: (Boolean) Commits pushed to matching branches must have verified signatures. + :param 'RepositoryRulesetRulesRequiredStatusChecksArgs' required_status_checks: (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + :param 'RepositoryRulesetRulesTagNamePatternArgs' tag_name_pattern: (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + :param bool update: (Boolean) Only allow users with bypass permission to update matching refs. + :param bool update_allows_fetch_and_merge: (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + """ + if branch_name_pattern is not None: + pulumi.set(__self__, "branch_name_pattern", branch_name_pattern) + if commit_author_email_pattern is not None: + pulumi.set(__self__, "commit_author_email_pattern", commit_author_email_pattern) + if commit_message_pattern is not None: + pulumi.set(__self__, "commit_message_pattern", commit_message_pattern) + if committer_email_pattern is not None: + pulumi.set(__self__, "committer_email_pattern", committer_email_pattern) + if creation is not None: + pulumi.set(__self__, "creation", creation) + if deletion is not None: + pulumi.set(__self__, "deletion", deletion) + if non_fast_forward is not None: + pulumi.set(__self__, "non_fast_forward", non_fast_forward) + if pull_request is not None: + pulumi.set(__self__, "pull_request", pull_request) + if required_deployments is not None: + pulumi.set(__self__, "required_deployments", required_deployments) + if required_linear_history is not None: + pulumi.set(__self__, "required_linear_history", required_linear_history) + if required_signatures is not None: + pulumi.set(__self__, "required_signatures", required_signatures) + if required_status_checks is not None: + pulumi.set(__self__, "required_status_checks", required_status_checks) + if tag_name_pattern is not None: + pulumi.set(__self__, "tag_name_pattern", tag_name_pattern) + if update is not None: + pulumi.set(__self__, "update", update) + if update_allows_fetch_and_merge is not None: + pulumi.set(__self__, "update_allows_fetch_and_merge", update_allows_fetch_and_merge) + + @property + @pulumi.getter(name="branchNamePattern") + def branch_name_pattern(self) -> Optional['outputs.RepositoryRulesetRulesBranchNamePattern']: + """ + (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see below for nested schema) + """ + return pulumi.get(self, "branch_name_pattern") + + @property + @pulumi.getter(name="commitAuthorEmailPattern") + def commit_author_email_pattern(self) -> Optional['outputs.RepositoryRulesetRulesCommitAuthorEmailPattern']: + """ + (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "commit_author_email_pattern") + + @property + @pulumi.getter(name="commitMessagePattern") + def commit_message_pattern(self) -> Optional['outputs.RepositoryRulesetRulesCommitMessagePattern']: + """ + (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "commit_message_pattern") + + @property + @pulumi.getter(name="committerEmailPattern") + def committer_email_pattern(self) -> Optional['outputs.RepositoryRulesetRulesCommitterEmailPattern']: + """ + (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) + """ + return pulumi.get(self, "committer_email_pattern") + + @property + @pulumi.getter + def creation(self) -> Optional[bool]: + """ + (Boolean) Only allow users with bypass permission to create matching refs. + """ + return pulumi.get(self, "creation") + + @property + @pulumi.getter + def deletion(self) -> Optional[bool]: + """ + (Boolean) Only allow users with bypass permissions to delete matching refs. + """ + return pulumi.get(self, "deletion") + + @property + @pulumi.getter(name="nonFastForward") + def non_fast_forward(self) -> Optional[bool]: + """ + (Boolean) Prevent users with push access from force pushing to branches. + """ + return pulumi.get(self, "non_fast_forward") + + @property + @pulumi.getter(name="pullRequest") + def pull_request(self) -> Optional['outputs.RepositoryRulesetRulesPullRequest']: + """ + (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) + """ + return pulumi.get(self, "pull_request") + + @property + @pulumi.getter(name="requiredDeployments") + def required_deployments(self) -> Optional['outputs.RepositoryRulesetRulesRequiredDeployments']: + """ + (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema) + """ + return pulumi.get(self, "required_deployments") + + @property + @pulumi.getter(name="requiredLinearHistory") + def required_linear_history(self) -> Optional[bool]: + """ + (Boolean) Prevent merge commits from being pushed to matching branches. + """ + return pulumi.get(self, "required_linear_history") + + @property + @pulumi.getter(name="requiredSignatures") + def required_signatures(self) -> Optional[bool]: + """ + (Boolean) Commits pushed to matching branches must have verified signatures. + """ + return pulumi.get(self, "required_signatures") + + @property + @pulumi.getter(name="requiredStatusChecks") + def required_status_checks(self) -> Optional['outputs.RepositoryRulesetRulesRequiredStatusChecks']: + """ + (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema) + """ + return pulumi.get(self, "required_status_checks") + + @property + @pulumi.getter(name="tagNamePattern") + def tag_name_pattern(self) -> Optional['outputs.RepositoryRulesetRulesTagNamePattern']: + """ + (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see below for nested schema) + """ + return pulumi.get(self, "tag_name_pattern") + + @property + @pulumi.getter + def update(self) -> Optional[bool]: + """ + (Boolean) Only allow users with bypass permission to update matching refs. + """ + return pulumi.get(self, "update") + + @property + @pulumi.getter(name="updateAllowsFetchAndMerge") + def update_allows_fetch_and_merge(self) -> Optional[bool]: + """ + (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + """ + return pulumi.get(self, "update_allows_fetch_and_merge") + + +@pulumi.output_type +class RepositoryRulesetRulesBranchNamePattern(dict): + def __init__(__self__, *, + operator: str, + pattern: str, + name: Optional[str] = None, + negate: Optional[bool] = None): + """ + :param str operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param str pattern: (String) The pattern to match with. + :param str name: (String) The name of the ruleset. + :param bool negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> str: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @property + @pulumi.getter + def pattern(self) -> str: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def negate(self) -> Optional[bool]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + +@pulumi.output_type +class RepositoryRulesetRulesCommitAuthorEmailPattern(dict): + def __init__(__self__, *, + operator: str, + pattern: str, + name: Optional[str] = None, + negate: Optional[bool] = None): + """ + :param str operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param str pattern: (String) The pattern to match with. + :param str name: (String) The name of the ruleset. + :param bool negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> str: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @property + @pulumi.getter + def pattern(self) -> str: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def negate(self) -> Optional[bool]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + +@pulumi.output_type +class RepositoryRulesetRulesCommitMessagePattern(dict): + def __init__(__self__, *, + operator: str, + pattern: str, + name: Optional[str] = None, + negate: Optional[bool] = None): + """ + :param str operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param str pattern: (String) The pattern to match with. + :param str name: (String) The name of the ruleset. + :param bool negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> str: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @property + @pulumi.getter + def pattern(self) -> str: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def negate(self) -> Optional[bool]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + +@pulumi.output_type +class RepositoryRulesetRulesCommitterEmailPattern(dict): + def __init__(__self__, *, + operator: str, + pattern: str, + name: Optional[str] = None, + negate: Optional[bool] = None): + """ + :param str operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param str pattern: (String) The pattern to match with. + :param str name: (String) The name of the ruleset. + :param bool negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> str: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @property + @pulumi.getter + def pattern(self) -> str: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def negate(self) -> Optional[bool]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") + + +@pulumi.output_type +class RepositoryRulesetRulesPullRequest(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "dismissStaleReviewsOnPush": + suggest = "dismiss_stale_reviews_on_push" + elif key == "requireCodeOwnerReview": + suggest = "require_code_owner_review" + elif key == "requireLastPushApproval": + suggest = "require_last_push_approval" + elif key == "requiredApprovingReviewCount": + suggest = "required_approving_review_count" + elif key == "requiredReviewThreadResolution": + suggest = "required_review_thread_resolution" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RepositoryRulesetRulesPullRequest. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RepositoryRulesetRulesPullRequest.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RepositoryRulesetRulesPullRequest.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + dismiss_stale_reviews_on_push: Optional[bool] = None, + require_code_owner_review: Optional[bool] = None, + require_last_push_approval: Optional[bool] = None, + required_approving_review_count: Optional[int] = None, + required_review_thread_resolution: Optional[bool] = None): + """ + :param bool dismiss_stale_reviews_on_push: (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + :param bool require_code_owner_review: (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + :param bool require_last_push_approval: (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + :param int required_approving_review_count: (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + :param bool required_review_thread_resolution: (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + """ + if dismiss_stale_reviews_on_push is not None: + pulumi.set(__self__, "dismiss_stale_reviews_on_push", dismiss_stale_reviews_on_push) + if require_code_owner_review is not None: + pulumi.set(__self__, "require_code_owner_review", require_code_owner_review) + if require_last_push_approval is not None: + pulumi.set(__self__, "require_last_push_approval", require_last_push_approval) + if required_approving_review_count is not None: + pulumi.set(__self__, "required_approving_review_count", required_approving_review_count) + if required_review_thread_resolution is not None: + pulumi.set(__self__, "required_review_thread_resolution", required_review_thread_resolution) + + @property + @pulumi.getter(name="dismissStaleReviewsOnPush") + def dismiss_stale_reviews_on_push(self) -> Optional[bool]: + """ + (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + """ + return pulumi.get(self, "dismiss_stale_reviews_on_push") + + @property + @pulumi.getter(name="requireCodeOwnerReview") + def require_code_owner_review(self) -> Optional[bool]: + """ + (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + """ + return pulumi.get(self, "require_code_owner_review") + + @property + @pulumi.getter(name="requireLastPushApproval") + def require_last_push_approval(self) -> Optional[bool]: + """ + (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + """ + return pulumi.get(self, "require_last_push_approval") + + @property + @pulumi.getter(name="requiredApprovingReviewCount") + def required_approving_review_count(self) -> Optional[int]: + """ + (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + """ + return pulumi.get(self, "required_approving_review_count") + + @property + @pulumi.getter(name="requiredReviewThreadResolution") + def required_review_thread_resolution(self) -> Optional[bool]: + """ + (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + """ + return pulumi.get(self, "required_review_thread_resolution") + + +@pulumi.output_type +class RepositoryRulesetRulesRequiredDeployments(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "requiredDeploymentEnvironments": + suggest = "required_deployment_environments" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RepositoryRulesetRulesRequiredDeployments. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RepositoryRulesetRulesRequiredDeployments.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RepositoryRulesetRulesRequiredDeployments.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + required_deployment_environments: Sequence[str]): + """ + :param Sequence[str] required_deployment_environments: (List of String) The environments that must be successfully deployed to before branches can be merged. + """ + pulumi.set(__self__, "required_deployment_environments", required_deployment_environments) + + @property + @pulumi.getter(name="requiredDeploymentEnvironments") + def required_deployment_environments(self) -> Sequence[str]: + """ + (List of String) The environments that must be successfully deployed to before branches can be merged. + """ + return pulumi.get(self, "required_deployment_environments") + + +@pulumi.output_type +class RepositoryRulesetRulesRequiredStatusChecks(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "requiredChecks": + suggest = "required_checks" + elif key == "strictRequiredStatusChecksPolicy": + suggest = "strict_required_status_checks_policy" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RepositoryRulesetRulesRequiredStatusChecks. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RepositoryRulesetRulesRequiredStatusChecks.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RepositoryRulesetRulesRequiredStatusChecks.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + required_checks: Sequence['outputs.RepositoryRulesetRulesRequiredStatusChecksRequiredCheck'], + strict_required_status_checks_policy: Optional[bool] = None): + """ + :param Sequence['RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs'] required_checks: (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + :param bool strict_required_status_checks_policy: (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + """ + pulumi.set(__self__, "required_checks", required_checks) + if strict_required_status_checks_policy is not None: + pulumi.set(__self__, "strict_required_status_checks_policy", strict_required_status_checks_policy) + + @property + @pulumi.getter(name="requiredChecks") + def required_checks(self) -> Sequence['outputs.RepositoryRulesetRulesRequiredStatusChecksRequiredCheck']: + """ + (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) + """ + return pulumi.get(self, "required_checks") + + @property + @pulumi.getter(name="strictRequiredStatusChecksPolicy") + def strict_required_status_checks_policy(self) -> Optional[bool]: + """ + (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + """ + return pulumi.get(self, "strict_required_status_checks_policy") + + +@pulumi.output_type +class RepositoryRulesetRulesRequiredStatusChecksRequiredCheck(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "integrationId": + suggest = "integration_id" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RepositoryRulesetRulesRequiredStatusChecksRequiredCheck. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RepositoryRulesetRulesRequiredStatusChecksRequiredCheck.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RepositoryRulesetRulesRequiredStatusChecksRequiredCheck.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + context: str, + integration_id: Optional[int] = None): + """ + :param str context: (String) The status check context name that must be present on the commit. + :param int integration_id: (Number) The optional integration ID that this status check must originate from. + """ + pulumi.set(__self__, "context", context) + if integration_id is not None: + pulumi.set(__self__, "integration_id", integration_id) + + @property + @pulumi.getter + def context(self) -> str: + """ + (String) The status check context name that must be present on the commit. + """ + return pulumi.get(self, "context") + + @property + @pulumi.getter(name="integrationId") + def integration_id(self) -> Optional[int]: + """ + (Number) The optional integration ID that this status check must originate from. + """ + return pulumi.get(self, "integration_id") + + +@pulumi.output_type +class RepositoryRulesetRulesTagNamePattern(dict): + def __init__(__self__, *, + operator: str, + pattern: str, + name: Optional[str] = None, + negate: Optional[bool] = None): + """ + :param str operator: (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + :param str pattern: (String) The pattern to match with. + :param str name: (String) The name of the ruleset. + :param bool negate: (Boolean) If true, the rule will fail if the pattern matches. + """ + pulumi.set(__self__, "operator", operator) + pulumi.set(__self__, "pattern", pattern) + if name is not None: + pulumi.set(__self__, "name", name) + if negate is not None: + pulumi.set(__self__, "negate", negate) + + @property + @pulumi.getter + def operator(self) -> str: + """ + (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + """ + return pulumi.get(self, "operator") + + @property + @pulumi.getter + def pattern(self) -> str: + """ + (String) The pattern to match with. + """ + return pulumi.get(self, "pattern") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def negate(self) -> Optional[bool]: + """ + (Boolean) If true, the rule will fail if the pattern matches. + """ + return pulumi.get(self, "negate") @pulumi.output_type diff --git a/sdk/python/pulumi_github/repository.py b/sdk/python/pulumi_github/repository.py index 27514861..e916ae3d 100644 --- a/sdk/python/pulumi_github/repository.py +++ b/sdk/python/pulumi_github/repository.py @@ -2060,7 +2060,7 @@ def template(self) -> pulumi.Output[Optional['outputs.RepositoryTemplate']]: @property @pulumi.getter - def topics(self) -> pulumi.Output[Optional[Sequence[str]]]: + def topics(self) -> pulumi.Output[Sequence[str]]: """ The list of topics of the repository. """ diff --git a/sdk/python/pulumi_github/repository_ruleset.py b/sdk/python/pulumi_github/repository_ruleset.py new file mode 100644 index 00000000..72963875 --- /dev/null +++ b/sdk/python/pulumi_github/repository_ruleset.py @@ -0,0 +1,604 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities +from . import outputs +from ._inputs import * + +__all__ = ['RepositoryRulesetArgs', 'RepositoryRuleset'] + +@pulumi.input_type +class RepositoryRulesetArgs: + def __init__(__self__, *, + enforcement: pulumi.Input[str], + rules: pulumi.Input['RepositoryRulesetRulesArgs'], + target: pulumi.Input[str], + bypass_actors: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetBypassActorArgs']]]] = None, + conditions: Optional[pulumi.Input['RepositoryRulesetConditionsArgs']] = None, + name: Optional[pulumi.Input[str]] = None, + repository: Optional[pulumi.Input[str]] = None): + """ + The set of arguments for constructing a RepositoryRuleset resource. + :param pulumi.Input[str] enforcement: (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + :param pulumi.Input['RepositoryRulesetRulesArgs'] rules: (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + :param pulumi.Input[str] target: (String) Possible values are `branch` and `tag`. + :param pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetBypassActorArgs']]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + :param pulumi.Input['RepositoryRulesetConditionsArgs'] conditions: (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[str] repository: (String) Name of the repository to apply rulset to. + """ + pulumi.set(__self__, "enforcement", enforcement) + pulumi.set(__self__, "rules", rules) + pulumi.set(__self__, "target", target) + if bypass_actors is not None: + pulumi.set(__self__, "bypass_actors", bypass_actors) + if conditions is not None: + pulumi.set(__self__, "conditions", conditions) + if name is not None: + pulumi.set(__self__, "name", name) + if repository is not None: + pulumi.set(__self__, "repository", repository) + + @property + @pulumi.getter + def enforcement(self) -> pulumi.Input[str]: + """ + (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + """ + return pulumi.get(self, "enforcement") + + @enforcement.setter + def enforcement(self, value: pulumi.Input[str]): + pulumi.set(self, "enforcement", value) + + @property + @pulumi.getter + def rules(self) -> pulumi.Input['RepositoryRulesetRulesArgs']: + """ + (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + """ + return pulumi.get(self, "rules") + + @rules.setter + def rules(self, value: pulumi.Input['RepositoryRulesetRulesArgs']): + pulumi.set(self, "rules", value) + + @property + @pulumi.getter + def target(self) -> pulumi.Input[str]: + """ + (String) Possible values are `branch` and `tag`. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: pulumi.Input[str]): + pulumi.set(self, "target", value) + + @property + @pulumi.getter(name="bypassActors") + def bypass_actors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetBypassActorArgs']]]]: + """ + (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + """ + return pulumi.get(self, "bypass_actors") + + @bypass_actors.setter + def bypass_actors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetBypassActorArgs']]]]): + pulumi.set(self, "bypass_actors", value) + + @property + @pulumi.getter + def conditions(self) -> Optional[pulumi.Input['RepositoryRulesetConditionsArgs']]: + """ + (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + """ + return pulumi.get(self, "conditions") + + @conditions.setter + def conditions(self, value: Optional[pulumi.Input['RepositoryRulesetConditionsArgs']]): + pulumi.set(self, "conditions", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def repository(self) -> Optional[pulumi.Input[str]]: + """ + (String) Name of the repository to apply rulset to. + """ + return pulumi.get(self, "repository") + + @repository.setter + def repository(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "repository", value) + + +@pulumi.input_type +class _RepositoryRulesetState: + def __init__(__self__, *, + bypass_actors: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetBypassActorArgs']]]] = None, + conditions: Optional[pulumi.Input['RepositoryRulesetConditionsArgs']] = None, + enforcement: Optional[pulumi.Input[str]] = None, + etag: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_id: Optional[pulumi.Input[str]] = None, + repository: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input['RepositoryRulesetRulesArgs']] = None, + ruleset_id: Optional[pulumi.Input[int]] = None, + target: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering RepositoryRuleset resources. + :param pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetBypassActorArgs']]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + :param pulumi.Input['RepositoryRulesetConditionsArgs'] conditions: (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + :param pulumi.Input[str] enforcement: (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + :param pulumi.Input[str] etag: (String) + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[str] node_id: (String) GraphQL global node id for use with v4 API. + :param pulumi.Input[str] repository: (String) Name of the repository to apply rulset to. + :param pulumi.Input['RepositoryRulesetRulesArgs'] rules: (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + :param pulumi.Input[int] ruleset_id: (Number) GitHub ID for the ruleset. + :param pulumi.Input[str] target: (String) Possible values are `branch` and `tag`. + """ + if bypass_actors is not None: + pulumi.set(__self__, "bypass_actors", bypass_actors) + if conditions is not None: + pulumi.set(__self__, "conditions", conditions) + if enforcement is not None: + pulumi.set(__self__, "enforcement", enforcement) + if etag is not None: + pulumi.set(__self__, "etag", etag) + if name is not None: + pulumi.set(__self__, "name", name) + if node_id is not None: + pulumi.set(__self__, "node_id", node_id) + if repository is not None: + pulumi.set(__self__, "repository", repository) + if rules is not None: + pulumi.set(__self__, "rules", rules) + if ruleset_id is not None: + pulumi.set(__self__, "ruleset_id", ruleset_id) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="bypassActors") + def bypass_actors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetBypassActorArgs']]]]: + """ + (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + """ + return pulumi.get(self, "bypass_actors") + + @bypass_actors.setter + def bypass_actors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RepositoryRulesetBypassActorArgs']]]]): + pulumi.set(self, "bypass_actors", value) + + @property + @pulumi.getter + def conditions(self) -> Optional[pulumi.Input['RepositoryRulesetConditionsArgs']]: + """ + (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + """ + return pulumi.get(self, "conditions") + + @conditions.setter + def conditions(self, value: Optional[pulumi.Input['RepositoryRulesetConditionsArgs']]): + pulumi.set(self, "conditions", value) + + @property + @pulumi.getter + def enforcement(self) -> Optional[pulumi.Input[str]]: + """ + (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + """ + return pulumi.get(self, "enforcement") + + @enforcement.setter + def enforcement(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "enforcement", value) + + @property + @pulumi.getter + def etag(self) -> Optional[pulumi.Input[str]]: + """ + (String) + """ + return pulumi.get(self, "etag") + + @etag.setter + def etag(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "etag", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter(name="nodeId") + def node_id(self) -> Optional[pulumi.Input[str]]: + """ + (String) GraphQL global node id for use with v4 API. + """ + return pulumi.get(self, "node_id") + + @node_id.setter + def node_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "node_id", value) + + @property + @pulumi.getter + def repository(self) -> Optional[pulumi.Input[str]]: + """ + (String) Name of the repository to apply rulset to. + """ + return pulumi.get(self, "repository") + + @repository.setter + def repository(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "repository", value) + + @property + @pulumi.getter + def rules(self) -> Optional[pulumi.Input['RepositoryRulesetRulesArgs']]: + """ + (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + """ + return pulumi.get(self, "rules") + + @rules.setter + def rules(self, value: Optional[pulumi.Input['RepositoryRulesetRulesArgs']]): + pulumi.set(self, "rules", value) + + @property + @pulumi.getter(name="rulesetId") + def ruleset_id(self) -> Optional[pulumi.Input[int]]: + """ + (Number) GitHub ID for the ruleset. + """ + return pulumi.get(self, "ruleset_id") + + @ruleset_id.setter + def ruleset_id(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "ruleset_id", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input[str]]: + """ + (String) Possible values are `branch` and `tag`. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "target", value) + + +class RepositoryRuleset(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + bypass_actors: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RepositoryRulesetBypassActorArgs']]]]] = None, + conditions: Optional[pulumi.Input[pulumi.InputType['RepositoryRulesetConditionsArgs']]] = None, + enforcement: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + repository: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[pulumi.InputType['RepositoryRulesetRulesArgs']]] = None, + target: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + Creates a GitHub repository ruleset. + + This resource allows you to create and manage rulesets on the repository level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example_repository = github.Repository("exampleRepository", description="Example repository") + example_repository_ruleset = github.RepositoryRuleset("exampleRepositoryRuleset", + repository=example_repository.name, + target="branch", + enforcement="active", + conditions=github.RepositoryRulesetConditionsArgs( + ref_name=github.RepositoryRulesetConditionsRefNameArgs( + includes=["~ALL"], + excludes=[], + ), + ), + bypass_actors=[github.RepositoryRulesetBypassActorArgs( + actor_id=13473, + actor_type="Integration", + bypass_mode="always", + )], + rules=github.RepositoryRulesetRulesArgs( + creation=True, + update=True, + deletion=True, + required_linear_history=True, + required_signatures=True, + required_deployments=github.RepositoryRulesetRulesRequiredDeploymentsArgs( + required_deployment_environments=["test"], + ), + )) + ``` + + ## Import + + GitHub Repository Rulesets can be imported using the GitHub repository name and ruleset ID e.g. + + ```sh + $ pulumi import github:index/repositoryRuleset:RepositoryRuleset example example:12345` + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RepositoryRulesetBypassActorArgs']]]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + :param pulumi.Input[pulumi.InputType['RepositoryRulesetConditionsArgs']] conditions: (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + :param pulumi.Input[str] enforcement: (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[str] repository: (String) Name of the repository to apply rulset to. + :param pulumi.Input[pulumi.InputType['RepositoryRulesetRulesArgs']] rules: (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + :param pulumi.Input[str] target: (String) Possible values are `branch` and `tag`. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: RepositoryRulesetArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Creates a GitHub repository ruleset. + + This resource allows you to create and manage rulesets on the repository level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example_repository = github.Repository("exampleRepository", description="Example repository") + example_repository_ruleset = github.RepositoryRuleset("exampleRepositoryRuleset", + repository=example_repository.name, + target="branch", + enforcement="active", + conditions=github.RepositoryRulesetConditionsArgs( + ref_name=github.RepositoryRulesetConditionsRefNameArgs( + includes=["~ALL"], + excludes=[], + ), + ), + bypass_actors=[github.RepositoryRulesetBypassActorArgs( + actor_id=13473, + actor_type="Integration", + bypass_mode="always", + )], + rules=github.RepositoryRulesetRulesArgs( + creation=True, + update=True, + deletion=True, + required_linear_history=True, + required_signatures=True, + required_deployments=github.RepositoryRulesetRulesRequiredDeploymentsArgs( + required_deployment_environments=["test"], + ), + )) + ``` + + ## Import + + GitHub Repository Rulesets can be imported using the GitHub repository name and ruleset ID e.g. + + ```sh + $ pulumi import github:index/repositoryRuleset:RepositoryRuleset example example:12345` + ``` + + :param str resource_name: The name of the resource. + :param RepositoryRulesetArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(RepositoryRulesetArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + bypass_actors: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RepositoryRulesetBypassActorArgs']]]]] = None, + conditions: Optional[pulumi.Input[pulumi.InputType['RepositoryRulesetConditionsArgs']]] = None, + enforcement: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + repository: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[pulumi.InputType['RepositoryRulesetRulesArgs']]] = None, + target: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = RepositoryRulesetArgs.__new__(RepositoryRulesetArgs) + + __props__.__dict__["bypass_actors"] = bypass_actors + __props__.__dict__["conditions"] = conditions + if enforcement is None and not opts.urn: + raise TypeError("Missing required property 'enforcement'") + __props__.__dict__["enforcement"] = enforcement + __props__.__dict__["name"] = name + __props__.__dict__["repository"] = repository + if rules is None and not opts.urn: + raise TypeError("Missing required property 'rules'") + __props__.__dict__["rules"] = rules + if target is None and not opts.urn: + raise TypeError("Missing required property 'target'") + __props__.__dict__["target"] = target + __props__.__dict__["etag"] = None + __props__.__dict__["node_id"] = None + __props__.__dict__["ruleset_id"] = None + super(RepositoryRuleset, __self__).__init__( + 'github:index/repositoryRuleset:RepositoryRuleset', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + bypass_actors: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RepositoryRulesetBypassActorArgs']]]]] = None, + conditions: Optional[pulumi.Input[pulumi.InputType['RepositoryRulesetConditionsArgs']]] = None, + enforcement: Optional[pulumi.Input[str]] = None, + etag: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + node_id: Optional[pulumi.Input[str]] = None, + repository: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[pulumi.InputType['RepositoryRulesetRulesArgs']]] = None, + ruleset_id: Optional[pulumi.Input[int]] = None, + target: Optional[pulumi.Input[str]] = None) -> 'RepositoryRuleset': + """ + Get an existing RepositoryRuleset resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RepositoryRulesetBypassActorArgs']]]] bypass_actors: (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + :param pulumi.Input[pulumi.InputType['RepositoryRulesetConditionsArgs']] conditions: (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + :param pulumi.Input[str] enforcement: (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + :param pulumi.Input[str] etag: (String) + :param pulumi.Input[str] name: (String) The name of the ruleset. + :param pulumi.Input[str] node_id: (String) GraphQL global node id for use with v4 API. + :param pulumi.Input[str] repository: (String) Name of the repository to apply rulset to. + :param pulumi.Input[pulumi.InputType['RepositoryRulesetRulesArgs']] rules: (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + :param pulumi.Input[int] ruleset_id: (Number) GitHub ID for the ruleset. + :param pulumi.Input[str] target: (String) Possible values are `branch` and `tag`. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _RepositoryRulesetState.__new__(_RepositoryRulesetState) + + __props__.__dict__["bypass_actors"] = bypass_actors + __props__.__dict__["conditions"] = conditions + __props__.__dict__["enforcement"] = enforcement + __props__.__dict__["etag"] = etag + __props__.__dict__["name"] = name + __props__.__dict__["node_id"] = node_id + __props__.__dict__["repository"] = repository + __props__.__dict__["rules"] = rules + __props__.__dict__["ruleset_id"] = ruleset_id + __props__.__dict__["target"] = target + return RepositoryRuleset(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="bypassActors") + def bypass_actors(self) -> pulumi.Output[Optional[Sequence['outputs.RepositoryRulesetBypassActor']]]: + """ + (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) + """ + return pulumi.get(self, "bypass_actors") + + @property + @pulumi.getter + def conditions(self) -> pulumi.Output[Optional['outputs.RepositoryRulesetConditions']]: + """ + (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) + """ + return pulumi.get(self, "conditions") + + @property + @pulumi.getter + def enforcement(self) -> pulumi.Output[str]: + """ + (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + """ + return pulumi.get(self, "enforcement") + + @property + @pulumi.getter + def etag(self) -> pulumi.Output[str]: + """ + (String) + """ + return pulumi.get(self, "etag") + + @property + @pulumi.getter + def name(self) -> pulumi.Output[str]: + """ + (String) The name of the ruleset. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="nodeId") + def node_id(self) -> pulumi.Output[str]: + """ + (String) GraphQL global node id for use with v4 API. + """ + return pulumi.get(self, "node_id") + + @property + @pulumi.getter + def repository(self) -> pulumi.Output[Optional[str]]: + """ + (String) Name of the repository to apply rulset to. + """ + return pulumi.get(self, "repository") + + @property + @pulumi.getter + def rules(self) -> pulumi.Output['outputs.RepositoryRulesetRules']: + """ + (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) + """ + return pulumi.get(self, "rules") + + @property + @pulumi.getter(name="rulesetId") + def ruleset_id(self) -> pulumi.Output[int]: + """ + (Number) GitHub ID for the ruleset. + """ + return pulumi.get(self, "ruleset_id") + + @property + @pulumi.getter + def target(self) -> pulumi.Output[str]: + """ + (String) Possible values are `branch` and `tag`. + """ + return pulumi.get(self, "target") + diff --git a/sdk/python/pulumi_github/repository_topics.py b/sdk/python/pulumi_github/repository_topics.py new file mode 100644 index 00000000..04f057b6 --- /dev/null +++ b/sdk/python/pulumi_github/repository_topics.py @@ -0,0 +1,236 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities + +__all__ = ['RepositoryTopicsArgs', 'RepositoryTopics'] + +@pulumi.input_type +class RepositoryTopicsArgs: + def __init__(__self__, *, + repository: pulumi.Input[str], + topics: pulumi.Input[Sequence[pulumi.Input[str]]]): + """ + The set of arguments for constructing a RepositoryTopics resource. + :param pulumi.Input[str] repository: The repository name. + :param pulumi.Input[Sequence[pulumi.Input[str]]] topics: A list of topics to add to the repository. + """ + pulumi.set(__self__, "repository", repository) + pulumi.set(__self__, "topics", topics) + + @property + @pulumi.getter + def repository(self) -> pulumi.Input[str]: + """ + The repository name. + """ + return pulumi.get(self, "repository") + + @repository.setter + def repository(self, value: pulumi.Input[str]): + pulumi.set(self, "repository", value) + + @property + @pulumi.getter + def topics(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + A list of topics to add to the repository. + """ + return pulumi.get(self, "topics") + + @topics.setter + def topics(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "topics", value) + + +@pulumi.input_type +class _RepositoryTopicsState: + def __init__(__self__, *, + repository: Optional[pulumi.Input[str]] = None, + topics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): + """ + Input properties used for looking up and filtering RepositoryTopics resources. + :param pulumi.Input[str] repository: The repository name. + :param pulumi.Input[Sequence[pulumi.Input[str]]] topics: A list of topics to add to the repository. + """ + if repository is not None: + pulumi.set(__self__, "repository", repository) + if topics is not None: + pulumi.set(__self__, "topics", topics) + + @property + @pulumi.getter + def repository(self) -> Optional[pulumi.Input[str]]: + """ + The repository name. + """ + return pulumi.get(self, "repository") + + @repository.setter + def repository(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "repository", value) + + @property + @pulumi.getter + def topics(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + A list of topics to add to the repository. + """ + return pulumi.get(self, "topics") + + @topics.setter + def topics(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "topics", value) + + +class RepositoryTopics(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + repository: Optional[pulumi.Input[str]] = None, + topics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + __props__=None): + """ + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + test_repository = github.get_repository(name="test") + test_repository_topics = github.RepositoryTopics("testRepositoryTopics", + repository=github_repository["test"]["name"], + topics=[ + "topic-1", + "topic-2", + ]) + ``` + + ## Import + + Repository topics can be imported using the `name` of the repository. + + ```sh + $ pulumi import github:index/repositoryTopics:RepositoryTopics terraform terraform + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] repository: The repository name. + :param pulumi.Input[Sequence[pulumi.Input[str]]] topics: A list of topics to add to the repository. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: RepositoryTopicsArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + test_repository = github.get_repository(name="test") + test_repository_topics = github.RepositoryTopics("testRepositoryTopics", + repository=github_repository["test"]["name"], + topics=[ + "topic-1", + "topic-2", + ]) + ``` + + ## Import + + Repository topics can be imported using the `name` of the repository. + + ```sh + $ pulumi import github:index/repositoryTopics:RepositoryTopics terraform terraform + ``` + + :param str resource_name: The name of the resource. + :param RepositoryTopicsArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(RepositoryTopicsArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + repository: Optional[pulumi.Input[str]] = None, + topics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = RepositoryTopicsArgs.__new__(RepositoryTopicsArgs) + + if repository is None and not opts.urn: + raise TypeError("Missing required property 'repository'") + __props__.__dict__["repository"] = repository + if topics is None and not opts.urn: + raise TypeError("Missing required property 'topics'") + __props__.__dict__["topics"] = topics + super(RepositoryTopics, __self__).__init__( + 'github:index/repositoryTopics:RepositoryTopics', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + repository: Optional[pulumi.Input[str]] = None, + topics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'RepositoryTopics': + """ + Get an existing RepositoryTopics resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] repository: The repository name. + :param pulumi.Input[Sequence[pulumi.Input[str]]] topics: A list of topics to add to the repository. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _RepositoryTopicsState.__new__(_RepositoryTopicsState) + + __props__.__dict__["repository"] = repository + __props__.__dict__["topics"] = topics + return RepositoryTopics(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def repository(self) -> pulumi.Output[str]: + """ + The repository name. + """ + return pulumi.get(self, "repository") + + @property + @pulumi.getter + def topics(self) -> pulumi.Output[Sequence[str]]: + """ + A list of topics to add to the repository. + """ + return pulumi.get(self, "topics") +