Viewing docs for GitHub v4.17.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Viewing docs for GitHub v4.17.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to retrieve information about a GitHub repository.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = Github.GetRepository.Invoke(new()
{
FullName = "hashicorp/terraform",
});
});
package main
import (
"github.com/pulumi/pulumi-github/sdk/v4/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := github.LookupRepository(ctx, &GetRepositoryArgs{
FullName: pulumi.StringRef("hashicorp/terraform"),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetRepositoryArgs;
import 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.getRepository(GetRepositoryArgs.builder()
.fullName("hashicorp/terraform")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = pulumi.output(github.getRepository({
fullName: "hashicorp/terraform",
}));
import pulumi
import pulumi_github as github
example = github.get_repository(full_name="hashicorp/terraform")
variables:
example:
Fn::Invoke:
Function: github:getRepository
Arguments:
fullName: hashicorp/terraform
Using getRepository
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRepository(args: GetRepositoryArgs, opts?: InvokeOptions): Promise<GetRepositoryResult>
function getRepositoryOutput(args: GetRepositoryOutputArgs, opts?: InvokeOptions): Output<GetRepositoryResult>def get_repository(description: Optional[str] = None,
full_name: Optional[str] = None,
homepage_url: Optional[str] = None,
name: Optional[str] = None,
only_protected_branches: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetRepositoryResult
def get_repository_output(description: Optional[pulumi.Input[str]] = None,
full_name: Optional[pulumi.Input[str]] = None,
homepage_url: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
only_protected_branches: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryResult]func LookupRepository(ctx *Context, args *LookupRepositoryArgs, opts ...InvokeOption) (*LookupRepositoryResult, error)
func LookupRepositoryOutput(ctx *Context, args *LookupRepositoryOutputArgs, opts ...InvokeOption) LookupRepositoryResultOutput> Note: This function is named LookupRepository in the Go SDK.
public static class GetRepository
{
public static Task<GetRepositoryResult> InvokeAsync(GetRepositoryArgs args, InvokeOptions? opts = null)
public static Output<GetRepositoryResult> Invoke(GetRepositoryInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRepositoryResult> getRepository(GetRepositoryArgs args, InvokeOptions options)
public static Output<GetRepositoryResult> getRepository(GetRepositoryArgs args, InvokeOptions options)
fn::invoke:
function: github:index/getRepository:getRepository
arguments:
# arguments dictionaryThe following arguments are supported:
- Description string
- A description of the repository.
- Full
Name string - Full name of the repository (in
org/nameformat). - Homepage
Url string - URL of a page describing the project.
- Name string
- The name of the repository.
- Only
Protected boolBranches - . If true, the
branchesattributes will be populated only with protected branches. Default:false.
- Description string
- A description of the repository.
- Full
Name string - Full name of the repository (in
org/nameformat). - Homepage
Url string - URL of a page describing the project.
- Name string
- The name of the repository.
- Only
Protected boolBranches - . If true, the
branchesattributes will be populated only with protected branches. Default:false.
- description String
- A description of the repository.
- full
Name String - Full name of the repository (in
org/nameformat). - homepage
Url String - URL of a page describing the project.
- name String
- The name of the repository.
- only
Protected BooleanBranches - . If true, the
branchesattributes will be populated only with protected branches. Default:false.
- description string
- A description of the repository.
- full
Name string - Full name of the repository (in
org/nameformat). - homepage
Url string - URL of a page describing the project.
- name string
- The name of the repository.
- only
Protected booleanBranches - . If true, the
branchesattributes will be populated only with protected branches. Default:false.
- description str
- A description of the repository.
- full_
name str - Full name of the repository (in
org/nameformat). - homepage_
url str - URL of a page describing the project.
- name str
- The name of the repository.
- only_
protected_ boolbranches - . If true, the
branchesattributes will be populated only with protected branches. Default:false.
- description String
- A description of the repository.
- full
Name String - Full name of the repository (in
org/nameformat). - homepage
Url String - URL of a page describing the project.
- name String
- The name of the repository.
- only
Protected BooleanBranches - . If true, the
branchesattributes will be populated only with protected branches. Default:false.
getRepository Result
The following output properties are available:
- Allow
Auto boolMerge - Whether the repository allows auto-merging pull requests.
- Allow
Merge boolCommit - Whether the repository allows merge commits.
- Allow
Rebase boolMerge - Whether the repository allows rebase merges.
- Allow
Squash boolMerge - Whether the repository allows squash merges.
- Archived bool
- Whether the repository is archived.
- Branches
List<Get
Repository Branch> - The list of this repository's branches. Each element of
brancheshas the following attributes: - Default
Branch string - The name of the default branch of the repository.
- Full
Name string - Git
Clone stringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - Has
Downloads bool - Whether the repository has Downloads feature enabled.
- Has
Issues bool - Whether the repository has GitHub Issues enabled.
- Has
Projects bool - Whether the repository has the GitHub Projects enabled.
- Has
Wiki bool - Whether the repository has the GitHub Wiki enabled.
- Html
Url string - URL to the repository on the web.
- Http
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - Id string
- The provider-assigned unique ID for this managed resource.
- Merge
Commit stringMessage - The default value for a merge commit message.
- Merge
Commit stringTitle - The default value for a merge commit title.
- Name string
- Name of the branch.
- Node
Id string - GraphQL global node id for use with v4 API
- Pages
List<Get
Repository Page> - The repository's GitHub Pages configuration.
- Private bool
- Whether the repository is private.
- Repo
Id int - GitHub ID for the repository
- Squash
Merge stringCommit Message - The default value for a squash merge commit message.
- Squash
Merge stringCommit Title - The default value for a squash merge commit title.
- Ssh
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - Svn
Url string - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - Topics List<string>
- The list of topics of the repository.
- Visibility string
- Whether the repository is public, private or internal.
- Description string
- A description of the repository.
- Homepage
Url string - URL of a page describing the project.
- Only
Protected boolBranches
- Allow
Auto boolMerge - Whether the repository allows auto-merging pull requests.
- Allow
Merge boolCommit - Whether the repository allows merge commits.
- Allow
Rebase boolMerge - Whether the repository allows rebase merges.
- Allow
Squash boolMerge - Whether the repository allows squash merges.
- Archived bool
- Whether the repository is archived.
- Branches
[]Get
Repository Branch - The list of this repository's branches. Each element of
brancheshas the following attributes: - Default
Branch string - The name of the default branch of the repository.
- Full
Name string - Git
Clone stringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - Has
Downloads bool - Whether the repository has Downloads feature enabled.
- Has
Issues bool - Whether the repository has GitHub Issues enabled.
- Has
Projects bool - Whether the repository has the GitHub Projects enabled.
- Has
Wiki bool - Whether the repository has the GitHub Wiki enabled.
- Html
Url string - URL to the repository on the web.
- Http
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - Id string
- The provider-assigned unique ID for this managed resource.
- Merge
Commit stringMessage - The default value for a merge commit message.
- Merge
Commit stringTitle - The default value for a merge commit title.
- Name string
- Name of the branch.
- Node
Id string - GraphQL global node id for use with v4 API
- Pages
[]Get
Repository Page - The repository's GitHub Pages configuration.
- Private bool
- Whether the repository is private.
- Repo
Id int - GitHub ID for the repository
- Squash
Merge stringCommit Message - The default value for a squash merge commit message.
- Squash
Merge stringCommit Title - The default value for a squash merge commit title.
- Ssh
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - Svn
Url string - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - Topics []string
- The list of topics of the repository.
- Visibility string
- Whether the repository is public, private or internal.
- Description string
- A description of the repository.
- Homepage
Url string - URL of a page describing the project.
- Only
Protected boolBranches
- allow
Auto BooleanMerge - Whether the repository allows auto-merging pull requests.
- allow
Merge BooleanCommit - Whether the repository allows merge commits.
- allow
Rebase BooleanMerge - Whether the repository allows rebase merges.
- allow
Squash BooleanMerge - Whether the repository allows squash merges.
- archived Boolean
- Whether the repository is archived.
- branches
List<Get
Repository Branch> - The list of this repository's branches. Each element of
brancheshas the following attributes: - default
Branch String - The name of the default branch of the repository.
- full
Name String - git
Clone StringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - has
Downloads Boolean - Whether the repository has Downloads feature enabled.
- has
Issues Boolean - Whether the repository has GitHub Issues enabled.
- has
Projects Boolean - Whether the repository has the GitHub Projects enabled.
- has
Wiki Boolean - Whether the repository has the GitHub Wiki enabled.
- html
Url String - URL to the repository on the web.
- http
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - id String
- The provider-assigned unique ID for this managed resource.
- merge
Commit StringMessage - The default value for a merge commit message.
- merge
Commit StringTitle - The default value for a merge commit title.
- name String
- Name of the branch.
- node
Id String - GraphQL global node id for use with v4 API
- pages
List<Get
Repository Page> - The repository's GitHub Pages configuration.
- private_ Boolean
- Whether the repository is private.
- repo
Id Integer - GitHub ID for the repository
- squash
Merge StringCommit Message - The default value for a squash merge commit message.
- squash
Merge StringCommit Title - The default value for a squash merge commit title.
- ssh
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - svn
Url String - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - topics List<String>
- The list of topics of the repository.
- visibility String
- Whether the repository is public, private or internal.
- description String
- A description of the repository.
- homepage
Url String - URL of a page describing the project.
- only
Protected BooleanBranches
- allow
Auto booleanMerge - Whether the repository allows auto-merging pull requests.
- allow
Merge booleanCommit - Whether the repository allows merge commits.
- allow
Rebase booleanMerge - Whether the repository allows rebase merges.
- allow
Squash booleanMerge - Whether the repository allows squash merges.
- archived boolean
- Whether the repository is archived.
- branches
Get
Repository Branch[] - The list of this repository's branches. Each element of
brancheshas the following attributes: - default
Branch string - The name of the default branch of the repository.
- full
Name string - git
Clone stringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - has
Downloads boolean - Whether the repository has Downloads feature enabled.
- has
Issues boolean - Whether the repository has GitHub Issues enabled.
- has
Projects boolean - Whether the repository has the GitHub Projects enabled.
- has
Wiki boolean - Whether the repository has the GitHub Wiki enabled.
- html
Url string - URL to the repository on the web.
- http
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - id string
- The provider-assigned unique ID for this managed resource.
- merge
Commit stringMessage - The default value for a merge commit message.
- merge
Commit stringTitle - The default value for a merge commit title.
- name string
- Name of the branch.
- node
Id string - GraphQL global node id for use with v4 API
- pages
Get
Repository Page[] - The repository's GitHub Pages configuration.
- private boolean
- Whether the repository is private.
- repo
Id number - GitHub ID for the repository
- squash
Merge stringCommit Message - The default value for a squash merge commit message.
- squash
Merge stringCommit Title - The default value for a squash merge commit title.
- ssh
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - svn
Url string - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - topics string[]
- The list of topics of the repository.
- visibility string
- Whether the repository is public, private or internal.
- description string
- A description of the repository.
- homepage
Url string - URL of a page describing the project.
- only
Protected booleanBranches
- allow_
auto_ boolmerge - Whether the repository allows auto-merging pull requests.
- allow_
merge_ boolcommit - Whether the repository allows merge commits.
- allow_
rebase_ boolmerge - Whether the repository allows rebase merges.
- allow_
squash_ boolmerge - Whether the repository allows squash merges.
- archived bool
- Whether the repository is archived.
- branches
Sequence[Get
Repository Branch] - The list of this repository's branches. Each element of
brancheshas the following attributes: - default_
branch str - The name of the default branch of the repository.
- full_
name str - git_
clone_ strurl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - has_
downloads bool - Whether the repository has Downloads feature enabled.
- has_
issues bool - Whether the repository has GitHub Issues enabled.
- has_
projects bool - Whether the repository has the GitHub Projects enabled.
- has_
wiki bool - Whether the repository has the GitHub Wiki enabled.
- html_
url str - URL to the repository on the web.
- http_
clone_ strurl - URL that can be provided to
git cloneto clone the repository via HTTPS. - id str
- The provider-assigned unique ID for this managed resource.
- merge_
commit_ strmessage - The default value for a merge commit message.
- merge_
commit_ strtitle - The default value for a merge commit title.
- name str
- Name of the branch.
- node_
id str - GraphQL global node id for use with v4 API
- pages
Sequence[Get
Repository Page] - The repository's GitHub Pages configuration.
- private bool
- Whether the repository is private.
- repo_
id int - GitHub ID for the repository
- squash_
merge_ strcommit_ message - The default value for a squash merge commit message.
- squash_
merge_ strcommit_ title - The default value for a squash merge commit title.
- ssh_
clone_ strurl - URL that can be provided to
git cloneto clone the repository via SSH. - svn_
url str - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - topics Sequence[str]
- The list of topics of the repository.
- visibility str
- Whether the repository is public, private or internal.
- description str
- A description of the repository.
- homepage_
url str - URL of a page describing the project.
- only_
protected_ boolbranches
- allow
Auto BooleanMerge - Whether the repository allows auto-merging pull requests.
- allow
Merge BooleanCommit - Whether the repository allows merge commits.
- allow
Rebase BooleanMerge - Whether the repository allows rebase merges.
- allow
Squash BooleanMerge - Whether the repository allows squash merges.
- archived Boolean
- Whether the repository is archived.
- branches List<Property Map>
- The list of this repository's branches. Each element of
brancheshas the following attributes: - default
Branch String - The name of the default branch of the repository.
- full
Name String - git
Clone StringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - has
Downloads Boolean - Whether the repository has Downloads feature enabled.
- has
Issues Boolean - Whether the repository has GitHub Issues enabled.
- has
Projects Boolean - Whether the repository has the GitHub Projects enabled.
- has
Wiki Boolean - Whether the repository has the GitHub Wiki enabled.
- html
Url String - URL to the repository on the web.
- http
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - id String
- The provider-assigned unique ID for this managed resource.
- merge
Commit StringMessage - The default value for a merge commit message.
- merge
Commit StringTitle - The default value for a merge commit title.
- name String
- Name of the branch.
- node
Id String - GraphQL global node id for use with v4 API
- pages List<Property Map>
- The repository's GitHub Pages configuration.
- private Boolean
- Whether the repository is private.
- repo
Id Number - GitHub ID for the repository
- squash
Merge StringCommit Message - The default value for a squash merge commit message.
- squash
Merge StringCommit Title - The default value for a squash merge commit title.
- ssh
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - svn
Url String - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - topics List<String>
- The list of topics of the repository.
- visibility String
- Whether the repository is public, private or internal.
- description String
- A description of the repository.
- homepage
Url String - URL of a page describing the project.
- only
Protected BooleanBranches
Supporting Types
GetRepositoryBranch
- name String
- The name of the repository.
- protected_ Boolean
- Whether the branch is protected.
GetRepositoryPage
GetRepositoryPageSource
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.
Viewing docs for GitHub v4.17.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
