GitRepository
The GitRepository type represents a Git repository.
API reference
A git repository.
Implements Node
branches- branches that match any of the given glob patterns.
id- A unique identifier for this GitRepository.
tags- tags that match any of the given glob patterns.
url- The URL of the git repository.
asWorkspace- Creates a synthetic workspace from this git repository.
branch- Returns details of a branch.
bundle- Pack the given refs and the objects needed to reconstruct them into a Git bundle.
commit- Returns details of a commit.
head- Returns details for HEAD.
latest- Return the latest stable release tag, falling back to HEAD when no release exists.
ref- Returns details of a ref.
tag- Returns details of a tag.
uncommitted- Returns the changeset of uncommitted changes in the git repository.
withBundle- Import a Git bundle after fetching and verifying all of its prerequisites.
branches(patterns: [String!]): [String!]!
branches that match any of the given glob patterns.
patterns: [String!]Glob patterns (e.g., "refs/tags/v*").
id: ID!
A unique identifier for this GitRepository.
tags(patterns: [String!]): [String!]!
tags that match any of the given glob patterns.
patterns: [String!]Glob patterns (e.g., "refs/tags/v*").
url: String
The URL of the git repository.
asWorkspace(cwd: String = "/"): Workspace!
Creates a synthetic workspace from this git repository.
cwd: String = "/"Current working directory inside the workspace root. Defaults to the workspace root.
branch(name: String!): GitRef!
Returns details of a branch.
name: String!Branch's name (e.g., "main").
bundle(refs: [String!]!, base: GitRef): GitBundle!
Pack the given refs and the objects needed to reconstruct them into a Git bundle.
refs: [String!]!Refs to advertise in the bundle. At least one named ref is required.
base: GitRefA Git ref whose reachable objects are omitted and recorded as a prerequisite.
commit(id: String!): GitCommit!
Returns details of a commit.
id: String!Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
latest(version: String = ""): GitRef!
Return the latest stable release tag, falling back to HEAD when no release exists.
Release selection accepts an optional "v" prefix, incomplete versions, and zero-padded numeric components. This operation is pinned.
version: String = ""Version query used to select the greatest matching release ref.
ref(name: String!): GitRef!
Returns details of a ref.
name: String!Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).
uncommitted: Changeset!
Returns the changeset of uncommitted changes in the git repository.
withBundle(bundle: GitBundle!, prerequisiteRef: String = ""): GitRepository!
Import a Git bundle after fetching and verifying all of its prerequisites.
bundle: GitBundle!The Git bundle to import.
prerequisiteRef: String = ""An optional remote ref hint for fetching a prerequisite when the remote does not allow fetches by object ID.