Interface CreateOrgRepoData

Request body for creating a repository in an organization.

interface CreateOrgRepoData {
    allow_merge_commit?: boolean;
    allow_rebase_merge?: boolean;
    allow_squash_merge?: boolean;
    auto_init?: boolean;
    delete_branch_on_merge?: boolean;
    description?: string;
    gitignore_template?: string;
    has_discussions?: boolean;
    has_issues?: boolean;
    has_projects?: boolean;
    has_wiki?: boolean;
    homepage?: string;
    license_template?: string;
    name: string;
    private?: boolean;
    visibility?: "public" | "private" | "internal";
}

Properties

allow_merge_commit?: boolean

Whether to allow merge commits. Defaults to true.

allow_rebase_merge?: boolean

Whether to allow rebase-merging pull requests. Defaults to true.

allow_squash_merge?: boolean

Whether to allow squash-merging pull requests. Defaults to true.

auto_init?: boolean

Whether to initialize the repository with a README. Defaults to false.

delete_branch_on_merge?: boolean

Whether to automatically delete head branches after pull requests are merged. Defaults to false.

description?: string

Repository description

gitignore_template?: string

.gitignore template to apply (e.g., 'Node')

has_discussions?: boolean

Whether to enable discussions. Defaults to false.

has_issues?: boolean

Whether to enable issues. Defaults to true.

has_projects?: boolean

Whether to enable projects. Defaults to true.

has_wiki?: boolean

Whether to enable the wiki. Defaults to true.

homepage?: string

Homepage URL

license_template?: string

License template to apply (e.g., 'mit')

name: string

Repository name (required)

private?: boolean

Whether the repository is private. Defaults to false.

visibility?: "public" | "private" | "internal"

Repository visibility. Overrides private when provided.