diff --git a/examples/go.mod b/examples/go.mod index b8bfb334..fabfc015 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,10 @@ module github.com/pulumi/pulumi-github/examples/v4 go 1.19 -require github.com/pulumi/pulumi/pkg/v3 v3.19.0 +require ( + github.com/pulumi/pulumi/pkg/v3 v3.19.0 + github.com/stretchr/testify v1.8.1 +) require ( cloud.google.com/go v0.110.0 // indirect @@ -100,7 +103,6 @@ require ( github.com/spf13/cobra v1.0.0 // indirect github.com/spf13/pflag v1.0.3 // indirect github.com/src-d/gcfg v1.4.0 // indirect - github.com/stretchr/testify v1.8.1 // indirect github.com/texttheater/golang-levenshtein v0.0.0-20191208221605-eb6844b05fc6 // indirect github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect github.com/uber/jaeger-client-go v2.22.1+incompatible // indirect diff --git a/provider/cmd/pulumi-resource-github/bridge-metadata.json b/provider/cmd/pulumi-resource-github/bridge-metadata.json index 24cfd7fc..fbeb2740 100644 --- a/provider/cmd/pulumi-resource-github/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-github/bridge-metadata.json @@ -552,12 +552,18 @@ "github_repository": { "current": "github:index/getRepository:getRepository" }, + "github_repository_autolink_references": { + "current": "github:index/getRepositoryAutolinkReferences:getRepositoryAutolinkReferences" + }, "github_repository_branches": { "current": "github:index/getRepositoryBranches:getRepositoryBranches" }, "github_repository_deploy_keys": { "current": "github:index/getRepositoryDeployKeys:getRepositoryDeployKeys" }, + "github_repository_environments": { + "current": "github:index/getRepositoryEnvironments:getRepositoryEnvironments" + }, "github_repository_file": { "current": "github:index/getRepositoryFile:getRepositoryFile" }, @@ -576,6 +582,9 @@ "github_repository_webhooks": { "current": "github:index/getRepositoryWebhooks:getRepositoryWebhooks" }, + "github_rest_api": { + "current": "github:index/getRestApi:getRestApi" + }, "github_ssh_keys": { "current": "github:index/getSshKeys:getSshKeys" }, @@ -687,14 +696,17 @@ "github:index/getRelease:getRelease": "github_release", "github:index/getRepositories:getRepositories": "github_repositories", "github:index/getRepository:getRepository": "github_repository", + "github:index/getRepositoryAutolinkReferences:getRepositoryAutolinkReferences": "github_repository_autolink_references", "github:index/getRepositoryBranches:getRepositoryBranches": "github_repository_branches", "github:index/getRepositoryDeployKeys:getRepositoryDeployKeys": "github_repository_deploy_keys", + "github:index/getRepositoryEnvironments:getRepositoryEnvironments": "github_repository_environments", "github:index/getRepositoryFile:getRepositoryFile": "github_repository_file", "github:index/getRepositoryMilestone:getRepositoryMilestone": "github_repository_milestone", "github:index/getRepositoryPullRequest:getRepositoryPullRequest": "github_repository_pull_request", "github:index/getRepositoryPullRequests:getRepositoryPullRequests": "github_repository_pull_requests", "github:index/getRepositoryTeams:getRepositoryTeams": "github_repository_teams", "github:index/getRepositoryWebhooks:getRepositoryWebhooks": "github_repository_webhooks", + "github:index/getRestApi:getRestApi": "github_rest_api", "github:index/getSshKeys:getSshKeys": "github_ssh_keys", "github:index/getTeam:getTeam": "github_team", "github:index/getTree:getTree": "github_tree", @@ -756,6 +768,7 @@ "protectedBranches": "protected_branches" }, "github:index/RepositoryPages:RepositoryPages": { + "buildType": "build_type", "custom404": "custom_404", "htmlUrl": "html_url" }, @@ -1113,10 +1126,21 @@ "sshCloneUrl": "ssh_clone_url", "svnUrl": "svn_url" }, + "github:index/getRepositoryAutolinkReferences:getRepositoryAutolinkReferences": { + "autolinkReferences": "autolink_references" + }, + "github:index/getRepositoryAutolinkReferencesAutolinkReference:getRepositoryAutolinkReferencesAutolinkReference": { + "isAlphanumeric": "is_alphanumeric", + "keyPrefix": "key_prefix", + "targetUrlTemplate": "target_url_template" + }, "github:index/getRepositoryBranches:getRepositoryBranches": { "onlyNonProtectedBranches": "only_non_protected_branches", "onlyProtectedBranches": "only_protected_branches" }, + "github:index/getRepositoryEnvironmentsEnvironment:getRepositoryEnvironmentsEnvironment": { + "nodeId": "node_id" + }, "github:index/getRepositoryFile:getRepositoryFile": { "commitAuthor": "commit_author", "commitEmail": "commit_email", @@ -1169,9 +1193,14 @@ "github:index/getTeam:getTeam": { "membershipType": "membership_type", "nodeId": "node_id", + "repositoriesDetaileds": "repositories_detailed", "resultsPerPage": "results_per_page", "summaryOnly": "summary_only" }, + "github:index/getTeamRepositoriesDetailed:getTeamRepositoriesDetailed": { + "repoId": "repo_id", + "roleName": "role_name" + }, "github:index/getTree:getTree": { "treeSha": "tree_sha" }, diff --git a/provider/cmd/pulumi-resource-github/schema.json b/provider/cmd/pulumi-resource-github/schema.json index 35226149..141da1c5 100644 --- a/provider/cmd/pulumi-resource-github/schema.json +++ b/provider/cmd/pulumi-resource-github/schema.json @@ -472,6 +472,10 @@ }, "github:index/RepositoryPages:RepositoryPages": { "properties": { + "buildType": { + "type": "string", + "description": "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`.\n" + }, "cname": { "type": "string", "description": "The custom domain for the repository. This can only be set after the repository has been created.\n" @@ -497,15 +501,11 @@ } }, "type": "object", - "required": [ - "source" - ], "language": { "nodejs": { "requiredOutputs": [ "custom404", "htmlUrl", - "source", "status", "url" ] @@ -1331,6 +1331,33 @@ } } }, + "github:index/getRepositoryAutolinkReferencesAutolinkReference:getRepositoryAutolinkReferencesAutolinkReference": { + "properties": { + "isAlphanumeric": { + "type": "boolean", + "description": "True if alphanumeric.\n" + }, + "keyPrefix": { + "type": "string", + "description": "Key prefix.\n" + }, + "targetUrlTemplate": { + "type": "string", + "description": "Target url template.\n" + } + }, + "type": "object", + "required": [ + "isAlphanumeric", + "keyPrefix", + "targetUrlTemplate" + ], + "language": { + "nodejs": { + "requiredInputs": [] + } + } + }, "github:index/getRepositoryBranchesBranch:getRepositoryBranchesBranch": { "properties": { "name": { @@ -1385,6 +1412,28 @@ } } }, + "github:index/getRepositoryEnvironmentsEnvironment:getRepositoryEnvironmentsEnvironment": { + "properties": { + "name": { + "type": "string", + "description": "Environment name.\n" + }, + "nodeId": { + "type": "string", + "description": "Environment node id.\n" + } + }, + "type": "object", + "required": [ + "name", + "nodeId" + ], + "language": { + "nodejs": { + "requiredInputs": [] + } + } + }, "github:index/getRepositoryPage:getRepositoryPage": { "properties": { "cname": { @@ -1624,6 +1673,26 @@ } } }, + "github:index/getTeamRepositoriesDetailed:getTeamRepositoriesDetailed": { + "properties": { + "repoId": { + "type": "integer" + }, + "roleName": { + "type": "string" + } + }, + "type": "object", + "required": [ + "repoId", + "roleName" + ], + "language": { + "nodejs": { + "requiredInputs": [] + } + } + }, "github:index/getTreeEntry:getTreeEntry": { "properties": { "mode": { @@ -2527,7 +2596,7 @@ "properties": { "allowsPublicRepositories": { "type": "boolean", - "description": "Whether public repositories can be added to the runner group\n" + "description": "Whether public repositories can be added to the runner group. Defaults to false.\n" }, "default": { "type": "boolean", @@ -2577,7 +2646,6 @@ } }, "required": [ - "allowsPublicRepositories", "default", "etag", "inherited", @@ -2587,6 +2655,10 @@ "visibility" ], "inputProperties": { + "allowsPublicRepositories": { + "type": "boolean", + "description": "Whether public repositories can be added to the runner group. Defaults to false.\n" + }, "name": { "type": "string", "description": "Name of the runner group\n" @@ -2622,7 +2694,7 @@ "properties": { "allowsPublicRepositories": { "type": "boolean", - "description": "Whether public repositories can be added to the runner group\n" + "description": "Whether public repositories can be added to the runner group. Defaults to false.\n" }, "default": { "type": "boolean", @@ -8456,7 +8528,7 @@ "properties": { "description": { "type": "string", - "description": "The description the organization account\n" + "description": "The organization account description\n" }, "id": { "type": "string", @@ -8480,7 +8552,7 @@ }, "nodeId": { "type": "string", - "description": "GraphQL global node id for use with v4 API\n" + "description": "GraphQL global node ID for use with the v4 API\n" }, "orgname": { "type": "string", @@ -8488,14 +8560,14 @@ }, "plan": { "type": "string", - "description": "The plan name for the organization account\n" + "description": "The organization account plan name\n" }, "repositories": { "type": "array", "items": { "type": "string" }, - "description": "(`list`) A list with the repositories on the organization\n" + "description": "(`list`) A list of the full names of the repositories in the organization formatted as `owner/name` strings\n" }, "users": { "type": "array", @@ -9137,6 +9209,47 @@ ] } }, + "github:index/getRepositoryAutolinkReferences:getRepositoryAutolinkReferences": { + "description": "Use this data source to retrieve autolink references for a repository.\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 = github.getRepositoryAutolinkReferences({\n repository: \"example-repository\",\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample = github.get_repository_autolink_references(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 = Github.GetRepositoryAutolinkReferences.Invoke(new()\n {\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.GetRepositoryAutolinkReferences(ctx, \u0026github.GetRepositoryAutolinkReferencesArgs{\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\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.GetRepositoryAutolinkReferencesArgs;\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 example = GithubFunctions.getRepositoryAutolinkReferences(GetRepositoryAutolinkReferencesArgs.builder()\n .repository(\"example-repository\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: github:getRepositoryAutolinkReferences\n Arguments:\n repository: example-repository\n```\n{{% /example %}}\n{{% /examples %}}", + "inputs": { + "description": "A collection of arguments for invoking getRepositoryAutolinkReferences.\n", + "properties": { + "repository": { + "type": "string", + "description": "Name of the repository to retrieve the autolink references from.\n" + } + }, + "type": "object", + "required": [ + "repository" + ] + }, + "outputs": { + "description": "A collection of values returned by getRepositoryAutolinkReferences.\n", + "properties": { + "autolinkReferences": { + "type": "array", + "items": { + "$ref": "#/types/github:index/getRepositoryAutolinkReferencesAutolinkReference:getRepositoryAutolinkReferencesAutolinkReference" + }, + "description": "The list of this repository's autolink references. Each element of `autolink_references` has the following attributes:\n" + }, + "id": { + "type": "string", + "description": "The provider-assigned unique ID for this managed resource.\n" + }, + "repository": { + "type": "string" + } + }, + "type": "object", + "required": [ + "autolinkReferences", + "repository", + "id" + ] + } + }, "github:index/getRepositoryBranches:getRepositoryBranches": { "description": "Use this data source to retrieve information about branches in a repository.\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 = github.getRepositoryBranches({\n repository: \"example-repository\",\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample = github.get_repository_branches(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 = Github.GetRepositoryBranches.Invoke(new()\n {\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.GetRepositoryBranches(ctx, \u0026github.GetRepositoryBranchesArgs{\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\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.GetRepositoryBranchesArgs;\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 example = GithubFunctions.getRepositoryBranches(GetRepositoryBranchesArgs.builder()\n .repository(\"example-repository\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: github:getRepositoryBranches\n Arguments:\n repository: example-repository\n```\n{{% /example %}}\n{{% /examples %}}", "inputs": { @@ -9233,6 +9346,47 @@ ] } }, + "github:index/getRepositoryEnvironments:getRepositoryEnvironments": { + "description": "Use this data source to retrieve information about environments for a repository.\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 = github.getRepositoryEnvironments({\n repository: \"example-repository\",\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample = github.get_repository_environments(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 = Github.GetRepositoryEnvironments.Invoke(new()\n {\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.GetRepositoryEnvironments(ctx, \u0026github.GetRepositoryEnvironmentsArgs{\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\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.GetRepositoryEnvironmentsArgs;\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 example = GithubFunctions.getRepositoryEnvironments(GetRepositoryEnvironmentsArgs.builder()\n .repository(\"example-repository\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: github:getRepositoryEnvironments\n Arguments:\n repository: example-repository\n```\n{{% /example %}}\n{{% /examples %}}", + "inputs": { + "description": "A collection of arguments for invoking getRepositoryEnvironments.\n", + "properties": { + "repository": { + "type": "string", + "description": "Name of the repository to retrieve the environments from.\n" + } + }, + "type": "object", + "required": [ + "repository" + ] + }, + "outputs": { + "description": "A collection of values returned by getRepositoryEnvironments.\n", + "properties": { + "environments": { + "type": "array", + "items": { + "$ref": "#/types/github:index/getRepositoryEnvironmentsEnvironment:getRepositoryEnvironmentsEnvironment" + }, + "description": "The list of this repository's environments. Each element of `environments` has the following attributes:\n" + }, + "id": { + "type": "string", + "description": "The provider-assigned unique ID for this managed resource.\n" + }, + "repository": { + "type": "string" + } + }, + "type": "object", + "required": [ + "environments", + "repository", + "id" + ] + } + }, "github:index/getRepositoryFile:getRepositoryFile": { "description": "This data source allows you to read files within a\nGitHub repository.\n\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 foo = github.getRepositoryFile({\n repository: github_repository.foo.name,\n branch: \"main\",\n file: \".gitignore\",\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nfoo = github.get_repository_file(repository=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),\n branch=\"main\",\n file=\".gitignore\")\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 foo = Github.GetRepositoryFile.Invoke(new()\n {\n Repository = github_repository.Foo.Name,\n Branch = \"main\",\n File = \".gitignore\",\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.LookupRepositoryFile(ctx, \u0026github.LookupRepositoryFileArgs{\n\t\t\tRepository: github_repository.Foo.Name,\n\t\t\tBranch: pulumi.StringRef(\"main\"),\n\t\t\tFile: \".gitignore\",\n\t\t}, nil)\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.GetRepositoryFileArgs;\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 foo = GithubFunctions.getRepositoryFile(GetRepositoryFileArgs.builder()\n .repository(github_repository.foo().name())\n .branch(\"main\")\n .file(\".gitignore\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n foo:\n fn::invoke:\n Function: github:getRepositoryFile\n Arguments:\n repository: ${github_repository.foo.name}\n branch: main\n file: .gitignore\n```\n{{% /example %}}\n{{% /examples %}}", "inputs": { @@ -9687,6 +9841,66 @@ ] } }, + "github:index/getRestApi:getRestApi": { + "description": "Use this data source to retrieve information about a GitHub resource through REST API.\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 = github.getRestApi({\n endpoint: \"repos/example_repo/git/refs/heads/main\",\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample = github.get_rest_api(endpoint=\"repos/example_repo/git/refs/heads/main\")\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 = Github.GetRestApi.Invoke(new()\n {\n Endpoint = \"repos/example_repo/git/refs/heads/main\",\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.GetRestApi(ctx, \u0026github.GetRestApiArgs{\n\t\t\tEndpoint: \"repos/example_repo/git/refs/heads/main\",\n\t\t}, nil)\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.GetRestApiArgs;\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 example = GithubFunctions.getRestApi(GetRestApiArgs.builder()\n .endpoint(\"repos/example_repo/git/refs/heads/main\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: github:getRestApi\n Arguments:\n endpoint: repos/example_repo/git/refs/heads/main\n```\n{{% /example %}}\n{{% /examples %}}", + "inputs": { + "description": "A collection of arguments for invoking getRestApi.\n", + "properties": { + "endpoint": { + "type": "string", + "description": "REST API endpoint to send the GET request to.\n", + "willReplaceOnChanges": true + } + }, + "type": "object", + "required": [ + "endpoint" + ] + }, + "outputs": { + "description": "A collection of values returned by getRestApi.\n", + "properties": { + "body": { + "type": "object", + "additionalProperties": { + "$ref": "pulumi.json#/Any" + }, + "description": "A map of response body.\n" + }, + "code": { + "type": "integer", + "description": "A response status code.\n" + }, + "endpoint": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "pulumi.json#/Any" + }, + "description": "A map of response headers.\n" + }, + "id": { + "type": "string", + "description": "The provider-assigned unique ID for this managed resource.\n" + }, + "status": { + "type": "string", + "description": "A response status string.\n" + } + }, + "type": "object", + "required": [ + "body", + "code", + "endpoint", + "headers", + "status", + "id" + ] + } + }, "github:index/getSshKeys:getSshKeys": { "description": "Use this data source to retrieve information about GitHub's SSH keys.\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 test = github.getSshKeys({});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\ntest = github.get_ssh_keys()\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 test = Github.GetSshKeys.Invoke();\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.GetSshKeys(ctx, nil, nil)\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 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 test = GithubFunctions.getSshKeys();\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: github:getSshKeys\n Arguments: {}\n```\n{{% /example %}}\n{{% /examples %}}", "outputs": { @@ -9782,6 +9996,13 @@ }, "description": "List of team repositories (list of repo names). Not returned if `summary_only = true`\n" }, + "repositoriesDetaileds": { + "type": "array", + "items": { + "$ref": "#/types/github:index/getTeamRepositoriesDetailed:getTeamRepositoriesDetailed" + }, + "description": "List of team repositories (list of `repo_id` and `role_name`). Not returned if `summary_only = true`\n" + }, "resultsPerPage": { "type": "integer" }, @@ -9801,6 +10022,7 @@ "permission", "privacy", "repositories", + "repositoriesDetaileds", "slug", "id" ] diff --git a/provider/go.mod b/provider/go.mod index 44f4ae34..8fa41b29 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -4,9 +4,9 @@ go 1.19 require ( github.com/hashicorp/terraform-plugin-sdk v1.17.2 - github.com/integrations/terraform-provider-github/v5 v5.25.1 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.47.2 - github.com/pulumi/pulumi/sdk/v3 v3.68.0 + github.com/integrations/terraform-provider-github/v5 v5.26.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.48.1-0.20230527113951-a0f92e793f31 + github.com/pulumi/pulumi/sdk/v3 v3.69.0 ) require ( @@ -28,6 +28,7 @@ require ( github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect + github.com/BurntSushi/toml v1.2.1 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect @@ -156,9 +157,9 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/posener/complete v1.2.3 // indirect github.com/pulumi/pulumi-java/pkg v0.9.2 // indirect - github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.3 // indirect + github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 // indirect github.com/pulumi/pulumi-yaml v1.1.1 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.68.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.69.0 // indirect github.com/pulumi/schema-tools v0.2.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e // indirect github.com/rivo/uniseg v0.4.4 // indirect @@ -178,7 +179,7 @@ require ( github.com/spf13/cast v1.5.0 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.8.2 // indirect + github.com/stretchr/testify v1.8.3 // indirect github.com/texttheater/golang-levenshtein v1.0.1 // indirect github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect diff --git a/provider/go.sum b/provider/go.sum index 9a9a1c47..afa5aad1 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -491,6 +491,8 @@ github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1/go.mod h1:4qFo github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GoogleCloudPlatform/cloudsql-proxy v1.33.2/go.mod h1:uqoR4sJc63p7ugW8a/vsEspOsNuehbi7ptS2CHCyOnY= @@ -1509,8 +1511,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.25.1 h1:j6Uj8X9+69NIIOFq6P2mVPZwQWeVe3rk3dKrsrKNQrk= -github.com/integrations/terraform-provider-github/v5 v5.25.1/go.mod h1:j0SAs35Ui+MRFGR4Z2ojnwhtD3rWH09AKJY8DtmTZy8= +github.com/integrations/terraform-provider-github/v5 v5.26.0 h1:Q4uhfaNqze6v2fDEoRh88zjOVGwfGicsjkBTk5vDmZc= +github.com/integrations/terraform-provider-github/v5 v5.26.0/go.mod h1:iCRmAR04wpWR1s8GeRkF3JAZfWU5c7Lvb4gjZNDvw6k= 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= @@ -1972,16 +1974,16 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/pulumi/pulumi-java/pkg v0.9.2 h1:fpBwf1NHf3j5YuigOWsXPvJCAFivEp1D6aOlYIrSbr0= github.com/pulumi/pulumi-java/pkg v0.9.2/go.mod h1:+5V4jggi3063hksi28zYvLm42UWVg3VqpR6qGZraIdM= github.com/pulumi/pulumi-terraform-bridge/testing v0.0.1 h1:SCg1gjfY9N4yn8U8peIUYATifjoDABkyR7H9lmefsfc= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.47.2 h1:uNrHr+VQJ5e8GzLt8c3iBG32KHjG3Z2YBvtTncsy39U= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.47.2/go.mod h1:bXuzPzwY73LZH5+EgdSlHTV8ed09p51ztpca2G13fLI= -github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.3 h1:1SmRVwRnrplcdBVVgoKYL8xqW8dCeiQPSwpGkx4ga6U= -github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.3/go.mod h1:n0TS1WsPjOfto6hyDZbXfNZQuLli2X9iDWt2nzmQJsg= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.48.1-0.20230527113951-a0f92e793f31 h1:aEdt+2p7mQvrhW28SIgeLu5mAVAN7dKq/MerFJwzmgM= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.48.1-0.20230527113951-a0f92e793f31/go.mod h1:8ufh6u3Pl7/Jl0WHAPyMRG2OXPlELPuNJBvfl23OgGM= +github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 h1:rIzMmtcVpPX8ynaz6/nW5AHNY63DiNfCohqmxWvMpM4= +github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4/go.mod h1:Kt8RIZWa/N8rW3+0g6NrqCBmF3o+HuIhFaZpssEkG6w= github.com/pulumi/pulumi-yaml v1.1.1 h1:8pyBNIU8+ym0wYpjhsCqN+cutygfK1XbhY2YEeNfyXY= github.com/pulumi/pulumi-yaml v1.1.1/go.mod h1:GhpdS6rFpwqvUtKdA+fQy8P28iNvncng39IXh5q68vE= -github.com/pulumi/pulumi/pkg/v3 v3.68.0 h1:JeJAAJiVe6JliNRKI1ABYPfUJ3Fcy72qYoVZJSOjvNE= -github.com/pulumi/pulumi/pkg/v3 v3.68.0/go.mod h1:4uJVC8hkWk0PxTx/d64da9x3IUJxBGR6RXi8eUv7Rvk= -github.com/pulumi/pulumi/sdk/v3 v3.68.0 h1:JWn3DGJhzoWL8bNbUdyLSSPeKS2F9mv14/EL9QeVT3w= -github.com/pulumi/pulumi/sdk/v3 v3.68.0/go.mod h1:A/WHc5MlxU8GpX/sRmfQ9G0/Bxxl4GNdSP7TQmy4yIw= +github.com/pulumi/pulumi/pkg/v3 v3.69.0 h1:IP9WCBFYRXWzbEFNsSquBoHKF5ux32XImKpRdju8HjU= +github.com/pulumi/pulumi/pkg/v3 v3.69.0/go.mod h1:GbsJqE2bGotPY+mj07LKlpps9ZzAlV7qRQ/u77kw9yk= +github.com/pulumi/pulumi/sdk/v3 v3.69.0 h1:WENc7menQMT10I34kVg1ZatQTMlifovuZ9i8CcTrk7A= +github.com/pulumi/pulumi/sdk/v3 v3.69.0/go.mod h1:BUUBfQZsH0FPuznRfFHkR+b96VlXELnn+DgidFj4XSQ= github.com/pulumi/schema-tools v0.2.2 h1:KiH/OP/mFF5XjXcOtrPOZ2Z5Sjtb0mLAaHgjJMcjMi4= github.com/pulumi/schema-tools v0.2.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e h1:Dik4Qe/+xguB8JagPyXNlbOnRiXGmq/PSPQTGunYnTk= @@ -2121,8 +2123,8 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= diff --git a/sdk/dotnet/ActionsRunnerGroup.cs b/sdk/dotnet/ActionsRunnerGroup.cs index 5448bc93..6afed74c 100644 --- a/sdk/dotnet/ActionsRunnerGroup.cs +++ b/sdk/dotnet/ActionsRunnerGroup.cs @@ -49,10 +49,10 @@ namespace Pulumi.Github public partial class ActionsRunnerGroup : global::Pulumi.CustomResource { /// - /// Whether public repositories can be added to the runner group + /// Whether public repositories can be added to the runner group. Defaults to false. /// [Output("allowsPublicRepositories")] - public Output AllowsPublicRepositories { get; private set; } = null!; + public Output AllowsPublicRepositories { get; private set; } = null!; /// /// Whether this is the default runner group @@ -160,6 +160,12 @@ public static ActionsRunnerGroup Get(string name, Input id, ActionsRunne public sealed class ActionsRunnerGroupArgs : global::Pulumi.ResourceArgs { + /// + /// Whether public repositories can be added to the runner group. Defaults to false. + /// + [Input("allowsPublicRepositories")] + public Input? AllowsPublicRepositories { get; set; } + /// /// Name of the runner group /// @@ -211,7 +217,7 @@ public ActionsRunnerGroupArgs() public sealed class ActionsRunnerGroupState : global::Pulumi.ResourceArgs { /// - /// Whether public repositories can be added to the runner group + /// Whether public repositories can be added to the runner group. Defaults to false. /// [Input("allowsPublicRepositories")] public Input? AllowsPublicRepositories { get; set; } diff --git a/sdk/dotnet/GetOrganization.cs b/sdk/dotnet/GetOrganization.cs index 97cb2d94..9a65f188 100644 --- a/sdk/dotnet/GetOrganization.cs +++ b/sdk/dotnet/GetOrganization.cs @@ -102,7 +102,7 @@ public GetOrganizationInvokeArgs() public sealed class GetOrganizationResult { /// - /// The description the organization account + /// The organization account description /// public readonly string Description; /// @@ -122,7 +122,7 @@ public sealed class GetOrganizationResult /// public readonly string Name; /// - /// GraphQL global node id for use with v4 API + /// GraphQL global node ID for use with the v4 API /// public readonly string NodeId; /// @@ -130,11 +130,11 @@ public sealed class GetOrganizationResult /// public readonly string Orgname; /// - /// The plan name for the organization account + /// The organization account plan name /// public readonly string Plan; /// - /// (`list`) A list with the repositories on the organization + /// (`list`) A list of the full names of the repositories in the organization formatted as `owner/name` strings /// public readonly ImmutableArray Repositories; /// diff --git a/sdk/dotnet/GetRepositoryAutolinkReferences.cs b/sdk/dotnet/GetRepositoryAutolinkReferences.cs new file mode 100644 index 00000000..18df7c67 --- /dev/null +++ b/sdk/dotnet/GetRepositoryAutolinkReferences.cs @@ -0,0 +1,127 @@ +// *** 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 +{ + public static class GetRepositoryAutolinkReferences + { + /// + /// Use this data source to retrieve autolink references for a repository. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Github.GetRepositoryAutolinkReferences.Invoke(new() + /// { + /// Repository = "example-repository", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} + /// + public static Task InvokeAsync(GetRepositoryAutolinkReferencesArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("github:index/getRepositoryAutolinkReferences:getRepositoryAutolinkReferences", args ?? new GetRepositoryAutolinkReferencesArgs(), options.WithDefaults()); + + /// + /// Use this data source to retrieve autolink references for a repository. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Github.GetRepositoryAutolinkReferences.Invoke(new() + /// { + /// Repository = "example-repository", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} + /// + public static Output Invoke(GetRepositoryAutolinkReferencesInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("github:index/getRepositoryAutolinkReferences:getRepositoryAutolinkReferences", args ?? new GetRepositoryAutolinkReferencesInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetRepositoryAutolinkReferencesArgs : global::Pulumi.InvokeArgs + { + /// + /// Name of the repository to retrieve the autolink references from. + /// + [Input("repository", required: true)] + public string Repository { get; set; } = null!; + + public GetRepositoryAutolinkReferencesArgs() + { + } + public static new GetRepositoryAutolinkReferencesArgs Empty => new GetRepositoryAutolinkReferencesArgs(); + } + + public sealed class GetRepositoryAutolinkReferencesInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// Name of the repository to retrieve the autolink references from. + /// + [Input("repository", required: true)] + public Input Repository { get; set; } = null!; + + public GetRepositoryAutolinkReferencesInvokeArgs() + { + } + public static new GetRepositoryAutolinkReferencesInvokeArgs Empty => new GetRepositoryAutolinkReferencesInvokeArgs(); + } + + + [OutputType] + public sealed class GetRepositoryAutolinkReferencesResult + { + /// + /// The list of this repository's autolink references. Each element of `autolink_references` has the following attributes: + /// + public readonly ImmutableArray AutolinkReferences; + /// + /// The provider-assigned unique ID for this managed resource. + /// + public readonly string Id; + public readonly string Repository; + + [OutputConstructor] + private GetRepositoryAutolinkReferencesResult( + ImmutableArray autolinkReferences, + + string id, + + string repository) + { + AutolinkReferences = autolinkReferences; + Id = id; + Repository = repository; + } + } +} diff --git a/sdk/dotnet/GetRepositoryEnvironments.cs b/sdk/dotnet/GetRepositoryEnvironments.cs new file mode 100644 index 00000000..36adabce --- /dev/null +++ b/sdk/dotnet/GetRepositoryEnvironments.cs @@ -0,0 +1,127 @@ +// *** 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 +{ + public static class GetRepositoryEnvironments + { + /// + /// Use this data source to retrieve information about environments for a repository. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Github.GetRepositoryEnvironments.Invoke(new() + /// { + /// Repository = "example-repository", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} + /// + public static Task InvokeAsync(GetRepositoryEnvironmentsArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("github:index/getRepositoryEnvironments:getRepositoryEnvironments", args ?? new GetRepositoryEnvironmentsArgs(), options.WithDefaults()); + + /// + /// Use this data source to retrieve information about environments for a repository. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Github.GetRepositoryEnvironments.Invoke(new() + /// { + /// Repository = "example-repository", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} + /// + public static Output Invoke(GetRepositoryEnvironmentsInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("github:index/getRepositoryEnvironments:getRepositoryEnvironments", args ?? new GetRepositoryEnvironmentsInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetRepositoryEnvironmentsArgs : global::Pulumi.InvokeArgs + { + /// + /// Name of the repository to retrieve the environments from. + /// + [Input("repository", required: true)] + public string Repository { get; set; } = null!; + + public GetRepositoryEnvironmentsArgs() + { + } + public static new GetRepositoryEnvironmentsArgs Empty => new GetRepositoryEnvironmentsArgs(); + } + + public sealed class GetRepositoryEnvironmentsInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// Name of the repository to retrieve the environments from. + /// + [Input("repository", required: true)] + public Input Repository { get; set; } = null!; + + public GetRepositoryEnvironmentsInvokeArgs() + { + } + public static new GetRepositoryEnvironmentsInvokeArgs Empty => new GetRepositoryEnvironmentsInvokeArgs(); + } + + + [OutputType] + public sealed class GetRepositoryEnvironmentsResult + { + /// + /// The list of this repository's environments. Each element of `environments` has the following attributes: + /// + public readonly ImmutableArray Environments; + /// + /// The provider-assigned unique ID for this managed resource. + /// + public readonly string Id; + public readonly string Repository; + + [OutputConstructor] + private GetRepositoryEnvironmentsResult( + ImmutableArray environments, + + string id, + + string repository) + { + Environments = environments; + Id = id; + Repository = repository; + } + } +} diff --git a/sdk/dotnet/GetRestApi.cs b/sdk/dotnet/GetRestApi.cs new file mode 100644 index 00000000..33633022 --- /dev/null +++ b/sdk/dotnet/GetRestApi.cs @@ -0,0 +1,148 @@ +// *** 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 +{ + public static class GetRestApi + { + /// + /// Use this data source to retrieve information about a GitHub resource through REST API. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Github.GetRestApi.Invoke(new() + /// { + /// Endpoint = "repos/example_repo/git/refs/heads/main", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} + /// + public static Task InvokeAsync(GetRestApiArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("github:index/getRestApi:getRestApi", args ?? new GetRestApiArgs(), options.WithDefaults()); + + /// + /// Use this data source to retrieve information about a GitHub resource through REST API. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Github.GetRestApi.Invoke(new() + /// { + /// Endpoint = "repos/example_repo/git/refs/heads/main", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} + /// + public static Output Invoke(GetRestApiInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("github:index/getRestApi:getRestApi", args ?? new GetRestApiInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetRestApiArgs : global::Pulumi.InvokeArgs + { + /// + /// REST API endpoint to send the GET request to. + /// + [Input("endpoint", required: true)] + public string Endpoint { get; set; } = null!; + + public GetRestApiArgs() + { + } + public static new GetRestApiArgs Empty => new GetRestApiArgs(); + } + + public sealed class GetRestApiInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// REST API endpoint to send the GET request to. + /// + [Input("endpoint", required: true)] + public Input Endpoint { get; set; } = null!; + + public GetRestApiInvokeArgs() + { + } + public static new GetRestApiInvokeArgs Empty => new GetRestApiInvokeArgs(); + } + + + [OutputType] + public sealed class GetRestApiResult + { + /// + /// A map of response body. + /// + public readonly ImmutableDictionary Body; + /// + /// A response status code. + /// + public readonly int Code; + public readonly string Endpoint; + /// + /// A map of response headers. + /// + public readonly ImmutableDictionary Headers; + /// + /// The provider-assigned unique ID for this managed resource. + /// + public readonly string Id; + /// + /// A response status string. + /// + public readonly string Status; + + [OutputConstructor] + private GetRestApiResult( + ImmutableDictionary body, + + int code, + + string endpoint, + + ImmutableDictionary headers, + + string id, + + string status) + { + Body = body; + Code = code; + Endpoint = endpoint; + Headers = headers; + Id = id; + Status = status; + } + } +} diff --git a/sdk/dotnet/GetTeam.cs b/sdk/dotnet/GetTeam.cs index b778f458..8b39cd36 100644 --- a/sdk/dotnet/GetTeam.cs +++ b/sdk/dotnet/GetTeam.cs @@ -170,6 +170,10 @@ public sealed class GetTeamResult /// List of team repositories (list of repo names). Not returned if `summary_only = true` /// public readonly ImmutableArray Repositories; + /// + /// List of team repositories (list of `repo_id` and `role_name`). Not returned if `summary_only = true` + /// + public readonly ImmutableArray RepositoriesDetaileds; public readonly int? ResultsPerPage; public readonly string Slug; public readonly bool? SummaryOnly; @@ -194,6 +198,8 @@ private GetTeamResult( ImmutableArray repositories, + ImmutableArray repositoriesDetaileds, + int? resultsPerPage, string slug, @@ -209,6 +215,7 @@ private GetTeamResult( Permission = permission; Privacy = privacy; Repositories = repositories; + RepositoriesDetaileds = repositoriesDetaileds; ResultsPerPage = resultsPerPage; Slug = slug; SummaryOnly = summaryOnly; diff --git a/sdk/dotnet/Inputs/RepositoryPagesArgs.cs b/sdk/dotnet/Inputs/RepositoryPagesArgs.cs index 5951fb52..abeabd92 100644 --- a/sdk/dotnet/Inputs/RepositoryPagesArgs.cs +++ b/sdk/dotnet/Inputs/RepositoryPagesArgs.cs @@ -12,6 +12,12 @@ namespace Pulumi.Github.Inputs public sealed class RepositoryPagesArgs : global::Pulumi.ResourceArgs { + /// + /// 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`. + /// + [Input("buildType")] + public Input? BuildType { get; set; } + /// /// The custom domain for the repository. This can only be set after the repository has been created. /// @@ -33,8 +39,8 @@ public sealed class RepositoryPagesArgs : global::Pulumi.ResourceArgs /// /// The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. /// - [Input("source", required: true)] - public Input Source { get; set; } = null!; + [Input("source")] + public Input? Source { get; set; } /// /// Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. diff --git a/sdk/dotnet/Inputs/RepositoryPagesGetArgs.cs b/sdk/dotnet/Inputs/RepositoryPagesGetArgs.cs index a1c4c0c3..28e6a003 100644 --- a/sdk/dotnet/Inputs/RepositoryPagesGetArgs.cs +++ b/sdk/dotnet/Inputs/RepositoryPagesGetArgs.cs @@ -12,6 +12,12 @@ namespace Pulumi.Github.Inputs public sealed class RepositoryPagesGetArgs : global::Pulumi.ResourceArgs { + /// + /// 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`. + /// + [Input("buildType")] + public Input? BuildType { get; set; } + /// /// The custom domain for the repository. This can only be set after the repository has been created. /// @@ -33,8 +39,8 @@ public sealed class RepositoryPagesGetArgs : global::Pulumi.ResourceArgs /// /// The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. /// - [Input("source", required: true)] - public Input Source { get; set; } = null!; + [Input("source")] + public Input? Source { get; set; } /// /// Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. diff --git a/sdk/dotnet/Outputs/GetRepositoryAutolinkReferencesAutolinkReferenceResult.cs b/sdk/dotnet/Outputs/GetRepositoryAutolinkReferencesAutolinkReferenceResult.cs new file mode 100644 index 00000000..a6cad493 --- /dev/null +++ b/sdk/dotnet/Outputs/GetRepositoryAutolinkReferencesAutolinkReferenceResult.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 GetRepositoryAutolinkReferencesAutolinkReferenceResult + { + /// + /// True if alphanumeric. + /// + public readonly bool IsAlphanumeric; + /// + /// Key prefix. + /// + public readonly string KeyPrefix; + /// + /// Target url template. + /// + public readonly string TargetUrlTemplate; + + [OutputConstructor] + private GetRepositoryAutolinkReferencesAutolinkReferenceResult( + bool isAlphanumeric, + + string keyPrefix, + + string targetUrlTemplate) + { + IsAlphanumeric = isAlphanumeric; + KeyPrefix = keyPrefix; + TargetUrlTemplate = targetUrlTemplate; + } + } +} diff --git a/sdk/dotnet/Outputs/GetRepositoryEnvironmentsEnvironmentResult.cs b/sdk/dotnet/Outputs/GetRepositoryEnvironmentsEnvironmentResult.cs new file mode 100644 index 00000000..0e9837e1 --- /dev/null +++ b/sdk/dotnet/Outputs/GetRepositoryEnvironmentsEnvironmentResult.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 GetRepositoryEnvironmentsEnvironmentResult + { + /// + /// Environment name. + /// + public readonly string Name; + /// + /// Environment node id. + /// + public readonly string NodeId; + + [OutputConstructor] + private GetRepositoryEnvironmentsEnvironmentResult( + string name, + + string nodeId) + { + Name = name; + NodeId = nodeId; + } + } +} diff --git a/sdk/dotnet/Outputs/GetTeamRepositoriesDetailedResult.cs b/sdk/dotnet/Outputs/GetTeamRepositoriesDetailedResult.cs new file mode 100644 index 00000000..5f79e82b --- /dev/null +++ b/sdk/dotnet/Outputs/GetTeamRepositoriesDetailedResult.cs @@ -0,0 +1,29 @@ +// *** 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 GetTeamRepositoriesDetailedResult + { + public readonly int RepoId; + public readonly string RoleName; + + [OutputConstructor] + private GetTeamRepositoriesDetailedResult( + int repoId, + + string roleName) + { + RepoId = repoId; + RoleName = roleName; + } + } +} diff --git a/sdk/dotnet/Outputs/RepositoryPages.cs b/sdk/dotnet/Outputs/RepositoryPages.cs index 0087fd79..0aacbd65 100644 --- a/sdk/dotnet/Outputs/RepositoryPages.cs +++ b/sdk/dotnet/Outputs/RepositoryPages.cs @@ -13,6 +13,10 @@ namespace Pulumi.Github.Outputs [OutputType] public sealed class RepositoryPages { + /// + /// 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`. + /// + public readonly string? BuildType; /// /// The custom domain for the repository. This can only be set after the repository has been created. /// @@ -28,7 +32,7 @@ public sealed class RepositoryPages /// /// The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. /// - public readonly Outputs.RepositoryPagesSource Source; + public readonly Outputs.RepositoryPagesSource? Source; /// /// Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. /// @@ -37,18 +41,21 @@ public sealed class RepositoryPages [OutputConstructor] private RepositoryPages( + string? buildType, + string? cname, bool? custom404, string? htmlUrl, - Outputs.RepositoryPagesSource source, + Outputs.RepositoryPagesSource? source, string? status, string? url) { + BuildType = buildType; Cname = cname; Custom404 = custom404; HtmlUrl = htmlUrl; diff --git a/sdk/go/github/actionsRunnerGroup.go b/sdk/go/github/actionsRunnerGroup.go index 305a03b5..029fea4a 100644 --- a/sdk/go/github/actionsRunnerGroup.go +++ b/sdk/go/github/actionsRunnerGroup.go @@ -59,8 +59,8 @@ import ( type ActionsRunnerGroup struct { pulumi.CustomResourceState - // Whether public repositories can be added to the runner group - AllowsPublicRepositories pulumi.BoolOutput `pulumi:"allowsPublicRepositories"` + // Whether public repositories can be added to the runner group. Defaults to false. + AllowsPublicRepositories pulumi.BoolPtrOutput `pulumi:"allowsPublicRepositories"` // Whether this is the default runner group Default pulumi.BoolOutput `pulumi:"default"` // An etag representing the runner group object @@ -115,7 +115,7 @@ func GetActionsRunnerGroup(ctx *pulumi.Context, // Input properties used for looking up and filtering ActionsRunnerGroup resources. type actionsRunnerGroupState struct { - // Whether public repositories can be added to the runner group + // Whether public repositories can be added to the runner group. Defaults to false. AllowsPublicRepositories *bool `pulumi:"allowsPublicRepositories"` // Whether this is the default runner group Default *bool `pulumi:"default"` @@ -140,7 +140,7 @@ type actionsRunnerGroupState struct { } type ActionsRunnerGroupState struct { - // Whether public repositories can be added to the runner group + // Whether public repositories can be added to the runner group. Defaults to false. AllowsPublicRepositories pulumi.BoolPtrInput // Whether this is the default runner group Default pulumi.BoolPtrInput @@ -169,6 +169,8 @@ func (ActionsRunnerGroupState) ElementType() reflect.Type { } type actionsRunnerGroupArgs struct { + // Whether public repositories can be added to the runner group. Defaults to false. + AllowsPublicRepositories *bool `pulumi:"allowsPublicRepositories"` // Name of the runner group Name *string `pulumi:"name"` // If true, the runner group will be restricted to running only the workflows specified in the selectedWorkflows array. Defaults to false. @@ -183,6 +185,8 @@ type actionsRunnerGroupArgs struct { // The set of arguments for constructing a ActionsRunnerGroup resource. type ActionsRunnerGroupArgs struct { + // Whether public repositories can be added to the runner group. Defaults to false. + AllowsPublicRepositories pulumi.BoolPtrInput // Name of the runner group Name pulumi.StringPtrInput // If true, the runner group will be restricted to running only the workflows specified in the selectedWorkflows array. Defaults to false. @@ -282,9 +286,9 @@ func (o ActionsRunnerGroupOutput) ToActionsRunnerGroupOutputWithContext(ctx cont return o } -// Whether public repositories can be added to the runner group -func (o ActionsRunnerGroupOutput) AllowsPublicRepositories() pulumi.BoolOutput { - return o.ApplyT(func(v *ActionsRunnerGroup) pulumi.BoolOutput { return v.AllowsPublicRepositories }).(pulumi.BoolOutput) +// Whether public repositories can be added to the runner group. Defaults to false. +func (o ActionsRunnerGroupOutput) AllowsPublicRepositories() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ActionsRunnerGroup) pulumi.BoolPtrOutput { return v.AllowsPublicRepositories }).(pulumi.BoolPtrOutput) } // Whether this is the default runner group diff --git a/sdk/go/github/config/config.go b/sdk/go/github/config/config.go index ad74826f..f6cad8d2 100644 --- a/sdk/go/github/config/config.go +++ b/sdk/go/github/config/config.go @@ -20,7 +20,11 @@ func GetBaseUrl(ctx *pulumi.Context) string { if err == nil { return v } - return getEnvOrDefault("https://api.github.com/", nil, "GITHUB_BASE_URL").(string) + var value string + if d := getEnvOrDefault("https://api.github.com/", nil, "GITHUB_BASE_URL"); d != nil { + value = d.(string) + } + return value } // Enable `insecure` mode for testing purposes diff --git a/sdk/go/github/config/pulumiUtilities.go b/sdk/go/github/config/pulumiUtilities.go index bd908e28..eef6eb24 100644 --- a/sdk/go/github/config/pulumiUtilities.go +++ b/sdk/go/github/config/pulumiUtilities.go @@ -51,7 +51,7 @@ func parseEnvStringArray(v string) interface{} { func getEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} { for _, v := range vars { - if value := os.Getenv(v); value != "" { + if value, ok := os.LookupEnv(v); ok { if parser != nil { return parser(value) } diff --git a/sdk/go/github/getOrganization.go b/sdk/go/github/getOrganization.go index 06cd36e8..753f9cfc 100644 --- a/sdk/go/github/getOrganization.go +++ b/sdk/go/github/getOrganization.go @@ -54,7 +54,7 @@ type GetOrganizationArgs struct { // A collection of values returned by getOrganization. type GetOrganizationResult struct { - // The description the organization account + // The organization account description Description string `pulumi:"description"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` @@ -66,13 +66,13 @@ type GetOrganizationResult struct { Members []string `pulumi:"members"` // The organization's public profile name Name string `pulumi:"name"` - // GraphQL global node id for use with v4 API + // GraphQL global node ID for use with the v4 API NodeId string `pulumi:"nodeId"` // The organization's name as used in URLs and the API Orgname string `pulumi:"orgname"` - // The plan name for the organization account + // The organization account plan name Plan string `pulumi:"plan"` - // (`list`) A list with the repositories on the organization + // (`list`) A list of the full names of the repositories in the organization formatted as `owner/name` strings Repositories []string `pulumi:"repositories"` // (`list`) A list with the members of the organization with following fields: Users []map[string]string `pulumi:"users"` @@ -116,7 +116,7 @@ func (o GetOrganizationResultOutput) ToGetOrganizationResultOutputWithContext(ct return o } -// The description the organization account +// The organization account description func (o GetOrganizationResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v GetOrganizationResult) string { return v.Description }).(pulumi.StringOutput) } @@ -143,7 +143,7 @@ func (o GetOrganizationResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetOrganizationResult) string { return v.Name }).(pulumi.StringOutput) } -// GraphQL global node id for use with v4 API +// GraphQL global node ID for use with the v4 API func (o GetOrganizationResultOutput) NodeId() pulumi.StringOutput { return o.ApplyT(func(v GetOrganizationResult) string { return v.NodeId }).(pulumi.StringOutput) } @@ -153,12 +153,12 @@ func (o GetOrganizationResultOutput) Orgname() pulumi.StringOutput { return o.ApplyT(func(v GetOrganizationResult) string { return v.Orgname }).(pulumi.StringOutput) } -// The plan name for the organization account +// The organization account plan name func (o GetOrganizationResultOutput) Plan() pulumi.StringOutput { return o.ApplyT(func(v GetOrganizationResult) string { return v.Plan }).(pulumi.StringOutput) } -// (`list`) A list with the repositories on the organization +// (`list`) A list of the full names of the repositories in the organization formatted as `owner/name` strings func (o GetOrganizationResultOutput) Repositories() pulumi.StringArrayOutput { return o.ApplyT(func(v GetOrganizationResult) []string { return v.Repositories }).(pulumi.StringArrayOutput) } diff --git a/sdk/go/github/getRepositoryAutolinkReferences.go b/sdk/go/github/getRepositoryAutolinkReferences.go new file mode 100644 index 00000000..eed58ba6 --- /dev/null +++ b/sdk/go/github/getRepositoryAutolinkReferences.go @@ -0,0 +1,120 @@ +// 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" + + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Use this data source to retrieve autolink references for a repository. +// +// ## 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.GetRepositoryAutolinkReferences(ctx, &github.GetRepositoryAutolinkReferencesArgs{ +// Repository: "example-repository", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +func GetRepositoryAutolinkReferences(ctx *pulumi.Context, args *GetRepositoryAutolinkReferencesArgs, opts ...pulumi.InvokeOption) (*GetRepositoryAutolinkReferencesResult, error) { + var rv GetRepositoryAutolinkReferencesResult + err := ctx.Invoke("github:index/getRepositoryAutolinkReferences:getRepositoryAutolinkReferences", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getRepositoryAutolinkReferences. +type GetRepositoryAutolinkReferencesArgs struct { + // Name of the repository to retrieve the autolink references from. + Repository string `pulumi:"repository"` +} + +// A collection of values returned by getRepositoryAutolinkReferences. +type GetRepositoryAutolinkReferencesResult struct { + // The list of this repository's autolink references. Each element of `autolinkReferences` has the following attributes: + AutolinkReferences []GetRepositoryAutolinkReferencesAutolinkReference `pulumi:"autolinkReferences"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + Repository string `pulumi:"repository"` +} + +func GetRepositoryAutolinkReferencesOutput(ctx *pulumi.Context, args GetRepositoryAutolinkReferencesOutputArgs, opts ...pulumi.InvokeOption) GetRepositoryAutolinkReferencesResultOutput { + return pulumi.ToOutputWithContext(context.Background(), args). + ApplyT(func(v interface{}) (GetRepositoryAutolinkReferencesResult, error) { + args := v.(GetRepositoryAutolinkReferencesArgs) + r, err := GetRepositoryAutolinkReferences(ctx, &args, opts...) + var s GetRepositoryAutolinkReferencesResult + if r != nil { + s = *r + } + return s, err + }).(GetRepositoryAutolinkReferencesResultOutput) +} + +// A collection of arguments for invoking getRepositoryAutolinkReferences. +type GetRepositoryAutolinkReferencesOutputArgs struct { + // Name of the repository to retrieve the autolink references from. + Repository pulumi.StringInput `pulumi:"repository"` +} + +func (GetRepositoryAutolinkReferencesOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryAutolinkReferencesArgs)(nil)).Elem() +} + +// A collection of values returned by getRepositoryAutolinkReferences. +type GetRepositoryAutolinkReferencesResultOutput struct{ *pulumi.OutputState } + +func (GetRepositoryAutolinkReferencesResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryAutolinkReferencesResult)(nil)).Elem() +} + +func (o GetRepositoryAutolinkReferencesResultOutput) ToGetRepositoryAutolinkReferencesResultOutput() GetRepositoryAutolinkReferencesResultOutput { + return o +} + +func (o GetRepositoryAutolinkReferencesResultOutput) ToGetRepositoryAutolinkReferencesResultOutputWithContext(ctx context.Context) GetRepositoryAutolinkReferencesResultOutput { + return o +} + +// The list of this repository's autolink references. Each element of `autolinkReferences` has the following attributes: +func (o GetRepositoryAutolinkReferencesResultOutput) AutolinkReferences() GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput { + return o.ApplyT(func(v GetRepositoryAutolinkReferencesResult) []GetRepositoryAutolinkReferencesAutolinkReference { + return v.AutolinkReferences + }).(GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o GetRepositoryAutolinkReferencesResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v GetRepositoryAutolinkReferencesResult) string { return v.Id }).(pulumi.StringOutput) +} + +func (o GetRepositoryAutolinkReferencesResultOutput) Repository() pulumi.StringOutput { + return o.ApplyT(func(v GetRepositoryAutolinkReferencesResult) string { return v.Repository }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(GetRepositoryAutolinkReferencesResultOutput{}) +} diff --git a/sdk/go/github/getRepositoryEnvironments.go b/sdk/go/github/getRepositoryEnvironments.go new file mode 100644 index 00000000..654e0fb5 --- /dev/null +++ b/sdk/go/github/getRepositoryEnvironments.go @@ -0,0 +1,118 @@ +// 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" + + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Use this data source to retrieve information about environments for a repository. +// +// ## 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.GetRepositoryEnvironments(ctx, &github.GetRepositoryEnvironmentsArgs{ +// Repository: "example-repository", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +func GetRepositoryEnvironments(ctx *pulumi.Context, args *GetRepositoryEnvironmentsArgs, opts ...pulumi.InvokeOption) (*GetRepositoryEnvironmentsResult, error) { + var rv GetRepositoryEnvironmentsResult + err := ctx.Invoke("github:index/getRepositoryEnvironments:getRepositoryEnvironments", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getRepositoryEnvironments. +type GetRepositoryEnvironmentsArgs struct { + // Name of the repository to retrieve the environments from. + Repository string `pulumi:"repository"` +} + +// A collection of values returned by getRepositoryEnvironments. +type GetRepositoryEnvironmentsResult struct { + // The list of this repository's environments. Each element of `environments` has the following attributes: + Environments []GetRepositoryEnvironmentsEnvironment `pulumi:"environments"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + Repository string `pulumi:"repository"` +} + +func GetRepositoryEnvironmentsOutput(ctx *pulumi.Context, args GetRepositoryEnvironmentsOutputArgs, opts ...pulumi.InvokeOption) GetRepositoryEnvironmentsResultOutput { + return pulumi.ToOutputWithContext(context.Background(), args). + ApplyT(func(v interface{}) (GetRepositoryEnvironmentsResult, error) { + args := v.(GetRepositoryEnvironmentsArgs) + r, err := GetRepositoryEnvironments(ctx, &args, opts...) + var s GetRepositoryEnvironmentsResult + if r != nil { + s = *r + } + return s, err + }).(GetRepositoryEnvironmentsResultOutput) +} + +// A collection of arguments for invoking getRepositoryEnvironments. +type GetRepositoryEnvironmentsOutputArgs struct { + // Name of the repository to retrieve the environments from. + Repository pulumi.StringInput `pulumi:"repository"` +} + +func (GetRepositoryEnvironmentsOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryEnvironmentsArgs)(nil)).Elem() +} + +// A collection of values returned by getRepositoryEnvironments. +type GetRepositoryEnvironmentsResultOutput struct{ *pulumi.OutputState } + +func (GetRepositoryEnvironmentsResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryEnvironmentsResult)(nil)).Elem() +} + +func (o GetRepositoryEnvironmentsResultOutput) ToGetRepositoryEnvironmentsResultOutput() GetRepositoryEnvironmentsResultOutput { + return o +} + +func (o GetRepositoryEnvironmentsResultOutput) ToGetRepositoryEnvironmentsResultOutputWithContext(ctx context.Context) GetRepositoryEnvironmentsResultOutput { + return o +} + +// The list of this repository's environments. Each element of `environments` has the following attributes: +func (o GetRepositoryEnvironmentsResultOutput) Environments() GetRepositoryEnvironmentsEnvironmentArrayOutput { + return o.ApplyT(func(v GetRepositoryEnvironmentsResult) []GetRepositoryEnvironmentsEnvironment { return v.Environments }).(GetRepositoryEnvironmentsEnvironmentArrayOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o GetRepositoryEnvironmentsResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v GetRepositoryEnvironmentsResult) string { return v.Id }).(pulumi.StringOutput) +} + +func (o GetRepositoryEnvironmentsResultOutput) Repository() pulumi.StringOutput { + return o.ApplyT(func(v GetRepositoryEnvironmentsResult) string { return v.Repository }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(GetRepositoryEnvironmentsResultOutput{}) +} diff --git a/sdk/go/github/getRestApi.go b/sdk/go/github/getRestApi.go new file mode 100644 index 00000000..d788921b --- /dev/null +++ b/sdk/go/github/getRestApi.go @@ -0,0 +1,139 @@ +// 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" + + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Use this data source to retrieve information about a GitHub resource through REST API. +// +// ## 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.GetRestApi(ctx, &github.GetRestApiArgs{ +// Endpoint: "repos/example_repo/git/refs/heads/main", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +func GetRestApi(ctx *pulumi.Context, args *GetRestApiArgs, opts ...pulumi.InvokeOption) (*GetRestApiResult, error) { + var rv GetRestApiResult + err := ctx.Invoke("github:index/getRestApi:getRestApi", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getRestApi. +type GetRestApiArgs struct { + // REST API endpoint to send the GET request to. + Endpoint string `pulumi:"endpoint"` +} + +// A collection of values returned by getRestApi. +type GetRestApiResult struct { + // A map of response body. + Body map[string]interface{} `pulumi:"body"` + // A response status code. + Code int `pulumi:"code"` + Endpoint string `pulumi:"endpoint"` + // A map of response headers. + Headers map[string]interface{} `pulumi:"headers"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + // A response status string. + Status string `pulumi:"status"` +} + +func GetRestApiOutput(ctx *pulumi.Context, args GetRestApiOutputArgs, opts ...pulumi.InvokeOption) GetRestApiResultOutput { + return pulumi.ToOutputWithContext(context.Background(), args). + ApplyT(func(v interface{}) (GetRestApiResult, error) { + args := v.(GetRestApiArgs) + r, err := GetRestApi(ctx, &args, opts...) + var s GetRestApiResult + if r != nil { + s = *r + } + return s, err + }).(GetRestApiResultOutput) +} + +// A collection of arguments for invoking getRestApi. +type GetRestApiOutputArgs struct { + // REST API endpoint to send the GET request to. + Endpoint pulumi.StringInput `pulumi:"endpoint"` +} + +func (GetRestApiOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetRestApiArgs)(nil)).Elem() +} + +// A collection of values returned by getRestApi. +type GetRestApiResultOutput struct{ *pulumi.OutputState } + +func (GetRestApiResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetRestApiResult)(nil)).Elem() +} + +func (o GetRestApiResultOutput) ToGetRestApiResultOutput() GetRestApiResultOutput { + return o +} + +func (o GetRestApiResultOutput) ToGetRestApiResultOutputWithContext(ctx context.Context) GetRestApiResultOutput { + return o +} + +// A map of response body. +func (o GetRestApiResultOutput) Body() pulumi.MapOutput { + return o.ApplyT(func(v GetRestApiResult) map[string]interface{} { return v.Body }).(pulumi.MapOutput) +} + +// A response status code. +func (o GetRestApiResultOutput) Code() pulumi.IntOutput { + return o.ApplyT(func(v GetRestApiResult) int { return v.Code }).(pulumi.IntOutput) +} + +func (o GetRestApiResultOutput) Endpoint() pulumi.StringOutput { + return o.ApplyT(func(v GetRestApiResult) string { return v.Endpoint }).(pulumi.StringOutput) +} + +// A map of response headers. +func (o GetRestApiResultOutput) Headers() pulumi.MapOutput { + return o.ApplyT(func(v GetRestApiResult) map[string]interface{} { return v.Headers }).(pulumi.MapOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o GetRestApiResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v GetRestApiResult) string { return v.Id }).(pulumi.StringOutput) +} + +// A response status string. +func (o GetRestApiResultOutput) Status() pulumi.StringOutput { + return o.ApplyT(func(v GetRestApiResult) string { return v.Status }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(GetRestApiResultOutput{}) +} diff --git a/sdk/go/github/getTeam.go b/sdk/go/github/getTeam.go index 6aee8754..22c851b2 100644 --- a/sdk/go/github/getTeam.go +++ b/sdk/go/github/getTeam.go @@ -76,10 +76,12 @@ type LookupTeamResult struct { // the team's privacy type. Privacy string `pulumi:"privacy"` // List of team repositories (list of repo names). Not returned if `summaryOnly = true` - Repositories []string `pulumi:"repositories"` - ResultsPerPage *int `pulumi:"resultsPerPage"` - Slug string `pulumi:"slug"` - SummaryOnly *bool `pulumi:"summaryOnly"` + Repositories []string `pulumi:"repositories"` + // List of team repositories (list of `repoId` and `roleName`). Not returned if `summaryOnly = true` + RepositoriesDetaileds []GetTeamRepositoriesDetailed `pulumi:"repositoriesDetaileds"` + ResultsPerPage *int `pulumi:"resultsPerPage"` + Slug string `pulumi:"slug"` + SummaryOnly *bool `pulumi:"summaryOnly"` } func LookupTeamOutput(ctx *pulumi.Context, args LookupTeamOutputArgs, opts ...pulumi.InvokeOption) LookupTeamResultOutput { @@ -170,6 +172,11 @@ func (o LookupTeamResultOutput) Repositories() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupTeamResult) []string { return v.Repositories }).(pulumi.StringArrayOutput) } +// List of team repositories (list of `repoId` and `roleName`). Not returned if `summaryOnly = true` +func (o LookupTeamResultOutput) RepositoriesDetaileds() GetTeamRepositoriesDetailedArrayOutput { + return o.ApplyT(func(v LookupTeamResult) []GetTeamRepositoriesDetailed { return v.RepositoriesDetaileds }).(GetTeamRepositoriesDetailedArrayOutput) +} + func (o LookupTeamResultOutput) ResultsPerPage() pulumi.IntPtrOutput { return o.ApplyT(func(v LookupTeamResult) *int { return v.ResultsPerPage }).(pulumi.IntPtrOutput) } diff --git a/sdk/go/github/provider.go b/sdk/go/github/provider.go index 2ad8ed11..01087d57 100644 --- a/sdk/go/github/provider.go +++ b/sdk/go/github/provider.go @@ -37,7 +37,9 @@ func NewProvider(ctx *pulumi.Context, } if args.BaseUrl == nil { - args.BaseUrl = pulumi.StringPtr(getEnvOrDefault("https://api.github.com/", nil, "GITHUB_BASE_URL").(string)) + if d := getEnvOrDefault("https://api.github.com/", nil, "GITHUB_BASE_URL"); d != nil { + args.BaseUrl = pulumi.StringPtr(d.(string)) + } } var resource Provider err := ctx.RegisterResource("pulumi:providers:github", name, args, &resource, opts...) diff --git a/sdk/go/github/pulumiTypes.go b/sdk/go/github/pulumiTypes.go index f6a09a2b..293bce63 100644 --- a/sdk/go/github/pulumiTypes.go +++ b/sdk/go/github/pulumiTypes.go @@ -2410,6 +2410,8 @@ func (o RepositoryEnvironmentReviewerArrayOutput) Index(i pulumi.IntInput) Repos } 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. @@ -2417,7 +2419,7 @@ type RepositoryPages struct { // 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"` + 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"` @@ -2435,6 +2437,8 @@ type RepositoryPagesInput interface { } 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. @@ -2442,7 +2446,7 @@ type RepositoryPagesArgs struct { // 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 RepositoryPagesSourceInput `pulumi:"source"` + 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"` @@ -2525,6 +2529,11 @@ func (o RepositoryPagesOutput) ToRepositoryPagesPtrOutputWithContext(ctx context }).(RepositoryPagesPtrOutput) } +// 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) @@ -2541,8 +2550,8 @@ func (o RepositoryPagesOutput) HtmlUrl() pulumi.StringPtrOutput { } // The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. -func (o RepositoryPagesOutput) Source() RepositoryPagesSourceOutput { - return o.ApplyT(func(v RepositoryPages) RepositoryPagesSource { return v.Source }).(RepositoryPagesSourceOutput) +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`. @@ -2578,6 +2587,16 @@ func (o RepositoryPagesPtrOutput) Elem() RepositoryPagesOutput { }).(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 { @@ -2614,7 +2633,7 @@ func (o RepositoryPagesPtrOutput) Source() RepositoryPagesSourcePtrOutput { if v == nil { return nil } - return &v.Source + return v.Source }).(RepositoryPagesSourcePtrOutput) } @@ -6432,6 +6451,121 @@ func (o GetReleaseAssetArrayOutput) Index(i pulumi.IntInput) GetReleaseAssetOutp }).(GetReleaseAssetOutput) } +type GetRepositoryAutolinkReferencesAutolinkReference struct { + // True if alphanumeric. + IsAlphanumeric bool `pulumi:"isAlphanumeric"` + // Key prefix. + KeyPrefix string `pulumi:"keyPrefix"` + // Target url template. + TargetUrlTemplate string `pulumi:"targetUrlTemplate"` +} + +// GetRepositoryAutolinkReferencesAutolinkReferenceInput is an input type that accepts GetRepositoryAutolinkReferencesAutolinkReferenceArgs and GetRepositoryAutolinkReferencesAutolinkReferenceOutput values. +// You can construct a concrete instance of `GetRepositoryAutolinkReferencesAutolinkReferenceInput` via: +// +// GetRepositoryAutolinkReferencesAutolinkReferenceArgs{...} +type GetRepositoryAutolinkReferencesAutolinkReferenceInput interface { + pulumi.Input + + ToGetRepositoryAutolinkReferencesAutolinkReferenceOutput() GetRepositoryAutolinkReferencesAutolinkReferenceOutput + ToGetRepositoryAutolinkReferencesAutolinkReferenceOutputWithContext(context.Context) GetRepositoryAutolinkReferencesAutolinkReferenceOutput +} + +type GetRepositoryAutolinkReferencesAutolinkReferenceArgs struct { + // True if alphanumeric. + IsAlphanumeric pulumi.BoolInput `pulumi:"isAlphanumeric"` + // Key prefix. + KeyPrefix pulumi.StringInput `pulumi:"keyPrefix"` + // Target url template. + TargetUrlTemplate pulumi.StringInput `pulumi:"targetUrlTemplate"` +} + +func (GetRepositoryAutolinkReferencesAutolinkReferenceArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryAutolinkReferencesAutolinkReference)(nil)).Elem() +} + +func (i GetRepositoryAutolinkReferencesAutolinkReferenceArgs) ToGetRepositoryAutolinkReferencesAutolinkReferenceOutput() GetRepositoryAutolinkReferencesAutolinkReferenceOutput { + return i.ToGetRepositoryAutolinkReferencesAutolinkReferenceOutputWithContext(context.Background()) +} + +func (i GetRepositoryAutolinkReferencesAutolinkReferenceArgs) ToGetRepositoryAutolinkReferencesAutolinkReferenceOutputWithContext(ctx context.Context) GetRepositoryAutolinkReferencesAutolinkReferenceOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetRepositoryAutolinkReferencesAutolinkReferenceOutput) +} + +// GetRepositoryAutolinkReferencesAutolinkReferenceArrayInput is an input type that accepts GetRepositoryAutolinkReferencesAutolinkReferenceArray and GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput values. +// You can construct a concrete instance of `GetRepositoryAutolinkReferencesAutolinkReferenceArrayInput` via: +// +// GetRepositoryAutolinkReferencesAutolinkReferenceArray{ GetRepositoryAutolinkReferencesAutolinkReferenceArgs{...} } +type GetRepositoryAutolinkReferencesAutolinkReferenceArrayInput interface { + pulumi.Input + + ToGetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput() GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput + ToGetRepositoryAutolinkReferencesAutolinkReferenceArrayOutputWithContext(context.Context) GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput +} + +type GetRepositoryAutolinkReferencesAutolinkReferenceArray []GetRepositoryAutolinkReferencesAutolinkReferenceInput + +func (GetRepositoryAutolinkReferencesAutolinkReferenceArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetRepositoryAutolinkReferencesAutolinkReference)(nil)).Elem() +} + +func (i GetRepositoryAutolinkReferencesAutolinkReferenceArray) ToGetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput() GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput { + return i.ToGetRepositoryAutolinkReferencesAutolinkReferenceArrayOutputWithContext(context.Background()) +} + +func (i GetRepositoryAutolinkReferencesAutolinkReferenceArray) ToGetRepositoryAutolinkReferencesAutolinkReferenceArrayOutputWithContext(ctx context.Context) GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput) +} + +type GetRepositoryAutolinkReferencesAutolinkReferenceOutput struct{ *pulumi.OutputState } + +func (GetRepositoryAutolinkReferencesAutolinkReferenceOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryAutolinkReferencesAutolinkReference)(nil)).Elem() +} + +func (o GetRepositoryAutolinkReferencesAutolinkReferenceOutput) ToGetRepositoryAutolinkReferencesAutolinkReferenceOutput() GetRepositoryAutolinkReferencesAutolinkReferenceOutput { + return o +} + +func (o GetRepositoryAutolinkReferencesAutolinkReferenceOutput) ToGetRepositoryAutolinkReferencesAutolinkReferenceOutputWithContext(ctx context.Context) GetRepositoryAutolinkReferencesAutolinkReferenceOutput { + return o +} + +// True if alphanumeric. +func (o GetRepositoryAutolinkReferencesAutolinkReferenceOutput) IsAlphanumeric() pulumi.BoolOutput { + return o.ApplyT(func(v GetRepositoryAutolinkReferencesAutolinkReference) bool { return v.IsAlphanumeric }).(pulumi.BoolOutput) +} + +// Key prefix. +func (o GetRepositoryAutolinkReferencesAutolinkReferenceOutput) KeyPrefix() pulumi.StringOutput { + return o.ApplyT(func(v GetRepositoryAutolinkReferencesAutolinkReference) string { return v.KeyPrefix }).(pulumi.StringOutput) +} + +// Target url template. +func (o GetRepositoryAutolinkReferencesAutolinkReferenceOutput) TargetUrlTemplate() pulumi.StringOutput { + return o.ApplyT(func(v GetRepositoryAutolinkReferencesAutolinkReference) string { return v.TargetUrlTemplate }).(pulumi.StringOutput) +} + +type GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput struct{ *pulumi.OutputState } + +func (GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetRepositoryAutolinkReferencesAutolinkReference)(nil)).Elem() +} + +func (o GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput) ToGetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput() GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput { + return o +} + +func (o GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput) ToGetRepositoryAutolinkReferencesAutolinkReferenceArrayOutputWithContext(ctx context.Context) GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput { + return o +} + +func (o GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput) Index(i pulumi.IntInput) GetRepositoryAutolinkReferencesAutolinkReferenceOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetRepositoryAutolinkReferencesAutolinkReference { + return vs[0].([]GetRepositoryAutolinkReferencesAutolinkReference)[vs[1].(int)] + }).(GetRepositoryAutolinkReferencesAutolinkReferenceOutput) +} + type GetRepositoryBranchesBranch struct { // Name of the branch. Name string `pulumi:"name"` @@ -6662,6 +6796,112 @@ func (o GetRepositoryDeployKeysKeyArrayOutput) Index(i pulumi.IntInput) GetRepos }).(GetRepositoryDeployKeysKeyOutput) } +type GetRepositoryEnvironmentsEnvironment struct { + // Environment name. + Name string `pulumi:"name"` + // Environment node id. + NodeId string `pulumi:"nodeId"` +} + +// GetRepositoryEnvironmentsEnvironmentInput is an input type that accepts GetRepositoryEnvironmentsEnvironmentArgs and GetRepositoryEnvironmentsEnvironmentOutput values. +// You can construct a concrete instance of `GetRepositoryEnvironmentsEnvironmentInput` via: +// +// GetRepositoryEnvironmentsEnvironmentArgs{...} +type GetRepositoryEnvironmentsEnvironmentInput interface { + pulumi.Input + + ToGetRepositoryEnvironmentsEnvironmentOutput() GetRepositoryEnvironmentsEnvironmentOutput + ToGetRepositoryEnvironmentsEnvironmentOutputWithContext(context.Context) GetRepositoryEnvironmentsEnvironmentOutput +} + +type GetRepositoryEnvironmentsEnvironmentArgs struct { + // Environment name. + Name pulumi.StringInput `pulumi:"name"` + // Environment node id. + NodeId pulumi.StringInput `pulumi:"nodeId"` +} + +func (GetRepositoryEnvironmentsEnvironmentArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryEnvironmentsEnvironment)(nil)).Elem() +} + +func (i GetRepositoryEnvironmentsEnvironmentArgs) ToGetRepositoryEnvironmentsEnvironmentOutput() GetRepositoryEnvironmentsEnvironmentOutput { + return i.ToGetRepositoryEnvironmentsEnvironmentOutputWithContext(context.Background()) +} + +func (i GetRepositoryEnvironmentsEnvironmentArgs) ToGetRepositoryEnvironmentsEnvironmentOutputWithContext(ctx context.Context) GetRepositoryEnvironmentsEnvironmentOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetRepositoryEnvironmentsEnvironmentOutput) +} + +// GetRepositoryEnvironmentsEnvironmentArrayInput is an input type that accepts GetRepositoryEnvironmentsEnvironmentArray and GetRepositoryEnvironmentsEnvironmentArrayOutput values. +// You can construct a concrete instance of `GetRepositoryEnvironmentsEnvironmentArrayInput` via: +// +// GetRepositoryEnvironmentsEnvironmentArray{ GetRepositoryEnvironmentsEnvironmentArgs{...} } +type GetRepositoryEnvironmentsEnvironmentArrayInput interface { + pulumi.Input + + ToGetRepositoryEnvironmentsEnvironmentArrayOutput() GetRepositoryEnvironmentsEnvironmentArrayOutput + ToGetRepositoryEnvironmentsEnvironmentArrayOutputWithContext(context.Context) GetRepositoryEnvironmentsEnvironmentArrayOutput +} + +type GetRepositoryEnvironmentsEnvironmentArray []GetRepositoryEnvironmentsEnvironmentInput + +func (GetRepositoryEnvironmentsEnvironmentArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetRepositoryEnvironmentsEnvironment)(nil)).Elem() +} + +func (i GetRepositoryEnvironmentsEnvironmentArray) ToGetRepositoryEnvironmentsEnvironmentArrayOutput() GetRepositoryEnvironmentsEnvironmentArrayOutput { + return i.ToGetRepositoryEnvironmentsEnvironmentArrayOutputWithContext(context.Background()) +} + +func (i GetRepositoryEnvironmentsEnvironmentArray) ToGetRepositoryEnvironmentsEnvironmentArrayOutputWithContext(ctx context.Context) GetRepositoryEnvironmentsEnvironmentArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetRepositoryEnvironmentsEnvironmentArrayOutput) +} + +type GetRepositoryEnvironmentsEnvironmentOutput struct{ *pulumi.OutputState } + +func (GetRepositoryEnvironmentsEnvironmentOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetRepositoryEnvironmentsEnvironment)(nil)).Elem() +} + +func (o GetRepositoryEnvironmentsEnvironmentOutput) ToGetRepositoryEnvironmentsEnvironmentOutput() GetRepositoryEnvironmentsEnvironmentOutput { + return o +} + +func (o GetRepositoryEnvironmentsEnvironmentOutput) ToGetRepositoryEnvironmentsEnvironmentOutputWithContext(ctx context.Context) GetRepositoryEnvironmentsEnvironmentOutput { + return o +} + +// Environment name. +func (o GetRepositoryEnvironmentsEnvironmentOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v GetRepositoryEnvironmentsEnvironment) string { return v.Name }).(pulumi.StringOutput) +} + +// Environment node id. +func (o GetRepositoryEnvironmentsEnvironmentOutput) NodeId() pulumi.StringOutput { + return o.ApplyT(func(v GetRepositoryEnvironmentsEnvironment) string { return v.NodeId }).(pulumi.StringOutput) +} + +type GetRepositoryEnvironmentsEnvironmentArrayOutput struct{ *pulumi.OutputState } + +func (GetRepositoryEnvironmentsEnvironmentArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetRepositoryEnvironmentsEnvironment)(nil)).Elem() +} + +func (o GetRepositoryEnvironmentsEnvironmentArrayOutput) ToGetRepositoryEnvironmentsEnvironmentArrayOutput() GetRepositoryEnvironmentsEnvironmentArrayOutput { + return o +} + +func (o GetRepositoryEnvironmentsEnvironmentArrayOutput) ToGetRepositoryEnvironmentsEnvironmentArrayOutputWithContext(ctx context.Context) GetRepositoryEnvironmentsEnvironmentArrayOutput { + return o +} + +func (o GetRepositoryEnvironmentsEnvironmentArrayOutput) Index(i pulumi.IntInput) GetRepositoryEnvironmentsEnvironmentOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetRepositoryEnvironmentsEnvironment { + return vs[0].([]GetRepositoryEnvironmentsEnvironment)[vs[1].(int)] + }).(GetRepositoryEnvironmentsEnvironmentOutput) +} + type GetRepositoryPage struct { Cname string `pulumi:"cname"` Custom404 bool `pulumi:"custom404"` @@ -7424,6 +7664,106 @@ func (o GetRepositoryWebhooksWebhookArrayOutput) Index(i pulumi.IntInput) GetRep }).(GetRepositoryWebhooksWebhookOutput) } +type GetTeamRepositoriesDetailed struct { + RepoId int `pulumi:"repoId"` + RoleName string `pulumi:"roleName"` +} + +// GetTeamRepositoriesDetailedInput is an input type that accepts GetTeamRepositoriesDetailedArgs and GetTeamRepositoriesDetailedOutput values. +// You can construct a concrete instance of `GetTeamRepositoriesDetailedInput` via: +// +// GetTeamRepositoriesDetailedArgs{...} +type GetTeamRepositoriesDetailedInput interface { + pulumi.Input + + ToGetTeamRepositoriesDetailedOutput() GetTeamRepositoriesDetailedOutput + ToGetTeamRepositoriesDetailedOutputWithContext(context.Context) GetTeamRepositoriesDetailedOutput +} + +type GetTeamRepositoriesDetailedArgs struct { + RepoId pulumi.IntInput `pulumi:"repoId"` + RoleName pulumi.StringInput `pulumi:"roleName"` +} + +func (GetTeamRepositoriesDetailedArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetTeamRepositoriesDetailed)(nil)).Elem() +} + +func (i GetTeamRepositoriesDetailedArgs) ToGetTeamRepositoriesDetailedOutput() GetTeamRepositoriesDetailedOutput { + return i.ToGetTeamRepositoriesDetailedOutputWithContext(context.Background()) +} + +func (i GetTeamRepositoriesDetailedArgs) ToGetTeamRepositoriesDetailedOutputWithContext(ctx context.Context) GetTeamRepositoriesDetailedOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetTeamRepositoriesDetailedOutput) +} + +// GetTeamRepositoriesDetailedArrayInput is an input type that accepts GetTeamRepositoriesDetailedArray and GetTeamRepositoriesDetailedArrayOutput values. +// You can construct a concrete instance of `GetTeamRepositoriesDetailedArrayInput` via: +// +// GetTeamRepositoriesDetailedArray{ GetTeamRepositoriesDetailedArgs{...} } +type GetTeamRepositoriesDetailedArrayInput interface { + pulumi.Input + + ToGetTeamRepositoriesDetailedArrayOutput() GetTeamRepositoriesDetailedArrayOutput + ToGetTeamRepositoriesDetailedArrayOutputWithContext(context.Context) GetTeamRepositoriesDetailedArrayOutput +} + +type GetTeamRepositoriesDetailedArray []GetTeamRepositoriesDetailedInput + +func (GetTeamRepositoriesDetailedArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetTeamRepositoriesDetailed)(nil)).Elem() +} + +func (i GetTeamRepositoriesDetailedArray) ToGetTeamRepositoriesDetailedArrayOutput() GetTeamRepositoriesDetailedArrayOutput { + return i.ToGetTeamRepositoriesDetailedArrayOutputWithContext(context.Background()) +} + +func (i GetTeamRepositoriesDetailedArray) ToGetTeamRepositoriesDetailedArrayOutputWithContext(ctx context.Context) GetTeamRepositoriesDetailedArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetTeamRepositoriesDetailedArrayOutput) +} + +type GetTeamRepositoriesDetailedOutput struct{ *pulumi.OutputState } + +func (GetTeamRepositoriesDetailedOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetTeamRepositoriesDetailed)(nil)).Elem() +} + +func (o GetTeamRepositoriesDetailedOutput) ToGetTeamRepositoriesDetailedOutput() GetTeamRepositoriesDetailedOutput { + return o +} + +func (o GetTeamRepositoriesDetailedOutput) ToGetTeamRepositoriesDetailedOutputWithContext(ctx context.Context) GetTeamRepositoriesDetailedOutput { + return o +} + +func (o GetTeamRepositoriesDetailedOutput) RepoId() pulumi.IntOutput { + return o.ApplyT(func(v GetTeamRepositoriesDetailed) int { return v.RepoId }).(pulumi.IntOutput) +} + +func (o GetTeamRepositoriesDetailedOutput) RoleName() pulumi.StringOutput { + return o.ApplyT(func(v GetTeamRepositoriesDetailed) string { return v.RoleName }).(pulumi.StringOutput) +} + +type GetTeamRepositoriesDetailedArrayOutput struct{ *pulumi.OutputState } + +func (GetTeamRepositoriesDetailedArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetTeamRepositoriesDetailed)(nil)).Elem() +} + +func (o GetTeamRepositoriesDetailedArrayOutput) ToGetTeamRepositoriesDetailedArrayOutput() GetTeamRepositoriesDetailedArrayOutput { + return o +} + +func (o GetTeamRepositoriesDetailedArrayOutput) ToGetTeamRepositoriesDetailedArrayOutputWithContext(ctx context.Context) GetTeamRepositoriesDetailedArrayOutput { + return o +} + +func (o GetTeamRepositoriesDetailedArrayOutput) Index(i pulumi.IntInput) GetTeamRepositoriesDetailedOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetTeamRepositoriesDetailed { + return vs[0].([]GetTeamRepositoriesDetailed)[vs[1].(int)] + }).(GetTeamRepositoriesDetailedOutput) +} + type GetTreeEntry struct { Mode string `pulumi:"mode"` Path string `pulumi:"path"` @@ -7629,10 +7969,14 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*GetOrganizationWebhooksWebhookArrayInput)(nil)).Elem(), GetOrganizationWebhooksWebhookArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetReleaseAssetInput)(nil)).Elem(), GetReleaseAssetArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetReleaseAssetArrayInput)(nil)).Elem(), GetReleaseAssetArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryAutolinkReferencesAutolinkReferenceInput)(nil)).Elem(), GetRepositoryAutolinkReferencesAutolinkReferenceArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryAutolinkReferencesAutolinkReferenceArrayInput)(nil)).Elem(), GetRepositoryAutolinkReferencesAutolinkReferenceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryBranchesBranchInput)(nil)).Elem(), GetRepositoryBranchesBranchArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryBranchesBranchArrayInput)(nil)).Elem(), GetRepositoryBranchesBranchArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryDeployKeysKeyInput)(nil)).Elem(), GetRepositoryDeployKeysKeyArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryDeployKeysKeyArrayInput)(nil)).Elem(), GetRepositoryDeployKeysKeyArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryEnvironmentsEnvironmentInput)(nil)).Elem(), GetRepositoryEnvironmentsEnvironmentArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryEnvironmentsEnvironmentArrayInput)(nil)).Elem(), GetRepositoryEnvironmentsEnvironmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryPageInput)(nil)).Elem(), GetRepositoryPageArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryPageArrayInput)(nil)).Elem(), GetRepositoryPageArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryPageSourceInput)(nil)).Elem(), GetRepositoryPageSourceArgs{}) @@ -7644,6 +7988,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryTemplateInput)(nil)).Elem(), GetRepositoryTemplateArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryWebhooksWebhookInput)(nil)).Elem(), GetRepositoryWebhooksWebhookArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRepositoryWebhooksWebhookArrayInput)(nil)).Elem(), GetRepositoryWebhooksWebhookArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetTeamRepositoriesDetailedInput)(nil)).Elem(), GetTeamRepositoriesDetailedArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetTeamRepositoriesDetailedArrayInput)(nil)).Elem(), GetTeamRepositoriesDetailedArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetTreeEntryInput)(nil)).Elem(), GetTreeEntryArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetTreeEntryArrayInput)(nil)).Elem(), GetTreeEntryArray{}) pulumi.RegisterOutputType(ActionsOrganizationPermissionsAllowedActionsConfigOutput{}) @@ -7732,10 +8078,14 @@ func init() { pulumi.RegisterOutputType(GetOrganizationWebhooksWebhookArrayOutput{}) pulumi.RegisterOutputType(GetReleaseAssetOutput{}) pulumi.RegisterOutputType(GetReleaseAssetArrayOutput{}) + pulumi.RegisterOutputType(GetRepositoryAutolinkReferencesAutolinkReferenceOutput{}) + pulumi.RegisterOutputType(GetRepositoryAutolinkReferencesAutolinkReferenceArrayOutput{}) pulumi.RegisterOutputType(GetRepositoryBranchesBranchOutput{}) pulumi.RegisterOutputType(GetRepositoryBranchesBranchArrayOutput{}) pulumi.RegisterOutputType(GetRepositoryDeployKeysKeyOutput{}) pulumi.RegisterOutputType(GetRepositoryDeployKeysKeyArrayOutput{}) + pulumi.RegisterOutputType(GetRepositoryEnvironmentsEnvironmentOutput{}) + pulumi.RegisterOutputType(GetRepositoryEnvironmentsEnvironmentArrayOutput{}) pulumi.RegisterOutputType(GetRepositoryPageOutput{}) pulumi.RegisterOutputType(GetRepositoryPageArrayOutput{}) pulumi.RegisterOutputType(GetRepositoryPageSourceOutput{}) @@ -7747,6 +8097,8 @@ func init() { pulumi.RegisterOutputType(GetRepositoryTemplateOutput{}) pulumi.RegisterOutputType(GetRepositoryWebhooksWebhookOutput{}) pulumi.RegisterOutputType(GetRepositoryWebhooksWebhookArrayOutput{}) + pulumi.RegisterOutputType(GetTeamRepositoriesDetailedOutput{}) + pulumi.RegisterOutputType(GetTeamRepositoriesDetailedArrayOutput{}) pulumi.RegisterOutputType(GetTreeEntryOutput{}) pulumi.RegisterOutputType(GetTreeEntryArrayOutput{}) } diff --git a/sdk/go/github/pulumiUtilities.go b/sdk/go/github/pulumiUtilities.go index c337acb4..880fdf5b 100644 --- a/sdk/go/github/pulumiUtilities.go +++ b/sdk/go/github/pulumiUtilities.go @@ -51,7 +51,7 @@ func parseEnvStringArray(v string) interface{} { func getEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} { for _, v := range vars { - if value := os.Getenv(v); value != "" { + if value, ok := os.LookupEnv(v); ok { if parser != nil { return parser(value) } diff --git a/sdk/java/src/main/java/com/pulumi/github/ActionsRunnerGroup.java b/sdk/java/src/main/java/com/pulumi/github/ActionsRunnerGroup.java index 12d25107..4bae8447 100644 --- a/sdk/java/src/main/java/com/pulumi/github/ActionsRunnerGroup.java +++ b/sdk/java/src/main/java/com/pulumi/github/ActionsRunnerGroup.java @@ -67,18 +67,18 @@ @ResourceType(type="github:index/actionsRunnerGroup:ActionsRunnerGroup") public class ActionsRunnerGroup extends com.pulumi.resources.CustomResource { /** - * Whether public repositories can be added to the runner group + * Whether public repositories can be added to the runner group. Defaults to false. * */ @Export(name="allowsPublicRepositories", type=Boolean.class, parameters={}) - private Output allowsPublicRepositories; + private Output allowsPublicRepositories; /** - * @return Whether public repositories can be added to the runner group + * @return Whether public repositories can be added to the runner group. Defaults to false. * */ - public Output allowsPublicRepositories() { - return this.allowsPublicRepositories; + public Output> allowsPublicRepositories() { + return Codegen.optional(this.allowsPublicRepositories); } /** * Whether this is the default runner group diff --git a/sdk/java/src/main/java/com/pulumi/github/ActionsRunnerGroupArgs.java b/sdk/java/src/main/java/com/pulumi/github/ActionsRunnerGroupArgs.java index df1d2758..0ca34c7b 100644 --- a/sdk/java/src/main/java/com/pulumi/github/ActionsRunnerGroupArgs.java +++ b/sdk/java/src/main/java/com/pulumi/github/ActionsRunnerGroupArgs.java @@ -18,6 +18,21 @@ public final class ActionsRunnerGroupArgs extends com.pulumi.resources.ResourceA public static final ActionsRunnerGroupArgs Empty = new ActionsRunnerGroupArgs(); + /** + * Whether public repositories can be added to the runner group. Defaults to false. + * + */ + @Import(name="allowsPublicRepositories") + private @Nullable Output allowsPublicRepositories; + + /** + * @return Whether public repositories can be added to the runner group. Defaults to false. + * + */ + public Optional> allowsPublicRepositories() { + return Optional.ofNullable(this.allowsPublicRepositories); + } + /** * Name of the runner group * @@ -96,6 +111,7 @@ public Output visibility() { private ActionsRunnerGroupArgs() {} private ActionsRunnerGroupArgs(ActionsRunnerGroupArgs $) { + this.allowsPublicRepositories = $.allowsPublicRepositories; this.name = $.name; this.restrictedToWorkflows = $.restrictedToWorkflows; this.selectedRepositoryIds = $.selectedRepositoryIds; @@ -121,6 +137,27 @@ public Builder(ActionsRunnerGroupArgs defaults) { $ = new ActionsRunnerGroupArgs(Objects.requireNonNull(defaults)); } + /** + * @param allowsPublicRepositories Whether public repositories can be added to the runner group. Defaults to false. + * + * @return builder + * + */ + public Builder allowsPublicRepositories(@Nullable Output allowsPublicRepositories) { + $.allowsPublicRepositories = allowsPublicRepositories; + return this; + } + + /** + * @param allowsPublicRepositories Whether public repositories can be added to the runner group. Defaults to false. + * + * @return builder + * + */ + public Builder allowsPublicRepositories(Boolean allowsPublicRepositories) { + return allowsPublicRepositories(Output.of(allowsPublicRepositories)); + } + /** * @param name Name of the runner group * diff --git a/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java b/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java index c8c6ea19..19c21522 100644 --- a/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java @@ -51,10 +51,14 @@ import com.pulumi.github.inputs.GetRepositoriesArgs; import com.pulumi.github.inputs.GetRepositoriesPlainArgs; import com.pulumi.github.inputs.GetRepositoryArgs; +import com.pulumi.github.inputs.GetRepositoryAutolinkReferencesArgs; +import com.pulumi.github.inputs.GetRepositoryAutolinkReferencesPlainArgs; import com.pulumi.github.inputs.GetRepositoryBranchesArgs; import com.pulumi.github.inputs.GetRepositoryBranchesPlainArgs; import com.pulumi.github.inputs.GetRepositoryDeployKeysArgs; import com.pulumi.github.inputs.GetRepositoryDeployKeysPlainArgs; +import com.pulumi.github.inputs.GetRepositoryEnvironmentsArgs; +import com.pulumi.github.inputs.GetRepositoryEnvironmentsPlainArgs; import com.pulumi.github.inputs.GetRepositoryFileArgs; import com.pulumi.github.inputs.GetRepositoryFilePlainArgs; import com.pulumi.github.inputs.GetRepositoryMilestoneArgs; @@ -68,6 +72,8 @@ import com.pulumi.github.inputs.GetRepositoryTeamsPlainArgs; import com.pulumi.github.inputs.GetRepositoryWebhooksArgs; import com.pulumi.github.inputs.GetRepositoryWebhooksPlainArgs; +import com.pulumi.github.inputs.GetRestApiArgs; +import com.pulumi.github.inputs.GetRestApiPlainArgs; import com.pulumi.github.inputs.GetTeamArgs; import com.pulumi.github.inputs.GetTeamPlainArgs; import com.pulumi.github.inputs.GetTreeArgs; @@ -109,8 +115,10 @@ import com.pulumi.github.outputs.GetRefResult; import com.pulumi.github.outputs.GetReleaseResult; import com.pulumi.github.outputs.GetRepositoriesResult; +import com.pulumi.github.outputs.GetRepositoryAutolinkReferencesResult; import com.pulumi.github.outputs.GetRepositoryBranchesResult; import com.pulumi.github.outputs.GetRepositoryDeployKeysResult; +import com.pulumi.github.outputs.GetRepositoryEnvironmentsResult; import com.pulumi.github.outputs.GetRepositoryFileResult; import com.pulumi.github.outputs.GetRepositoryMilestoneResult; import com.pulumi.github.outputs.GetRepositoryPullRequestResult; @@ -118,6 +126,7 @@ import com.pulumi.github.outputs.GetRepositoryResult; import com.pulumi.github.outputs.GetRepositoryTeamsResult; import com.pulumi.github.outputs.GetRepositoryWebhooksResult; +import com.pulumi.github.outputs.GetRestApiResult; import com.pulumi.github.outputs.GetSshKeysResult; import com.pulumi.github.outputs.GetTeamResult; import com.pulumi.github.outputs.GetTreeResult; @@ -6519,6 +6528,154 @@ public static Output getRepository(GetRepositoryArgs args, public static CompletableFuture getRepositoryPlain(GetRepositoryPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("github:index/getRepository:getRepository", TypeShape.of(GetRepositoryResult.class), args, Utilities.withVersion(options)); } + /** + * Use this data source to retrieve autolink references for a repository. + * + * ## 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.GetRepositoryAutolinkReferencesArgs; + * 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 example = GithubFunctions.getRepositoryAutolinkReferences(GetRepositoryAutolinkReferencesArgs.builder() + * .repository("example-repository") + * .build()); + * + * } + * } + * ``` + * + */ + public static Output getRepositoryAutolinkReferences(GetRepositoryAutolinkReferencesArgs args) { + return getRepositoryAutolinkReferences(args, InvokeOptions.Empty); + } + /** + * Use this data source to retrieve autolink references for a repository. + * + * ## 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.GetRepositoryAutolinkReferencesArgs; + * 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 example = GithubFunctions.getRepositoryAutolinkReferences(GetRepositoryAutolinkReferencesArgs.builder() + * .repository("example-repository") + * .build()); + * + * } + * } + * ``` + * + */ + public static CompletableFuture getRepositoryAutolinkReferencesPlain(GetRepositoryAutolinkReferencesPlainArgs args) { + return getRepositoryAutolinkReferencesPlain(args, InvokeOptions.Empty); + } + /** + * Use this data source to retrieve autolink references for a repository. + * + * ## 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.GetRepositoryAutolinkReferencesArgs; + * 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 example = GithubFunctions.getRepositoryAutolinkReferences(GetRepositoryAutolinkReferencesArgs.builder() + * .repository("example-repository") + * .build()); + * + * } + * } + * ``` + * + */ + public static Output getRepositoryAutolinkReferences(GetRepositoryAutolinkReferencesArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("github:index/getRepositoryAutolinkReferences:getRepositoryAutolinkReferences", TypeShape.of(GetRepositoryAutolinkReferencesResult.class), args, Utilities.withVersion(options)); + } + /** + * Use this data source to retrieve autolink references for a repository. + * + * ## 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.GetRepositoryAutolinkReferencesArgs; + * 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 example = GithubFunctions.getRepositoryAutolinkReferences(GetRepositoryAutolinkReferencesArgs.builder() + * .repository("example-repository") + * .build()); + * + * } + * } + * ``` + * + */ + public static CompletableFuture getRepositoryAutolinkReferencesPlain(GetRepositoryAutolinkReferencesPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("github:index/getRepositoryAutolinkReferences:getRepositoryAutolinkReferences", TypeShape.of(GetRepositoryAutolinkReferencesResult.class), args, Utilities.withVersion(options)); + } /** * Use this data source to retrieve information about branches in a repository. * @@ -6815,6 +6972,154 @@ public static Output getRepositoryDeployKeys(GetR public static CompletableFuture getRepositoryDeployKeysPlain(GetRepositoryDeployKeysPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("github:index/getRepositoryDeployKeys:getRepositoryDeployKeys", TypeShape.of(GetRepositoryDeployKeysResult.class), args, Utilities.withVersion(options)); } + /** + * Use this data source to retrieve information about environments for a repository. + * + * ## 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.GetRepositoryEnvironmentsArgs; + * 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 example = GithubFunctions.getRepositoryEnvironments(GetRepositoryEnvironmentsArgs.builder() + * .repository("example-repository") + * .build()); + * + * } + * } + * ``` + * + */ + public static Output getRepositoryEnvironments(GetRepositoryEnvironmentsArgs args) { + return getRepositoryEnvironments(args, InvokeOptions.Empty); + } + /** + * Use this data source to retrieve information about environments for a repository. + * + * ## 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.GetRepositoryEnvironmentsArgs; + * 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 example = GithubFunctions.getRepositoryEnvironments(GetRepositoryEnvironmentsArgs.builder() + * .repository("example-repository") + * .build()); + * + * } + * } + * ``` + * + */ + public static CompletableFuture getRepositoryEnvironmentsPlain(GetRepositoryEnvironmentsPlainArgs args) { + return getRepositoryEnvironmentsPlain(args, InvokeOptions.Empty); + } + /** + * Use this data source to retrieve information about environments for a repository. + * + * ## 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.GetRepositoryEnvironmentsArgs; + * 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 example = GithubFunctions.getRepositoryEnvironments(GetRepositoryEnvironmentsArgs.builder() + * .repository("example-repository") + * .build()); + * + * } + * } + * ``` + * + */ + public static Output getRepositoryEnvironments(GetRepositoryEnvironmentsArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("github:index/getRepositoryEnvironments:getRepositoryEnvironments", TypeShape.of(GetRepositoryEnvironmentsResult.class), args, Utilities.withVersion(options)); + } + /** + * Use this data source to retrieve information about environments for a repository. + * + * ## 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.GetRepositoryEnvironmentsArgs; + * 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 example = GithubFunctions.getRepositoryEnvironments(GetRepositoryEnvironmentsArgs.builder() + * .repository("example-repository") + * .build()); + * + * } + * } + * ``` + * + */ + public static CompletableFuture getRepositoryEnvironmentsPlain(GetRepositoryEnvironmentsPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("github:index/getRepositoryEnvironments:getRepositoryEnvironments", TypeShape.of(GetRepositoryEnvironmentsResult.class), args, Utilities.withVersion(options)); + } /** * This data source allows you to read files within a * GitHub repository. @@ -7825,6 +8130,154 @@ public static Output getRepositoryWebhooks(GetRepos public static CompletableFuture getRepositoryWebhooksPlain(GetRepositoryWebhooksPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("github:index/getRepositoryWebhooks:getRepositoryWebhooks", TypeShape.of(GetRepositoryWebhooksResult.class), args, Utilities.withVersion(options)); } + /** + * Use this data source to retrieve information about a GitHub resource through REST API. + * + * ## 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.GetRestApiArgs; + * 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 example = GithubFunctions.getRestApi(GetRestApiArgs.builder() + * .endpoint("repos/example_repo/git/refs/heads/main") + * .build()); + * + * } + * } + * ``` + * + */ + public static Output getRestApi(GetRestApiArgs args) { + return getRestApi(args, InvokeOptions.Empty); + } + /** + * Use this data source to retrieve information about a GitHub resource through REST API. + * + * ## 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.GetRestApiArgs; + * 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 example = GithubFunctions.getRestApi(GetRestApiArgs.builder() + * .endpoint("repos/example_repo/git/refs/heads/main") + * .build()); + * + * } + * } + * ``` + * + */ + public static CompletableFuture getRestApiPlain(GetRestApiPlainArgs args) { + return getRestApiPlain(args, InvokeOptions.Empty); + } + /** + * Use this data source to retrieve information about a GitHub resource through REST API. + * + * ## 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.GetRestApiArgs; + * 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 example = GithubFunctions.getRestApi(GetRestApiArgs.builder() + * .endpoint("repos/example_repo/git/refs/heads/main") + * .build()); + * + * } + * } + * ``` + * + */ + public static Output getRestApi(GetRestApiArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("github:index/getRestApi:getRestApi", TypeShape.of(GetRestApiResult.class), args, Utilities.withVersion(options)); + } + /** + * Use this data source to retrieve information about a GitHub resource through REST API. + * + * ## 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.GetRestApiArgs; + * 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 example = GithubFunctions.getRestApi(GetRestApiArgs.builder() + * .endpoint("repos/example_repo/git/refs/heads/main") + * .build()); + * + * } + * } + * ``` + * + */ + public static CompletableFuture getRestApiPlain(GetRestApiPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("github:index/getRestApi:getRestApi", TypeShape.of(GetRestApiResult.class), args, Utilities.withVersion(options)); + } /** * Use this data source to retrieve information about GitHub's SSH keys. * diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/ActionsRunnerGroupState.java b/sdk/java/src/main/java/com/pulumi/github/inputs/ActionsRunnerGroupState.java index 6e1fb40a..4eb834c1 100644 --- a/sdk/java/src/main/java/com/pulumi/github/inputs/ActionsRunnerGroupState.java +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/ActionsRunnerGroupState.java @@ -19,14 +19,14 @@ public final class ActionsRunnerGroupState extends com.pulumi.resources.Resource public static final ActionsRunnerGroupState Empty = new ActionsRunnerGroupState(); /** - * Whether public repositories can be added to the runner group + * Whether public repositories can be added to the runner group. Defaults to false. * */ @Import(name="allowsPublicRepositories") private @Nullable Output allowsPublicRepositories; /** - * @return Whether public repositories can be added to the runner group + * @return Whether public repositories can be added to the runner group. Defaults to false. * */ public Optional> allowsPublicRepositories() { @@ -218,7 +218,7 @@ public Builder(ActionsRunnerGroupState defaults) { } /** - * @param allowsPublicRepositories Whether public repositories can be added to the runner group + * @param allowsPublicRepositories Whether public repositories can be added to the runner group. Defaults to false. * * @return builder * @@ -229,7 +229,7 @@ public Builder allowsPublicRepositories(@Nullable Output allowsPublicRe } /** - * @param allowsPublicRepositories Whether public repositories can be added to the runner group + * @param allowsPublicRepositories Whether public repositories can be added to the runner group. Defaults to false. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryAutolinkReferencesArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryAutolinkReferencesArgs.java new file mode 100644 index 00000000..04a98b93 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryAutolinkReferencesArgs.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 java.lang.String; +import java.util.Objects; + + +public final class GetRepositoryAutolinkReferencesArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetRepositoryAutolinkReferencesArgs Empty = new GetRepositoryAutolinkReferencesArgs(); + + /** + * Name of the repository to retrieve the autolink references from. + * + */ + @Import(name="repository", required=true) + private Output repository; + + /** + * @return Name of the repository to retrieve the autolink references from. + * + */ + public Output repository() { + return this.repository; + } + + private GetRepositoryAutolinkReferencesArgs() {} + + private GetRepositoryAutolinkReferencesArgs(GetRepositoryAutolinkReferencesArgs $) { + this.repository = $.repository; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetRepositoryAutolinkReferencesArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetRepositoryAutolinkReferencesArgs $; + + public Builder() { + $ = new GetRepositoryAutolinkReferencesArgs(); + } + + public Builder(GetRepositoryAutolinkReferencesArgs defaults) { + $ = new GetRepositoryAutolinkReferencesArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param repository Name of the repository to retrieve the autolink references from. + * + * @return builder + * + */ + public Builder repository(Output repository) { + $.repository = repository; + return this; + } + + /** + * @param repository Name of the repository to retrieve the autolink references from. + * + * @return builder + * + */ + public Builder repository(String repository) { + return repository(Output.of(repository)); + } + + public GetRepositoryAutolinkReferencesArgs build() { + $.repository = Objects.requireNonNull($.repository, "expected parameter 'repository' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryAutolinkReferencesPlainArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryAutolinkReferencesPlainArgs.java new file mode 100644 index 00000000..a7faa888 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryAutolinkReferencesPlainArgs.java @@ -0,0 +1,71 @@ +// *** 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.annotations.Import; +import java.lang.String; +import java.util.Objects; + + +public final class GetRepositoryAutolinkReferencesPlainArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetRepositoryAutolinkReferencesPlainArgs Empty = new GetRepositoryAutolinkReferencesPlainArgs(); + + /** + * Name of the repository to retrieve the autolink references from. + * + */ + @Import(name="repository", required=true) + private String repository; + + /** + * @return Name of the repository to retrieve the autolink references from. + * + */ + public String repository() { + return this.repository; + } + + private GetRepositoryAutolinkReferencesPlainArgs() {} + + private GetRepositoryAutolinkReferencesPlainArgs(GetRepositoryAutolinkReferencesPlainArgs $) { + this.repository = $.repository; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetRepositoryAutolinkReferencesPlainArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetRepositoryAutolinkReferencesPlainArgs $; + + public Builder() { + $ = new GetRepositoryAutolinkReferencesPlainArgs(); + } + + public Builder(GetRepositoryAutolinkReferencesPlainArgs defaults) { + $ = new GetRepositoryAutolinkReferencesPlainArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param repository Name of the repository to retrieve the autolink references from. + * + * @return builder + * + */ + public Builder repository(String repository) { + $.repository = repository; + return this; + } + + public GetRepositoryAutolinkReferencesPlainArgs build() { + $.repository = Objects.requireNonNull($.repository, "expected parameter 'repository' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryEnvironmentsArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryEnvironmentsArgs.java new file mode 100644 index 00000000..bc555fe9 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryEnvironmentsArgs.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 java.lang.String; +import java.util.Objects; + + +public final class GetRepositoryEnvironmentsArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetRepositoryEnvironmentsArgs Empty = new GetRepositoryEnvironmentsArgs(); + + /** + * Name of the repository to retrieve the environments from. + * + */ + @Import(name="repository", required=true) + private Output repository; + + /** + * @return Name of the repository to retrieve the environments from. + * + */ + public Output repository() { + return this.repository; + } + + private GetRepositoryEnvironmentsArgs() {} + + private GetRepositoryEnvironmentsArgs(GetRepositoryEnvironmentsArgs $) { + this.repository = $.repository; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetRepositoryEnvironmentsArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetRepositoryEnvironmentsArgs $; + + public Builder() { + $ = new GetRepositoryEnvironmentsArgs(); + } + + public Builder(GetRepositoryEnvironmentsArgs defaults) { + $ = new GetRepositoryEnvironmentsArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param repository Name of the repository to retrieve the environments from. + * + * @return builder + * + */ + public Builder repository(Output repository) { + $.repository = repository; + return this; + } + + /** + * @param repository Name of the repository to retrieve the environments from. + * + * @return builder + * + */ + public Builder repository(String repository) { + return repository(Output.of(repository)); + } + + public GetRepositoryEnvironmentsArgs build() { + $.repository = Objects.requireNonNull($.repository, "expected parameter 'repository' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryEnvironmentsPlainArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryEnvironmentsPlainArgs.java new file mode 100644 index 00000000..574dd059 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRepositoryEnvironmentsPlainArgs.java @@ -0,0 +1,71 @@ +// *** 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.annotations.Import; +import java.lang.String; +import java.util.Objects; + + +public final class GetRepositoryEnvironmentsPlainArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetRepositoryEnvironmentsPlainArgs Empty = new GetRepositoryEnvironmentsPlainArgs(); + + /** + * Name of the repository to retrieve the environments from. + * + */ + @Import(name="repository", required=true) + private String repository; + + /** + * @return Name of the repository to retrieve the environments from. + * + */ + public String repository() { + return this.repository; + } + + private GetRepositoryEnvironmentsPlainArgs() {} + + private GetRepositoryEnvironmentsPlainArgs(GetRepositoryEnvironmentsPlainArgs $) { + this.repository = $.repository; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetRepositoryEnvironmentsPlainArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetRepositoryEnvironmentsPlainArgs $; + + public Builder() { + $ = new GetRepositoryEnvironmentsPlainArgs(); + } + + public Builder(GetRepositoryEnvironmentsPlainArgs defaults) { + $ = new GetRepositoryEnvironmentsPlainArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param repository Name of the repository to retrieve the environments from. + * + * @return builder + * + */ + public Builder repository(String repository) { + $.repository = repository; + return this; + } + + public GetRepositoryEnvironmentsPlainArgs build() { + $.repository = Objects.requireNonNull($.repository, "expected parameter 'repository' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/GetRestApiArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRestApiArgs.java new file mode 100644 index 00000000..705b29ff --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRestApiArgs.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 java.lang.String; +import java.util.Objects; + + +public final class GetRestApiArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetRestApiArgs Empty = new GetRestApiArgs(); + + /** + * REST API endpoint to send the GET request to. + * + */ + @Import(name="endpoint", required=true) + private Output endpoint; + + /** + * @return REST API endpoint to send the GET request to. + * + */ + public Output endpoint() { + return this.endpoint; + } + + private GetRestApiArgs() {} + + private GetRestApiArgs(GetRestApiArgs $) { + this.endpoint = $.endpoint; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetRestApiArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetRestApiArgs $; + + public Builder() { + $ = new GetRestApiArgs(); + } + + public Builder(GetRestApiArgs defaults) { + $ = new GetRestApiArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param endpoint REST API endpoint to send the GET request to. + * + * @return builder + * + */ + public Builder endpoint(Output endpoint) { + $.endpoint = endpoint; + return this; + } + + /** + * @param endpoint REST API endpoint to send the GET request to. + * + * @return builder + * + */ + public Builder endpoint(String endpoint) { + return endpoint(Output.of(endpoint)); + } + + public GetRestApiArgs build() { + $.endpoint = Objects.requireNonNull($.endpoint, "expected parameter 'endpoint' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/GetRestApiPlainArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRestApiPlainArgs.java new file mode 100644 index 00000000..791f7fbd --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/GetRestApiPlainArgs.java @@ -0,0 +1,71 @@ +// *** 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.annotations.Import; +import java.lang.String; +import java.util.Objects; + + +public final class GetRestApiPlainArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetRestApiPlainArgs Empty = new GetRestApiPlainArgs(); + + /** + * REST API endpoint to send the GET request to. + * + */ + @Import(name="endpoint", required=true) + private String endpoint; + + /** + * @return REST API endpoint to send the GET request to. + * + */ + public String endpoint() { + return this.endpoint; + } + + private GetRestApiPlainArgs() {} + + private GetRestApiPlainArgs(GetRestApiPlainArgs $) { + this.endpoint = $.endpoint; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetRestApiPlainArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetRestApiPlainArgs $; + + public Builder() { + $ = new GetRestApiPlainArgs(); + } + + public Builder(GetRestApiPlainArgs defaults) { + $ = new GetRestApiPlainArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param endpoint REST API endpoint to send the GET request to. + * + * @return builder + * + */ + public Builder endpoint(String endpoint) { + $.endpoint = endpoint; + return this; + } + + public GetRestApiPlainArgs build() { + $.endpoint = Objects.requireNonNull($.endpoint, "expected parameter 'endpoint' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryPagesArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryPagesArgs.java index b7116be9..937caa2c 100644 --- a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryPagesArgs.java +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryPagesArgs.java @@ -17,6 +17,21 @@ public final class RepositoryPagesArgs extends com.pulumi.resources.ResourceArgs public static final RepositoryPagesArgs Empty = new RepositoryPagesArgs(); + /** + * 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`. + * + */ + @Import(name="buildType") + private @Nullable Output buildType; + + /** + * @return 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`. + * + */ + public Optional> buildType() { + return Optional.ofNullable(this.buildType); + } + /** * The custom domain for the repository. This can only be set after the repository has been created. * @@ -66,15 +81,15 @@ public Optional> htmlUrl() { * The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. * */ - @Import(name="source", required=true) - private Output source; + @Import(name="source") + private @Nullable Output source; /** * @return The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. * */ - public Output source() { - return this.source; + public Optional> source() { + return Optional.ofNullable(this.source); } /** @@ -102,6 +117,7 @@ public Optional> url() { private RepositoryPagesArgs() {} private RepositoryPagesArgs(RepositoryPagesArgs $) { + this.buildType = $.buildType; this.cname = $.cname; this.custom404 = $.custom404; this.htmlUrl = $.htmlUrl; @@ -128,6 +144,27 @@ public Builder(RepositoryPagesArgs defaults) { $ = new RepositoryPagesArgs(Objects.requireNonNull(defaults)); } + /** + * @param buildType 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 builder + * + */ + public Builder buildType(@Nullable Output buildType) { + $.buildType = buildType; + return this; + } + + /** + * @param buildType 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 builder + * + */ + public Builder buildType(String buildType) { + return buildType(Output.of(buildType)); + } + /** * @param cname The custom domain for the repository. This can only be set after the repository has been created. * @@ -197,7 +234,7 @@ public Builder htmlUrl(String htmlUrl) { * @return builder * */ - public Builder source(Output source) { + public Builder source(@Nullable Output source) { $.source = source; return this; } @@ -243,7 +280,6 @@ public Builder url(String url) { } public RepositoryPagesArgs build() { - $.source = Objects.requireNonNull($.source, "expected parameter 'source' to be non-null"); return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/GetOrganizationResult.java b/sdk/java/src/main/java/com/pulumi/github/outputs/GetOrganizationResult.java index 02c0ac45..6d6a0c2d 100644 --- a/sdk/java/src/main/java/com/pulumi/github/outputs/GetOrganizationResult.java +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/GetOrganizationResult.java @@ -12,7 +12,7 @@ @CustomType public final class GetOrganizationResult { /** - * @return The description the organization account + * @return The organization account description * */ private String description; @@ -41,7 +41,7 @@ public final class GetOrganizationResult { */ private String name; /** - * @return GraphQL global node id for use with v4 API + * @return GraphQL global node ID for use with the v4 API * */ private String nodeId; @@ -51,12 +51,12 @@ public final class GetOrganizationResult { */ private String orgname; /** - * @return The plan name for the organization account + * @return The organization account plan name * */ private String plan; /** - * @return (`list`) A list with the repositories on the organization + * @return (`list`) A list of the full names of the repositories in the organization formatted as `owner/name` strings * */ private List repositories; @@ -68,7 +68,7 @@ public final class GetOrganizationResult { private GetOrganizationResult() {} /** - * @return The description the organization account + * @return The organization account description * */ public String description() { @@ -107,7 +107,7 @@ public String name() { return this.name; } /** - * @return GraphQL global node id for use with v4 API + * @return GraphQL global node ID for use with the v4 API * */ public String nodeId() { @@ -121,14 +121,14 @@ public String orgname() { return this.orgname; } /** - * @return The plan name for the organization account + * @return The organization account plan name * */ public String plan() { return this.plan; } /** - * @return (`list`) A list with the repositories on the organization + * @return (`list`) A list of the full names of the repositories in the organization formatted as `owner/name` strings * */ public List repositories() { diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryAutolinkReferencesAutolinkReference.java b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryAutolinkReferencesAutolinkReference.java new file mode 100644 index 00000000..b7291b0f --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryAutolinkReferencesAutolinkReference.java @@ -0,0 +1,95 @@ +// *** 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; + +@CustomType +public final class GetRepositoryAutolinkReferencesAutolinkReference { + /** + * @return True if alphanumeric. + * + */ + private Boolean isAlphanumeric; + /** + * @return Key prefix. + * + */ + private String keyPrefix; + /** + * @return Target url template. + * + */ + private String targetUrlTemplate; + + private GetRepositoryAutolinkReferencesAutolinkReference() {} + /** + * @return True if alphanumeric. + * + */ + public Boolean isAlphanumeric() { + return this.isAlphanumeric; + } + /** + * @return Key prefix. + * + */ + public String keyPrefix() { + return this.keyPrefix; + } + /** + * @return Target url template. + * + */ + public String targetUrlTemplate() { + return this.targetUrlTemplate; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetRepositoryAutolinkReferencesAutolinkReference defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private Boolean isAlphanumeric; + private String keyPrefix; + private String targetUrlTemplate; + public Builder() {} + public Builder(GetRepositoryAutolinkReferencesAutolinkReference defaults) { + Objects.requireNonNull(defaults); + this.isAlphanumeric = defaults.isAlphanumeric; + this.keyPrefix = defaults.keyPrefix; + this.targetUrlTemplate = defaults.targetUrlTemplate; + } + + @CustomType.Setter + public Builder isAlphanumeric(Boolean isAlphanumeric) { + this.isAlphanumeric = Objects.requireNonNull(isAlphanumeric); + return this; + } + @CustomType.Setter + public Builder keyPrefix(String keyPrefix) { + this.keyPrefix = Objects.requireNonNull(keyPrefix); + return this; + } + @CustomType.Setter + public Builder targetUrlTemplate(String targetUrlTemplate) { + this.targetUrlTemplate = Objects.requireNonNull(targetUrlTemplate); + return this; + } + public GetRepositoryAutolinkReferencesAutolinkReference build() { + final var o = new GetRepositoryAutolinkReferencesAutolinkReference(); + o.isAlphanumeric = isAlphanumeric; + o.keyPrefix = keyPrefix; + o.targetUrlTemplate = targetUrlTemplate; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryAutolinkReferencesResult.java b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryAutolinkReferencesResult.java new file mode 100644 index 00000000..7f429131 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryAutolinkReferencesResult.java @@ -0,0 +1,91 @@ +// *** 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.GetRepositoryAutolinkReferencesAutolinkReference; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class GetRepositoryAutolinkReferencesResult { + /** + * @return The list of this repository's autolink references. Each element of `autolink_references` has the following attributes: + * + */ + private List autolinkReferences; + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + private String id; + private String repository; + + private GetRepositoryAutolinkReferencesResult() {} + /** + * @return The list of this repository's autolink references. Each element of `autolink_references` has the following attributes: + * + */ + public List autolinkReferences() { + return this.autolinkReferences; + } + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + public String id() { + return this.id; + } + public String repository() { + return this.repository; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetRepositoryAutolinkReferencesResult defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private List autolinkReferences; + private String id; + private String repository; + public Builder() {} + public Builder(GetRepositoryAutolinkReferencesResult defaults) { + Objects.requireNonNull(defaults); + this.autolinkReferences = defaults.autolinkReferences; + this.id = defaults.id; + this.repository = defaults.repository; + } + + @CustomType.Setter + public Builder autolinkReferences(List autolinkReferences) { + this.autolinkReferences = Objects.requireNonNull(autolinkReferences); + return this; + } + public Builder autolinkReferences(GetRepositoryAutolinkReferencesAutolinkReference... autolinkReferences) { + return autolinkReferences(List.of(autolinkReferences)); + } + @CustomType.Setter + public Builder id(String id) { + this.id = Objects.requireNonNull(id); + return this; + } + @CustomType.Setter + public Builder repository(String repository) { + this.repository = Objects.requireNonNull(repository); + return this; + } + public GetRepositoryAutolinkReferencesResult build() { + final var o = new GetRepositoryAutolinkReferencesResult(); + o.autolinkReferences = autolinkReferences; + o.id = id; + o.repository = repository; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryEnvironmentsEnvironment.java b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryEnvironmentsEnvironment.java new file mode 100644 index 00000000..13c54ede --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryEnvironmentsEnvironment.java @@ -0,0 +1,74 @@ +// *** 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.Objects; + +@CustomType +public final class GetRepositoryEnvironmentsEnvironment { + /** + * @return Environment name. + * + */ + private String name; + /** + * @return Environment node id. + * + */ + private String nodeId; + + private GetRepositoryEnvironmentsEnvironment() {} + /** + * @return Environment name. + * + */ + public String name() { + return this.name; + } + /** + * @return Environment node id. + * + */ + public String nodeId() { + return this.nodeId; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetRepositoryEnvironmentsEnvironment defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String name; + private String nodeId; + public Builder() {} + public Builder(GetRepositoryEnvironmentsEnvironment defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + this.nodeId = defaults.nodeId; + } + + @CustomType.Setter + public Builder name(String name) { + this.name = Objects.requireNonNull(name); + return this; + } + @CustomType.Setter + public Builder nodeId(String nodeId) { + this.nodeId = Objects.requireNonNull(nodeId); + return this; + } + public GetRepositoryEnvironmentsEnvironment build() { + final var o = new GetRepositoryEnvironmentsEnvironment(); + o.name = name; + o.nodeId = nodeId; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryEnvironmentsResult.java b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryEnvironmentsResult.java new file mode 100644 index 00000000..f5d64744 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRepositoryEnvironmentsResult.java @@ -0,0 +1,91 @@ +// *** 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.GetRepositoryEnvironmentsEnvironment; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class GetRepositoryEnvironmentsResult { + /** + * @return The list of this repository's environments. Each element of `environments` has the following attributes: + * + */ + private List environments; + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + private String id; + private String repository; + + private GetRepositoryEnvironmentsResult() {} + /** + * @return The list of this repository's environments. Each element of `environments` has the following attributes: + * + */ + public List environments() { + return this.environments; + } + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + public String id() { + return this.id; + } + public String repository() { + return this.repository; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetRepositoryEnvironmentsResult defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private List environments; + private String id; + private String repository; + public Builder() {} + public Builder(GetRepositoryEnvironmentsResult defaults) { + Objects.requireNonNull(defaults); + this.environments = defaults.environments; + this.id = defaults.id; + this.repository = defaults.repository; + } + + @CustomType.Setter + public Builder environments(List environments) { + this.environments = Objects.requireNonNull(environments); + return this; + } + public Builder environments(GetRepositoryEnvironmentsEnvironment... environments) { + return environments(List.of(environments)); + } + @CustomType.Setter + public Builder id(String id) { + this.id = Objects.requireNonNull(id); + return this; + } + @CustomType.Setter + public Builder repository(String repository) { + this.repository = Objects.requireNonNull(repository); + return this; + } + public GetRepositoryEnvironmentsResult build() { + final var o = new GetRepositoryEnvironmentsResult(); + o.environments = environments; + o.id = id; + o.repository = repository; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/GetRestApiResult.java b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRestApiResult.java new file mode 100644 index 00000000..e8491f0b --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/GetRestApiResult.java @@ -0,0 +1,149 @@ +// *** 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.Object; +import java.lang.String; +import java.util.Map; +import java.util.Objects; + +@CustomType +public final class GetRestApiResult { + /** + * @return A map of response body. + * + */ + private Map body; + /** + * @return A response status code. + * + */ + private Integer code; + private String endpoint; + /** + * @return A map of response headers. + * + */ + private Map headers; + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + private String id; + /** + * @return A response status string. + * + */ + private String status; + + private GetRestApiResult() {} + /** + * @return A map of response body. + * + */ + public Map body() { + return this.body; + } + /** + * @return A response status code. + * + */ + public Integer code() { + return this.code; + } + public String endpoint() { + return this.endpoint; + } + /** + * @return A map of response headers. + * + */ + public Map headers() { + return this.headers; + } + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + public String id() { + return this.id; + } + /** + * @return A response status string. + * + */ + public String status() { + return this.status; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetRestApiResult defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private Map body; + private Integer code; + private String endpoint; + private Map headers; + private String id; + private String status; + public Builder() {} + public Builder(GetRestApiResult defaults) { + Objects.requireNonNull(defaults); + this.body = defaults.body; + this.code = defaults.code; + this.endpoint = defaults.endpoint; + this.headers = defaults.headers; + this.id = defaults.id; + this.status = defaults.status; + } + + @CustomType.Setter + public Builder body(Map body) { + this.body = Objects.requireNonNull(body); + return this; + } + @CustomType.Setter + public Builder code(Integer code) { + this.code = Objects.requireNonNull(code); + return this; + } + @CustomType.Setter + public Builder endpoint(String endpoint) { + this.endpoint = Objects.requireNonNull(endpoint); + return this; + } + @CustomType.Setter + public Builder headers(Map headers) { + this.headers = Objects.requireNonNull(headers); + return this; + } + @CustomType.Setter + public Builder id(String id) { + this.id = Objects.requireNonNull(id); + return this; + } + @CustomType.Setter + public Builder status(String status) { + this.status = Objects.requireNonNull(status); + return this; + } + public GetRestApiResult build() { + final var o = new GetRestApiResult(); + o.body = body; + o.code = code; + o.endpoint = endpoint; + o.headers = headers; + o.id = id; + o.status = status; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/GetTeamRepositoriesDetailed.java b/sdk/java/src/main/java/com/pulumi/github/outputs/GetTeamRepositoriesDetailed.java new file mode 100644 index 00000000..638e5e85 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/GetTeamRepositoriesDetailed.java @@ -0,0 +1,59 @@ +// *** 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; + +@CustomType +public final class GetTeamRepositoriesDetailed { + private Integer repoId; + private String roleName; + + private GetTeamRepositoriesDetailed() {} + public Integer repoId() { + return this.repoId; + } + public String roleName() { + return this.roleName; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetTeamRepositoriesDetailed defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private Integer repoId; + private String roleName; + public Builder() {} + public Builder(GetTeamRepositoriesDetailed defaults) { + Objects.requireNonNull(defaults); + this.repoId = defaults.repoId; + this.roleName = defaults.roleName; + } + + @CustomType.Setter + public Builder repoId(Integer repoId) { + this.repoId = Objects.requireNonNull(repoId); + return this; + } + @CustomType.Setter + public Builder roleName(String roleName) { + this.roleName = Objects.requireNonNull(roleName); + return this; + } + public GetTeamRepositoriesDetailed build() { + final var o = new GetTeamRepositoriesDetailed(); + o.repoId = repoId; + o.roleName = roleName; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/GetTeamResult.java b/sdk/java/src/main/java/com/pulumi/github/outputs/GetTeamResult.java index 02d3fba7..25523320 100644 --- a/sdk/java/src/main/java/com/pulumi/github/outputs/GetTeamResult.java +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/GetTeamResult.java @@ -4,6 +4,7 @@ package com.pulumi.github.outputs; import com.pulumi.core.annotations.CustomType; +import com.pulumi.github.outputs.GetTeamRepositoriesDetailed; import java.lang.Boolean; import java.lang.Integer; import java.lang.String; @@ -55,6 +56,11 @@ public final class GetTeamResult { * */ private List repositories; + /** + * @return List of team repositories (list of `repo_id` and `role_name`). Not returned if `summary_only = true` + * + */ + private List repositoriesDetaileds; private @Nullable Integer resultsPerPage; private String slug; private @Nullable Boolean summaryOnly; @@ -119,6 +125,13 @@ public String privacy() { public List repositories() { return this.repositories; } + /** + * @return List of team repositories (list of `repo_id` and `role_name`). Not returned if `summary_only = true` + * + */ + public List repositoriesDetaileds() { + return this.repositoriesDetaileds; + } public Optional resultsPerPage() { return Optional.ofNullable(this.resultsPerPage); } @@ -147,6 +160,7 @@ public static final class Builder { private String permission; private String privacy; private List repositories; + private List repositoriesDetaileds; private @Nullable Integer resultsPerPage; private String slug; private @Nullable Boolean summaryOnly; @@ -162,6 +176,7 @@ public Builder(GetTeamResult defaults) { this.permission = defaults.permission; this.privacy = defaults.privacy; this.repositories = defaults.repositories; + this.repositoriesDetaileds = defaults.repositoriesDetaileds; this.resultsPerPage = defaults.resultsPerPage; this.slug = defaults.slug; this.summaryOnly = defaults.summaryOnly; @@ -219,6 +234,14 @@ public Builder repositories(String... repositories) { return repositories(List.of(repositories)); } @CustomType.Setter + public Builder repositoriesDetaileds(List repositoriesDetaileds) { + this.repositoriesDetaileds = Objects.requireNonNull(repositoriesDetaileds); + return this; + } + public Builder repositoriesDetaileds(GetTeamRepositoriesDetailed... repositoriesDetaileds) { + return repositoriesDetaileds(List.of(repositoriesDetaileds)); + } + @CustomType.Setter public Builder resultsPerPage(@Nullable Integer resultsPerPage) { this.resultsPerPage = resultsPerPage; return this; @@ -244,6 +267,7 @@ public GetTeamResult build() { o.permission = permission; o.privacy = privacy; o.repositories = repositories; + o.repositoriesDetaileds = repositoriesDetaileds; o.resultsPerPage = resultsPerPage; o.slug = slug; o.summaryOnly = summaryOnly; diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryPages.java b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryPages.java index 28ba8f1b..e84c21b9 100644 --- a/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryPages.java +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/RepositoryPages.java @@ -13,6 +13,11 @@ @CustomType public final class RepositoryPages { + /** + * @return 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`. + * + */ + private @Nullable String buildType; /** * @return The custom domain for the repository. This can only be set after the repository has been created. * @@ -32,7 +37,7 @@ public final class RepositoryPages { * @return The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. * */ - private RepositoryPagesSource source; + private @Nullable RepositoryPagesSource source; /** * @return Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. * @@ -41,6 +46,13 @@ public final class RepositoryPages { private @Nullable String url; private RepositoryPages() {} + /** + * @return 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`. + * + */ + public Optional buildType() { + return Optional.ofNullable(this.buildType); + } /** * @return The custom domain for the repository. This can only be set after the repository has been created. * @@ -66,8 +78,8 @@ public Optional htmlUrl() { * @return The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. * */ - public RepositoryPagesSource source() { - return this.source; + public Optional source() { + return Optional.ofNullable(this.source); } /** * @return Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. @@ -89,15 +101,17 @@ public static Builder builder(RepositoryPages defaults) { } @CustomType.Builder public static final class Builder { + private @Nullable String buildType; private @Nullable String cname; private @Nullable Boolean custom404; private @Nullable String htmlUrl; - private RepositoryPagesSource source; + private @Nullable RepositoryPagesSource source; private @Nullable String status; private @Nullable String url; public Builder() {} public Builder(RepositoryPages defaults) { Objects.requireNonNull(defaults); + this.buildType = defaults.buildType; this.cname = defaults.cname; this.custom404 = defaults.custom404; this.htmlUrl = defaults.htmlUrl; @@ -106,6 +120,11 @@ public Builder(RepositoryPages defaults) { this.url = defaults.url; } + @CustomType.Setter + public Builder buildType(@Nullable String buildType) { + this.buildType = buildType; + return this; + } @CustomType.Setter public Builder cname(@Nullable String cname) { this.cname = cname; @@ -122,8 +141,8 @@ public Builder htmlUrl(@Nullable String htmlUrl) { return this; } @CustomType.Setter - public Builder source(RepositoryPagesSource source) { - this.source = Objects.requireNonNull(source); + public Builder source(@Nullable RepositoryPagesSource source) { + this.source = source; return this; } @CustomType.Setter @@ -138,6 +157,7 @@ public Builder url(@Nullable String url) { } public RepositoryPages build() { final var o = new RepositoryPages(); + o.buildType = buildType; o.cname = cname; o.custom404 = custom404; o.htmlUrl = htmlUrl; diff --git a/sdk/nodejs/actionsRunnerGroup.ts b/sdk/nodejs/actionsRunnerGroup.ts index 847eb9e7..42208a6a 100644 --- a/sdk/nodejs/actionsRunnerGroup.ts +++ b/sdk/nodejs/actionsRunnerGroup.ts @@ -58,9 +58,9 @@ export class ActionsRunnerGroup extends pulumi.CustomResource { } /** - * Whether public repositories can be added to the runner group + * Whether public repositories can be added to the runner group. Defaults to false. */ - public /*out*/ readonly allowsPublicRepositories!: pulumi.Output; + public readonly allowsPublicRepositories!: pulumi.Output; /** * Whether this is the default runner group */ @@ -131,12 +131,12 @@ export class ActionsRunnerGroup extends pulumi.CustomResource { if ((!args || args.visibility === undefined) && !opts.urn) { throw new Error("Missing required property 'visibility'"); } + resourceInputs["allowsPublicRepositories"] = args ? args.allowsPublicRepositories : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["restrictedToWorkflows"] = args ? args.restrictedToWorkflows : undefined; resourceInputs["selectedRepositoryIds"] = args ? args.selectedRepositoryIds : undefined; resourceInputs["selectedWorkflows"] = args ? args.selectedWorkflows : undefined; resourceInputs["visibility"] = args ? args.visibility : undefined; - resourceInputs["allowsPublicRepositories"] = undefined /*out*/; resourceInputs["default"] = undefined /*out*/; resourceInputs["etag"] = undefined /*out*/; resourceInputs["inherited"] = undefined /*out*/; @@ -153,7 +153,7 @@ export class ActionsRunnerGroup extends pulumi.CustomResource { */ export interface ActionsRunnerGroupState { /** - * Whether public repositories can be added to the runner group + * Whether public repositories can be added to the runner group. Defaults to false. */ allowsPublicRepositories?: pulumi.Input; /** @@ -202,6 +202,10 @@ export interface ActionsRunnerGroupState { * The set of arguments for constructing a ActionsRunnerGroup resource. */ export interface ActionsRunnerGroupArgs { + /** + * Whether public repositories can be added to the runner group. Defaults to false. + */ + allowsPublicRepositories?: pulumi.Input; /** * Name of the runner group */ diff --git a/sdk/nodejs/getOrganization.ts b/sdk/nodejs/getOrganization.ts index 2adf34df..c5b76629 100644 --- a/sdk/nodejs/getOrganization.ts +++ b/sdk/nodejs/getOrganization.ts @@ -41,7 +41,7 @@ export interface GetOrganizationArgs { */ export interface GetOrganizationResult { /** - * The description the organization account + * The organization account description */ readonly description: string; /** @@ -63,7 +63,7 @@ export interface GetOrganizationResult { */ readonly name: string; /** - * GraphQL global node id for use with v4 API + * GraphQL global node ID for use with the v4 API */ readonly nodeId: string; /** @@ -71,11 +71,11 @@ export interface GetOrganizationResult { */ readonly orgname: string; /** - * The plan name for the organization account + * The organization account plan name */ readonly plan: string; /** - * (`list`) A list with the repositories on the organization + * (`list`) A list of the full names of the repositories in the organization formatted as `owner/name` strings */ readonly repositories: string[]; /** diff --git a/sdk/nodejs/getRepositoryAutolinkReferences.ts b/sdk/nodejs/getRepositoryAutolinkReferences.ts new file mode 100644 index 00000000..0b3a9deb --- /dev/null +++ b/sdk/nodejs/getRepositoryAutolinkReferences.ts @@ -0,0 +1,81 @@ +// *** 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"; + +/** + * Use this data source to retrieve autolink references for a repository. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const example = github.getRepositoryAutolinkReferences({ + * repository: "example-repository", + * }); + * ``` + */ +export function getRepositoryAutolinkReferences(args: GetRepositoryAutolinkReferencesArgs, opts?: pulumi.InvokeOptions): Promise { + + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("github:index/getRepositoryAutolinkReferences:getRepositoryAutolinkReferences", { + "repository": args.repository, + }, opts); +} + +/** + * A collection of arguments for invoking getRepositoryAutolinkReferences. + */ +export interface GetRepositoryAutolinkReferencesArgs { + /** + * Name of the repository to retrieve the autolink references from. + */ + repository: string; +} + +/** + * A collection of values returned by getRepositoryAutolinkReferences. + */ +export interface GetRepositoryAutolinkReferencesResult { + /** + * The list of this repository's autolink references. Each element of `autolinkReferences` has the following attributes: + */ + readonly autolinkReferences: outputs.GetRepositoryAutolinkReferencesAutolinkReference[]; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly repository: string; +} +/** + * Use this data source to retrieve autolink references for a repository. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const example = github.getRepositoryAutolinkReferences({ + * repository: "example-repository", + * }); + * ``` + */ +export function getRepositoryAutolinkReferencesOutput(args: GetRepositoryAutolinkReferencesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { + return pulumi.output(args).apply((a: any) => getRepositoryAutolinkReferences(a, opts)) +} + +/** + * A collection of arguments for invoking getRepositoryAutolinkReferences. + */ +export interface GetRepositoryAutolinkReferencesOutputArgs { + /** + * Name of the repository to retrieve the autolink references from. + */ + repository: pulumi.Input; +} diff --git a/sdk/nodejs/getRepositoryEnvironments.ts b/sdk/nodejs/getRepositoryEnvironments.ts new file mode 100644 index 00000000..73af07e3 --- /dev/null +++ b/sdk/nodejs/getRepositoryEnvironments.ts @@ -0,0 +1,81 @@ +// *** 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"; + +/** + * Use this data source to retrieve information about environments for a repository. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const example = github.getRepositoryEnvironments({ + * repository: "example-repository", + * }); + * ``` + */ +export function getRepositoryEnvironments(args: GetRepositoryEnvironmentsArgs, opts?: pulumi.InvokeOptions): Promise { + + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("github:index/getRepositoryEnvironments:getRepositoryEnvironments", { + "repository": args.repository, + }, opts); +} + +/** + * A collection of arguments for invoking getRepositoryEnvironments. + */ +export interface GetRepositoryEnvironmentsArgs { + /** + * Name of the repository to retrieve the environments from. + */ + repository: string; +} + +/** + * A collection of values returned by getRepositoryEnvironments. + */ +export interface GetRepositoryEnvironmentsResult { + /** + * The list of this repository's environments. Each element of `environments` has the following attributes: + */ + readonly environments: outputs.GetRepositoryEnvironmentsEnvironment[]; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly repository: string; +} +/** + * Use this data source to retrieve information about environments for a repository. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const example = github.getRepositoryEnvironments({ + * repository: "example-repository", + * }); + * ``` + */ +export function getRepositoryEnvironmentsOutput(args: GetRepositoryEnvironmentsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { + return pulumi.output(args).apply((a: any) => getRepositoryEnvironments(a, opts)) +} + +/** + * A collection of arguments for invoking getRepositoryEnvironments. + */ +export interface GetRepositoryEnvironmentsOutputArgs { + /** + * Name of the repository to retrieve the environments from. + */ + repository: pulumi.Input; +} diff --git a/sdk/nodejs/getRestApi.ts b/sdk/nodejs/getRestApi.ts new file mode 100644 index 00000000..3a544075 --- /dev/null +++ b/sdk/nodejs/getRestApi.ts @@ -0,0 +1,91 @@ +// *** 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"; + +/** + * Use this data source to retrieve information about a GitHub resource through REST API. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const example = github.getRestApi({ + * endpoint: "repos/example_repo/git/refs/heads/main", + * }); + * ``` + */ +export function getRestApi(args: GetRestApiArgs, opts?: pulumi.InvokeOptions): Promise { + + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("github:index/getRestApi:getRestApi", { + "endpoint": args.endpoint, + }, opts); +} + +/** + * A collection of arguments for invoking getRestApi. + */ +export interface GetRestApiArgs { + /** + * REST API endpoint to send the GET request to. + */ + endpoint: string; +} + +/** + * A collection of values returned by getRestApi. + */ +export interface GetRestApiResult { + /** + * A map of response body. + */ + readonly body: {[key: string]: any}; + /** + * A response status code. + */ + readonly code: number; + readonly endpoint: string; + /** + * A map of response headers. + */ + readonly headers: {[key: string]: any}; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * A response status string. + */ + readonly status: string; +} +/** + * Use this data source to retrieve information about a GitHub resource through REST API. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const example = github.getRestApi({ + * endpoint: "repos/example_repo/git/refs/heads/main", + * }); + * ``` + */ +export function getRestApiOutput(args: GetRestApiOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { + return pulumi.output(args).apply((a: any) => getRestApi(a, opts)) +} + +/** + * A collection of arguments for invoking getRestApi. + */ +export interface GetRestApiOutputArgs { + /** + * REST API endpoint to send the GET request to. + */ + endpoint: pulumi.Input; +} diff --git a/sdk/nodejs/getTeam.ts b/sdk/nodejs/getTeam.ts index cce101fa..756ce8f7 100644 --- a/sdk/nodejs/getTeam.ts +++ b/sdk/nodejs/getTeam.ts @@ -2,6 +2,8 @@ // *** 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"; /** @@ -88,6 +90,10 @@ export interface GetTeamResult { * List of team repositories (list of repo names). Not returned if `summaryOnly = true` */ readonly repositories: string[]; + /** + * List of team repositories (list of `repoId` and `roleName`). Not returned if `summaryOnly = true` + */ + readonly repositoriesDetaileds: outputs.GetTeamRepositoriesDetailed[]; readonly resultsPerPage?: number; readonly slug: string; readonly summaryOnly?: boolean; diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index 798f8d62..4e781851 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -283,6 +283,11 @@ export const getRepository: typeof import("./getRepository").getRepository = nul export const getRepositoryOutput: typeof import("./getRepository").getRepositoryOutput = null as any; utilities.lazyLoad(exports, ["getRepository","getRepositoryOutput"], () => require("./getRepository")); +export { GetRepositoryAutolinkReferencesArgs, GetRepositoryAutolinkReferencesResult, GetRepositoryAutolinkReferencesOutputArgs } from "./getRepositoryAutolinkReferences"; +export const getRepositoryAutolinkReferences: typeof import("./getRepositoryAutolinkReferences").getRepositoryAutolinkReferences = null as any; +export const getRepositoryAutolinkReferencesOutput: typeof import("./getRepositoryAutolinkReferences").getRepositoryAutolinkReferencesOutput = null as any; +utilities.lazyLoad(exports, ["getRepositoryAutolinkReferences","getRepositoryAutolinkReferencesOutput"], () => require("./getRepositoryAutolinkReferences")); + export { GetRepositoryBranchesArgs, GetRepositoryBranchesResult, GetRepositoryBranchesOutputArgs } from "./getRepositoryBranches"; export const getRepositoryBranches: typeof import("./getRepositoryBranches").getRepositoryBranches = null as any; export const getRepositoryBranchesOutput: typeof import("./getRepositoryBranches").getRepositoryBranchesOutput = null as any; @@ -293,6 +298,11 @@ export const getRepositoryDeployKeys: typeof import("./getRepositoryDeployKeys") export const getRepositoryDeployKeysOutput: typeof import("./getRepositoryDeployKeys").getRepositoryDeployKeysOutput = null as any; utilities.lazyLoad(exports, ["getRepositoryDeployKeys","getRepositoryDeployKeysOutput"], () => require("./getRepositoryDeployKeys")); +export { GetRepositoryEnvironmentsArgs, GetRepositoryEnvironmentsResult, GetRepositoryEnvironmentsOutputArgs } from "./getRepositoryEnvironments"; +export const getRepositoryEnvironments: typeof import("./getRepositoryEnvironments").getRepositoryEnvironments = null as any; +export const getRepositoryEnvironmentsOutput: typeof import("./getRepositoryEnvironments").getRepositoryEnvironmentsOutput = null as any; +utilities.lazyLoad(exports, ["getRepositoryEnvironments","getRepositoryEnvironmentsOutput"], () => require("./getRepositoryEnvironments")); + export { GetRepositoryFileArgs, GetRepositoryFileResult, GetRepositoryFileOutputArgs } from "./getRepositoryFile"; export const getRepositoryFile: typeof import("./getRepositoryFile").getRepositoryFile = null as any; export const getRepositoryFileOutput: typeof import("./getRepositoryFile").getRepositoryFileOutput = null as any; @@ -323,6 +333,11 @@ export const getRepositoryWebhooks: typeof import("./getRepositoryWebhooks").get export const getRepositoryWebhooksOutput: typeof import("./getRepositoryWebhooks").getRepositoryWebhooksOutput = null as any; utilities.lazyLoad(exports, ["getRepositoryWebhooks","getRepositoryWebhooksOutput"], () => require("./getRepositoryWebhooks")); +export { GetRestApiArgs, GetRestApiResult, GetRestApiOutputArgs } from "./getRestApi"; +export const getRestApi: typeof import("./getRestApi").getRestApi = null as any; +export const getRestApiOutput: typeof import("./getRestApi").getRestApiOutput = null as any; +utilities.lazyLoad(exports, ["getRestApi","getRestApiOutput"], () => require("./getRestApi")); + export { GetSshKeysResult } from "./getSshKeys"; export const getSshKeys: typeof import("./getSshKeys").getSshKeys = null as any; utilities.lazyLoad(exports, ["getSshKeys"], () => require("./getSshKeys")); diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index ad96c372..d2ae8e05 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -73,14 +73,17 @@ "getRelease.ts", "getRepositories.ts", "getRepository.ts", + "getRepositoryAutolinkReferences.ts", "getRepositoryBranches.ts", "getRepositoryDeployKeys.ts", + "getRepositoryEnvironments.ts", "getRepositoryFile.ts", "getRepositoryMilestone.ts", "getRepositoryPullRequest.ts", "getRepositoryPullRequests.ts", "getRepositoryTeams.ts", "getRepositoryWebhooks.ts", + "getRestApi.ts", "getSshKeys.ts", "getTeam.ts", "getTree.ts", diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 37d34018..51d0c74e 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -230,6 +230,10 @@ export interface RepositoryEnvironmentReviewer { } export interface RepositoryPages { + /** + * 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.Input; /** * The custom domain for the repository. This can only be set after the repository has been created. */ @@ -245,7 +249,7 @@ export interface RepositoryPages { /** * The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. */ - source: pulumi.Input; + source?: pulumi.Input; /** * Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. */ diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index 02bcb9d1..5fecdc3c 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -570,6 +570,21 @@ export interface GetReleaseAsset { url: string; } +export interface GetRepositoryAutolinkReferencesAutolinkReference { + /** + * True if alphanumeric. + */ + isAlphanumeric: boolean; + /** + * Key prefix. + */ + keyPrefix: string; + /** + * Target url template. + */ + targetUrlTemplate: string; +} + export interface GetRepositoryBranchesBranch { /** * Name of the branch. @@ -600,6 +615,17 @@ export interface GetRepositoryDeployKeysKey { verified: boolean; } +export interface GetRepositoryEnvironmentsEnvironment { + /** + * Environment name. + */ + name: string; + /** + * Environment node id. + */ + nodeId: string; +} + export interface GetRepositoryPage { cname: string; custom404: boolean; @@ -727,6 +753,11 @@ export interface GetRepositoryWebhooksWebhook { url: string; } +export interface GetTeamRepositoriesDetailed { + repoId: number; + roleName: string; +} + export interface GetTreeEntry { mode: string; path: string; @@ -788,6 +819,10 @@ export interface RepositoryEnvironmentReviewer { } export interface RepositoryPages { + /** + * 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; /** * The custom domain for the repository. This can only be set after the repository has been created. */ @@ -803,7 +838,7 @@ export interface RepositoryPages { /** * The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. */ - source: outputs.RepositoryPagesSource; + source?: outputs.RepositoryPagesSource; /** * Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. */ diff --git a/sdk/python/pulumi_github/__init__.py b/sdk/python/pulumi_github/__init__.py index b93535f0..987a0e20 100644 --- a/sdk/python/pulumi_github/__init__.py +++ b/sdk/python/pulumi_github/__init__.py @@ -63,14 +63,17 @@ from .get_release import * from .get_repositories import * from .get_repository import * +from .get_repository_autolink_references import * from .get_repository_branches import * from .get_repository_deploy_keys import * +from .get_repository_environments import * from .get_repository_file import * from .get_repository_milestone import * from .get_repository_pull_request import * from .get_repository_pull_requests import * from .get_repository_teams import * from .get_repository_webhooks import * +from .get_rest_api import * from .get_ssh_keys import * from .get_team import * from .get_tree import * diff --git a/sdk/python/pulumi_github/_inputs.py b/sdk/python/pulumi_github/_inputs.py index bc809e07..f06fede2 100644 --- a/sdk/python/pulumi_github/_inputs.py +++ b/sdk/python/pulumi_github/_inputs.py @@ -888,42 +888,47 @@ def users(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]): @pulumi.input_type class RepositoryPagesArgs: def __init__(__self__, *, - source: pulumi.Input['RepositoryPagesSourceArgs'], + 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['RepositoryPagesSourceArgs'] source: The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + :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`. """ - pulumi.set(__self__, "source", source) + 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 - def source(self) -> pulumi.Input['RepositoryPagesSourceArgs']: + @pulumi.getter(name="buildType") + def build_type(self) -> Optional[pulumi.Input[str]]: """ - The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + 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, "source") + return pulumi.get(self, "build_type") - @source.setter - def source(self, value: pulumi.Input['RepositoryPagesSourceArgs']): - pulumi.set(self, "source", value) + @build_type.setter + def build_type(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "build_type", value) @property @pulumi.getter @@ -961,6 +966,18 @@ def html_url(self) -> Optional[pulumi.Input[str]]: 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]]: diff --git a/sdk/python/pulumi_github/actions_runner_group.py b/sdk/python/pulumi_github/actions_runner_group.py index 4de85933..bd2b52ae 100644 --- a/sdk/python/pulumi_github/actions_runner_group.py +++ b/sdk/python/pulumi_github/actions_runner_group.py @@ -15,6 +15,7 @@ class ActionsRunnerGroupArgs: def __init__(__self__, *, visibility: pulumi.Input[str], + allows_public_repositories: Optional[pulumi.Input[bool]] = None, name: Optional[pulumi.Input[str]] = None, restricted_to_workflows: Optional[pulumi.Input[bool]] = None, selected_repository_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, @@ -22,12 +23,15 @@ def __init__(__self__, *, """ The set of arguments for constructing a ActionsRunnerGroup resource. :param pulumi.Input[str] visibility: Visibility of a runner group. Whether the runner group can include `all`, `selected`, or `private` repositories. A value of `private` is not currently supported due to limitations in the GitHub API. + :param pulumi.Input[bool] allows_public_repositories: Whether public repositories can be added to the runner group. Defaults to false. :param pulumi.Input[str] name: Name of the runner group :param pulumi.Input[bool] restricted_to_workflows: If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false. :param pulumi.Input[Sequence[pulumi.Input[int]]] selected_repository_ids: IDs of the repositories which should be added to the runner group :param pulumi.Input[Sequence[pulumi.Input[str]]] selected_workflows: List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true. """ pulumi.set(__self__, "visibility", visibility) + if allows_public_repositories is not None: + pulumi.set(__self__, "allows_public_repositories", allows_public_repositories) if name is not None: pulumi.set(__self__, "name", name) if restricted_to_workflows is not None: @@ -49,6 +53,18 @@ def visibility(self) -> pulumi.Input[str]: def visibility(self, value: pulumi.Input[str]): pulumi.set(self, "visibility", value) + @property + @pulumi.getter(name="allowsPublicRepositories") + def allows_public_repositories(self) -> Optional[pulumi.Input[bool]]: + """ + Whether public repositories can be added to the runner group. Defaults to false. + """ + return pulumi.get(self, "allows_public_repositories") + + @allows_public_repositories.setter + def allows_public_repositories(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "allows_public_repositories", value) + @property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: @@ -114,7 +130,7 @@ def __init__(__self__, *, visibility: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering ActionsRunnerGroup resources. - :param pulumi.Input[bool] allows_public_repositories: Whether public repositories can be added to the runner group + :param pulumi.Input[bool] allows_public_repositories: Whether public repositories can be added to the runner group. Defaults to false. :param pulumi.Input[bool] default: Whether this is the default runner group :param pulumi.Input[str] etag: An etag representing the runner group object :param pulumi.Input[bool] inherited: Whether the runner group is inherited from the enterprise level @@ -153,7 +169,7 @@ def __init__(__self__, *, @pulumi.getter(name="allowsPublicRepositories") def allows_public_repositories(self) -> Optional[pulumi.Input[bool]]: """ - Whether public repositories can be added to the runner group + Whether public repositories can be added to the runner group. Defaults to false. """ return pulumi.get(self, "allows_public_repositories") @@ -287,6 +303,7 @@ class ActionsRunnerGroup(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + allows_public_repositories: Optional[pulumi.Input[bool]] = None, name: Optional[pulumi.Input[str]] = None, restricted_to_workflows: Optional[pulumi.Input[bool]] = None, selected_repository_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, @@ -319,6 +336,7 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[bool] allows_public_repositories: Whether public repositories can be added to the runner group. Defaults to false. :param pulumi.Input[str] name: Name of the runner group :param pulumi.Input[bool] restricted_to_workflows: If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false. :param pulumi.Input[Sequence[pulumi.Input[int]]] selected_repository_ids: IDs of the repositories which should be added to the runner group @@ -370,6 +388,7 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + allows_public_repositories: Optional[pulumi.Input[bool]] = None, name: Optional[pulumi.Input[str]] = None, restricted_to_workflows: Optional[pulumi.Input[bool]] = None, selected_repository_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, @@ -384,6 +403,7 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ActionsRunnerGroupArgs.__new__(ActionsRunnerGroupArgs) + __props__.__dict__["allows_public_repositories"] = allows_public_repositories __props__.__dict__["name"] = name __props__.__dict__["restricted_to_workflows"] = restricted_to_workflows __props__.__dict__["selected_repository_ids"] = selected_repository_ids @@ -391,7 +411,6 @@ def _internal_init(__self__, if visibility is None and not opts.urn: raise TypeError("Missing required property 'visibility'") __props__.__dict__["visibility"] = visibility - __props__.__dict__["allows_public_repositories"] = None __props__.__dict__["default"] = None __props__.__dict__["etag"] = None __props__.__dict__["inherited"] = None @@ -425,7 +444,7 @@ def get(resource_name: str, :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[bool] allows_public_repositories: Whether public repositories can be added to the runner group + :param pulumi.Input[bool] allows_public_repositories: Whether public repositories can be added to the runner group. Defaults to false. :param pulumi.Input[bool] default: Whether this is the default runner group :param pulumi.Input[str] etag: An etag representing the runner group object :param pulumi.Input[bool] inherited: Whether the runner group is inherited from the enterprise level @@ -456,9 +475,9 @@ def get(resource_name: str, @property @pulumi.getter(name="allowsPublicRepositories") - def allows_public_repositories(self) -> pulumi.Output[bool]: + def allows_public_repositories(self) -> pulumi.Output[Optional[bool]]: """ - Whether public repositories can be added to the runner group + Whether public repositories can be added to the runner group. Defaults to false. """ return pulumi.get(self, "allows_public_repositories") diff --git a/sdk/python/pulumi_github/get_organization.py b/sdk/python/pulumi_github/get_organization.py index 264a0452..6aadf16c 100644 --- a/sdk/python/pulumi_github/get_organization.py +++ b/sdk/python/pulumi_github/get_organization.py @@ -61,7 +61,7 @@ def __init__(__self__, description=None, id=None, login=None, members=None, name @pulumi.getter def description(self) -> str: """ - The description the organization account + The organization account description """ return pulumi.get(self, "description") @@ -101,7 +101,7 @@ def name(self) -> str: @pulumi.getter(name="nodeId") def node_id(self) -> str: """ - GraphQL global node id for use with v4 API + GraphQL global node ID for use with the v4 API """ return pulumi.get(self, "node_id") @@ -117,7 +117,7 @@ def orgname(self) -> str: @pulumi.getter def plan(self) -> str: """ - The plan name for the organization account + The organization account plan name """ return pulumi.get(self, "plan") @@ -125,7 +125,7 @@ def plan(self) -> str: @pulumi.getter def repositories(self) -> Sequence[str]: """ - (`list`) A list with the repositories on the organization + (`list`) A list of the full names of the repositories in the organization formatted as `owner/name` strings """ return pulumi.get(self, "repositories") diff --git a/sdk/python/pulumi_github/get_repository_autolink_references.py b/sdk/python/pulumi_github/get_repository_autolink_references.py new file mode 100644 index 00000000..68f2bf17 --- /dev/null +++ b/sdk/python/pulumi_github/get_repository_autolink_references.py @@ -0,0 +1,115 @@ +# 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 + +__all__ = [ + 'GetRepositoryAutolinkReferencesResult', + 'AwaitableGetRepositoryAutolinkReferencesResult', + 'get_repository_autolink_references', + 'get_repository_autolink_references_output', +] + +@pulumi.output_type +class GetRepositoryAutolinkReferencesResult: + """ + A collection of values returned by getRepositoryAutolinkReferences. + """ + def __init__(__self__, autolink_references=None, id=None, repository=None): + if autolink_references and not isinstance(autolink_references, list): + raise TypeError("Expected argument 'autolink_references' to be a list") + pulumi.set(__self__, "autolink_references", autolink_references) + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if repository and not isinstance(repository, str): + raise TypeError("Expected argument 'repository' to be a str") + pulumi.set(__self__, "repository", repository) + + @property + @pulumi.getter(name="autolinkReferences") + def autolink_references(self) -> Sequence['outputs.GetRepositoryAutolinkReferencesAutolinkReferenceResult']: + """ + The list of this repository's autolink references. Each element of `autolink_references` has the following attributes: + """ + return pulumi.get(self, "autolink_references") + + @property + @pulumi.getter + def id(self) -> str: + """ + The provider-assigned unique ID for this managed resource. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def repository(self) -> str: + return pulumi.get(self, "repository") + + +class AwaitableGetRepositoryAutolinkReferencesResult(GetRepositoryAutolinkReferencesResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetRepositoryAutolinkReferencesResult( + autolink_references=self.autolink_references, + id=self.id, + repository=self.repository) + + +def get_repository_autolink_references(repository: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRepositoryAutolinkReferencesResult: + """ + Use this data source to retrieve autolink references for a repository. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example = github.get_repository_autolink_references(repository="example-repository") + ``` + + + :param str repository: Name of the repository to retrieve the autolink references from. + """ + __args__ = dict() + __args__['repository'] = repository + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('github:index/getRepositoryAutolinkReferences:getRepositoryAutolinkReferences', __args__, opts=opts, typ=GetRepositoryAutolinkReferencesResult).value + + return AwaitableGetRepositoryAutolinkReferencesResult( + autolink_references=__ret__.autolink_references, + id=__ret__.id, + repository=__ret__.repository) + + +@_utilities.lift_output_func(get_repository_autolink_references) +def get_repository_autolink_references_output(repository: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRepositoryAutolinkReferencesResult]: + """ + Use this data source to retrieve autolink references for a repository. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example = github.get_repository_autolink_references(repository="example-repository") + ``` + + + :param str repository: Name of the repository to retrieve the autolink references from. + """ + ... diff --git a/sdk/python/pulumi_github/get_repository_environments.py b/sdk/python/pulumi_github/get_repository_environments.py new file mode 100644 index 00000000..04bd5ddb --- /dev/null +++ b/sdk/python/pulumi_github/get_repository_environments.py @@ -0,0 +1,115 @@ +# 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 + +__all__ = [ + 'GetRepositoryEnvironmentsResult', + 'AwaitableGetRepositoryEnvironmentsResult', + 'get_repository_environments', + 'get_repository_environments_output', +] + +@pulumi.output_type +class GetRepositoryEnvironmentsResult: + """ + A collection of values returned by getRepositoryEnvironments. + """ + def __init__(__self__, environments=None, id=None, repository=None): + if environments and not isinstance(environments, list): + raise TypeError("Expected argument 'environments' to be a list") + pulumi.set(__self__, "environments", environments) + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if repository and not isinstance(repository, str): + raise TypeError("Expected argument 'repository' to be a str") + pulumi.set(__self__, "repository", repository) + + @property + @pulumi.getter + def environments(self) -> Sequence['outputs.GetRepositoryEnvironmentsEnvironmentResult']: + """ + The list of this repository's environments. Each element of `environments` has the following attributes: + """ + return pulumi.get(self, "environments") + + @property + @pulumi.getter + def id(self) -> str: + """ + The provider-assigned unique ID for this managed resource. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def repository(self) -> str: + return pulumi.get(self, "repository") + + +class AwaitableGetRepositoryEnvironmentsResult(GetRepositoryEnvironmentsResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetRepositoryEnvironmentsResult( + environments=self.environments, + id=self.id, + repository=self.repository) + + +def get_repository_environments(repository: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRepositoryEnvironmentsResult: + """ + Use this data source to retrieve information about environments for a repository. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example = github.get_repository_environments(repository="example-repository") + ``` + + + :param str repository: Name of the repository to retrieve the environments from. + """ + __args__ = dict() + __args__['repository'] = repository + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('github:index/getRepositoryEnvironments:getRepositoryEnvironments', __args__, opts=opts, typ=GetRepositoryEnvironmentsResult).value + + return AwaitableGetRepositoryEnvironmentsResult( + environments=__ret__.environments, + id=__ret__.id, + repository=__ret__.repository) + + +@_utilities.lift_output_func(get_repository_environments) +def get_repository_environments_output(repository: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRepositoryEnvironmentsResult]: + """ + Use this data source to retrieve information about environments for a repository. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example = github.get_repository_environments(repository="example-repository") + ``` + + + :param str repository: Name of the repository to retrieve the environments from. + """ + ... diff --git a/sdk/python/pulumi_github/get_rest_api.py b/sdk/python/pulumi_github/get_rest_api.py new file mode 100644 index 00000000..3b7ed08c --- /dev/null +++ b/sdk/python/pulumi_github/get_rest_api.py @@ -0,0 +1,153 @@ +# 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__ = [ + 'GetRestApiResult', + 'AwaitableGetRestApiResult', + 'get_rest_api', + 'get_rest_api_output', +] + +@pulumi.output_type +class GetRestApiResult: + """ + A collection of values returned by getRestApi. + """ + def __init__(__self__, body=None, code=None, endpoint=None, headers=None, id=None, status=None): + if body and not isinstance(body, dict): + raise TypeError("Expected argument 'body' to be a dict") + pulumi.set(__self__, "body", body) + if code and not isinstance(code, int): + raise TypeError("Expected argument 'code' to be a int") + pulumi.set(__self__, "code", code) + if endpoint and not isinstance(endpoint, str): + raise TypeError("Expected argument 'endpoint' to be a str") + pulumi.set(__self__, "endpoint", endpoint) + if headers and not isinstance(headers, dict): + raise TypeError("Expected argument 'headers' to be a dict") + pulumi.set(__self__, "headers", headers) + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if status and not isinstance(status, str): + raise TypeError("Expected argument 'status' to be a str") + pulumi.set(__self__, "status", status) + + @property + @pulumi.getter + def body(self) -> Mapping[str, Any]: + """ + A map of response body. + """ + return pulumi.get(self, "body") + + @property + @pulumi.getter + def code(self) -> int: + """ + A response status code. + """ + return pulumi.get(self, "code") + + @property + @pulumi.getter + def endpoint(self) -> str: + return pulumi.get(self, "endpoint") + + @property + @pulumi.getter + def headers(self) -> Mapping[str, Any]: + """ + A map of response headers. + """ + return pulumi.get(self, "headers") + + @property + @pulumi.getter + def id(self) -> str: + """ + The provider-assigned unique ID for this managed resource. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def status(self) -> str: + """ + A response status string. + """ + return pulumi.get(self, "status") + + +class AwaitableGetRestApiResult(GetRestApiResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetRestApiResult( + body=self.body, + code=self.code, + endpoint=self.endpoint, + headers=self.headers, + id=self.id, + status=self.status) + + +def get_rest_api(endpoint: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRestApiResult: + """ + Use this data source to retrieve information about a GitHub resource through REST API. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example = github.get_rest_api(endpoint="repos/example_repo/git/refs/heads/main") + ``` + + + :param str endpoint: REST API endpoint to send the GET request to. + """ + __args__ = dict() + __args__['endpoint'] = endpoint + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('github:index/getRestApi:getRestApi', __args__, opts=opts, typ=GetRestApiResult).value + + return AwaitableGetRestApiResult( + body=__ret__.body, + code=__ret__.code, + endpoint=__ret__.endpoint, + headers=__ret__.headers, + id=__ret__.id, + status=__ret__.status) + + +@_utilities.lift_output_func(get_rest_api) +def get_rest_api_output(endpoint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRestApiResult]: + """ + Use this data source to retrieve information about a GitHub resource through REST API. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example = github.get_rest_api(endpoint="repos/example_repo/git/refs/heads/main") + ``` + + + :param str endpoint: REST API endpoint to send the GET request to. + """ + ... diff --git a/sdk/python/pulumi_github/get_team.py b/sdk/python/pulumi_github/get_team.py index 8fc4de4e..06e9217d 100644 --- a/sdk/python/pulumi_github/get_team.py +++ b/sdk/python/pulumi_github/get_team.py @@ -8,6 +8,7 @@ import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities +from . import outputs __all__ = [ 'GetTeamResult', @@ -21,7 +22,7 @@ class GetTeamResult: """ A collection of values returned by getTeam. """ - def __init__(__self__, description=None, id=None, members=None, membership_type=None, name=None, node_id=None, permission=None, privacy=None, repositories=None, results_per_page=None, slug=None, summary_only=None): + def __init__(__self__, description=None, id=None, members=None, membership_type=None, name=None, node_id=None, permission=None, privacy=None, repositories=None, repositories_detaileds=None, results_per_page=None, slug=None, summary_only=None): if description and not isinstance(description, str): raise TypeError("Expected argument 'description' to be a str") pulumi.set(__self__, "description", description) @@ -49,6 +50,9 @@ def __init__(__self__, description=None, id=None, members=None, membership_type= if repositories and not isinstance(repositories, list): raise TypeError("Expected argument 'repositories' to be a list") pulumi.set(__self__, "repositories", repositories) + if repositories_detaileds and not isinstance(repositories_detaileds, list): + raise TypeError("Expected argument 'repositories_detaileds' to be a list") + pulumi.set(__self__, "repositories_detaileds", repositories_detaileds) if results_per_page and not isinstance(results_per_page, int): raise TypeError("Expected argument 'results_per_page' to be a int") pulumi.set(__self__, "results_per_page", results_per_page) @@ -128,6 +132,14 @@ def repositories(self) -> Sequence[str]: """ return pulumi.get(self, "repositories") + @property + @pulumi.getter(name="repositoriesDetaileds") + def repositories_detaileds(self) -> Sequence['outputs.GetTeamRepositoriesDetailedResult']: + """ + List of team repositories (list of `repo_id` and `role_name`). Not returned if `summary_only = true` + """ + return pulumi.get(self, "repositories_detaileds") + @property @pulumi.getter(name="resultsPerPage") def results_per_page(self) -> Optional[int]: @@ -159,6 +171,7 @@ def __await__(self): permission=self.permission, privacy=self.privacy, repositories=self.repositories, + repositories_detaileds=self.repositories_detaileds, results_per_page=self.results_per_page, slug=self.slug, summary_only=self.summary_only) @@ -205,6 +218,7 @@ def get_team(membership_type: Optional[str] = None, permission=__ret__.permission, privacy=__ret__.privacy, repositories=__ret__.repositories, + repositories_detaileds=__ret__.repositories_detaileds, results_per_page=__ret__.results_per_page, slug=__ret__.slug, summary_only=__ret__.summary_only) diff --git a/sdk/python/pulumi_github/outputs.py b/sdk/python/pulumi_github/outputs.py index b62975da..3731928f 100644 --- a/sdk/python/pulumi_github/outputs.py +++ b/sdk/python/pulumi_github/outputs.py @@ -53,14 +53,17 @@ 'GetOrganizationTeamsTeamResult', 'GetOrganizationWebhooksWebhookResult', 'GetReleaseAssetResult', + 'GetRepositoryAutolinkReferencesAutolinkReferenceResult', 'GetRepositoryBranchesBranchResult', 'GetRepositoryDeployKeysKeyResult', + 'GetRepositoryEnvironmentsEnvironmentResult', 'GetRepositoryPageResult', 'GetRepositoryPageSourceResult', 'GetRepositoryPullRequestsResultResult', 'GetRepositoryTeamsTeamResult', 'GetRepositoryTemplateResult', 'GetRepositoryWebhooksWebhookResult', + 'GetTeamRepositoriesDetailedResult', 'GetTreeEntryResult', ] @@ -878,7 +881,9 @@ class RepositoryPages(dict): @staticmethod def __key_warning(key: str): suggest = None - if key == "htmlUrl": + if key == "buildType": + suggest = "build_type" + elif key == "htmlUrl": suggest = "html_url" if suggest: @@ -893,38 +898,43 @@ def get(self, key: str, default = None) -> Any: return super().get(key, default) def __init__(__self__, *, - source: 'outputs.RepositoryPagesSource', + 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 'RepositoryPagesSourceArgs' source: The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + :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`. """ - pulumi.set(__self__, "source", source) + 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 - def source(self) -> 'outputs.RepositoryPagesSource': + @pulumi.getter(name="buildType") + def build_type(self) -> Optional[str]: """ - The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + 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, "source") + return pulumi.get(self, "build_type") @property @pulumi.getter @@ -950,6 +960,14 @@ def html_url(self) -> Optional[str]: """ 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]: @@ -2472,6 +2490,46 @@ def url(self) -> str: return pulumi.get(self, "url") +@pulumi.output_type +class GetRepositoryAutolinkReferencesAutolinkReferenceResult(dict): + def __init__(__self__, *, + is_alphanumeric: bool, + key_prefix: str, + target_url_template: str): + """ + :param bool is_alphanumeric: True if alphanumeric. + :param str key_prefix: Key prefix. + :param str target_url_template: Target url template. + """ + pulumi.set(__self__, "is_alphanumeric", is_alphanumeric) + pulumi.set(__self__, "key_prefix", key_prefix) + pulumi.set(__self__, "target_url_template", target_url_template) + + @property + @pulumi.getter(name="isAlphanumeric") + def is_alphanumeric(self) -> bool: + """ + True if alphanumeric. + """ + return pulumi.get(self, "is_alphanumeric") + + @property + @pulumi.getter(name="keyPrefix") + def key_prefix(self) -> str: + """ + Key prefix. + """ + return pulumi.get(self, "key_prefix") + + @property + @pulumi.getter(name="targetUrlTemplate") + def target_url_template(self) -> str: + """ + Target url template. + """ + return pulumi.get(self, "target_url_template") + + @pulumi.output_type class GetRepositoryBranchesBranchResult(dict): def __init__(__self__, *, @@ -2552,6 +2610,35 @@ def verified(self) -> bool: return pulumi.get(self, "verified") +@pulumi.output_type +class GetRepositoryEnvironmentsEnvironmentResult(dict): + def __init__(__self__, *, + name: str, + node_id: str): + """ + :param str name: Environment name. + :param str node_id: Environment node id. + """ + pulumi.set(__self__, "name", name) + pulumi.set(__self__, "node_id", node_id) + + @property + @pulumi.getter + def name(self) -> str: + """ + Environment name. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="nodeId") + def node_id(self) -> str: + """ + Environment node id. + """ + return pulumi.get(self, "node_id") + + @pulumi.output_type class GetRepositoryPageResult(dict): def __init__(__self__, *, @@ -2928,6 +3015,25 @@ def url(self) -> str: return pulumi.get(self, "url") +@pulumi.output_type +class GetTeamRepositoriesDetailedResult(dict): + def __init__(__self__, *, + repo_id: int, + role_name: str): + pulumi.set(__self__, "repo_id", repo_id) + pulumi.set(__self__, "role_name", role_name) + + @property + @pulumi.getter(name="repoId") + def repo_id(self) -> int: + return pulumi.get(self, "repo_id") + + @property + @pulumi.getter(name="roleName") + def role_name(self) -> str: + return pulumi.get(self, "role_name") + + @pulumi.output_type class GetTreeEntryResult(dict): def __init__(__self__, *,