SourceCodeRepositoryBranch

Represents a specific branch within a source control repository, such as a feature branch for a work item or a release branch for a pipeline stage. Work Item and Pipeline Stage records refer to this object. This object is available in API version 66.0 and later.

Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

Fields

Field Details
IgnoreRules
Type
textarea
Properties
Create, Nillable, Update
Description
Serialized JSON representation of the preprocessed contents of the .forceignore file on the branch.
LastReferencedDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp when the current user last accessed this record indirectly, for example, through a list view or related record.
LastViewedDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp when the current user last viewed this record or list view. If this value is null, and LastReferenceDate is not null, the user accessed this record or list view indirectly.
Name
Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
The name of the branch as it exists in the source control provider. For example, feature/WI-000001.
ParentRemoteReference
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The unique identifier of the parent branch from which this branch was originally created. In GitHub, this ID is called a SHA. DevOps Center uses this ID to recreate the branch if necessary.
RemoteReference
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The unique identifier representing the latest synced state of this branch in the source control provider. In GitHub, this ID is called the HEAD SHA.
RemoteReferenceDate
Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
The last date and time when the branch identified by Remote Reference field was last updated or synced.
SourceCodeRepositoryId
Type
reference
Properties
Create, Filter, Group, Sort
Description
The ID of the parent SourceCodeRepository record in which the branch lives.
This field is a relationship field.
Relationship Name
SourceCodeRepository
Relationship Type
Master-detail
Refers To
SourceCodeRepository (the master object)
Status
Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Indicates the current health or sync state of the branch.
Possible values are:
  • DEPLOYMENT_ERROR—A deployment to the environment associated with this branch failed.
  • MERGE_CONFLICT—A conflict exists between this branch and its target promotion branch.

Usage

Use this object to track the state of the feature branch every time a developer starts a new work item. Similarly, each stage in a pipeline is mapped to a specific branch defined in this object. It stores remote references (commit SHAs) and tracks sync issues like merge conflicts.

Associated Objects

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.

SourceCodeRepositoryBranchChangeEvent
Change events are available for the object.
SourceCodeRepositoryBranchFeed
Feed tracking is available for the object.
SourceCodeRepositoryBranchHistory
History is available for tracked fields of the object.
SourceCodeRepositoryBranchOwnerSharingRule
Sharing rules are available for the object.
SourceCodeRepositoryBranchShare
Sharing is available for the object.