Versions in this module Expand all Collapse all v0 v0.0.2 Jul 27, 2026 Changes in this version + const MaxPatchResultConstructionBytes + const MaxSourceErrorConstructionBytes + var ErrInvalidTarget = errors.New("invalid review target") + var ErrSourceLimited = errors.New("source operation exceeded its limit") + var ErrSourceStale = errors.New("source revision became stale") + func FinishPublicationCheck(acquisition PublicationCheckAcquisition, prepared change.PreparedPublication) (*change.CheckedPublication, error) + func FinishPublicationCheckCancellable(cancelled func() error, acquisition PublicationCheckAcquisition, ...) (*change.CheckedPublication, error) + func PendingPublicationExecutionConstructionBytes(ctx context.Context, checked *change.CheckedPublication) (int64, error) + type CPUAdmission func(context.Context, func() error) error + type Cleanup struct + func (cleanup *Cleanup) Close() error + type FailureError struct + Kind FailureKind + Operation FailureOperation + func (failure *FailureError) Error() string + func (failure *FailureError) Unwrap() error + type FailureKind uint8 + const FailureCancelled + const FailureFailed + const FailureLimited + const FailureStale + const FailureUnavailable + type FailureOperation string + const OperationCheckPublication + const OperationDiscoverRepository + const OperationOpenSource + type FilterPattern string + func NewFilterPattern(value string) (FilterPattern, error) + func (pattern FilterPattern) String() string + type GitConfigPath struct + func NewGitConfigPath(value string) (GitConfigPath, error) + type GitHubAuthor string + func (author GitHubAuthor) String() string + type GitHubOwner string + func (owner GitHubOwner) String() string + type GitHubRepository string + func (repository GitHubRepository) String() string + type GitHubState string + const GitHubClosed + const GitHubMerged + const GitHubOpen + type GitHubToken struct + func NewGitHubToken(value string) (GitHubToken, error) + type GitHubURL string + func (url GitHubURL) String() string + type GitReference string + func NewGitReference(value string) (GitReference, error) + func (ref GitReference) String() string + type IgnoreFile string + func NewIgnoreFile(value string) (IgnoreFile, error) + func (file IgnoreFile) String() string + type LimitError struct + Limit uint64 + Resource LimitResource + func (failure *LimitError) Error() string + func (failure *LimitError) Unwrap() error + type LimitResource string + const LimitAttributeBytes + const LimitAttributeFiles + const LimitAttributeRules + const LimitChangedFiles + const LimitConfigBytes + const LimitConfigEntries + const LimitConfigFiles + const LimitConfigIncludeDepth + const LimitDiffHistogramProbes + const LimitDiffInputBytes + const LimitDiffLineTokens + const LimitDiffProcessedBytes + const LimitDiffScratchBytes + const LimitDiffSignatureMergeWork + const LimitDiffSignaturePairs + const LimitDiffSignatureSpans + const LimitDiffWorkspaceBytes + const LimitEmbeddedRepositories + const LimitFilterAutomaton + const LimitIgnoreBytes + const LimitIgnoreFiles + const LimitIgnoreRules + const LimitIndexEncoding + const LimitIndexExtensions + const LimitIndexPaths + const LimitPackExpandedBytes + const LimitPackWireBytes + const LimitPendingReview + const LimitPolicyCompileWork + const LimitPolicyDFAStates + const LimitPolicyEdges + const LimitPolicyMatchWork + const LimitPolicyNFAStates + const LimitPullRequestDepth + const LimitPullRequestRawRecords + const LimitPullRequestRecords + const LimitPullRequestWorkspace + const LimitRemoteThreads + const LimitRenameCandidates + const LimitWorktreeDepth + const LimitWorktreeDirectories + const LimitWorktreeEntries + const LimitWorktreePaths + const LimitWorktreeSymlink + type LocalDetails struct + Base *RevisionRef + Head *RevisionRef + Kind SourceKind + Repo *RepositoryPath + type OpenOptions struct + BuiltinDefaults bool + Exclude []FilterPattern + FetchPending bool + FetchThreads bool + Gitignore bool + IgnoreFile IgnoreFile + Include []FilterPattern + IncludeUntracked bool + RVWIgnore bool + func (options OpenOptions) RetainedBytes() int64 + type OpenRequest struct + Options OpenOptions + Target Target + type Opened struct + func (opened Opened) Kind() SourceKind + func (opened Opened) Local() (LocalDetails, bool) + func (opened Opened) Options() OpenOptions + func (opened Opened) PublicationTarget() (PublicationTarget, bool) + func (opened Opened) PullRequest() (PullRequestDetails, bool) + func (opened Opened) Snapshot() change.Snapshot + type OwnerRepository struct + func NewOwnerRepository(value string) (OwnerRepository, error) + func (repository OwnerRepository) Owner() GitHubOwner + func (repository OwnerRepository) Repository() GitHubRepository + func (repository OwnerRepository) String() string + type PatchAcquisition struct + func (acquisition *PatchAcquisition) Close() + func (acquisition *PatchAcquisition) Finish(ctx context.Context, runCPU CPUAdmission) (change.PatchResult, error) + func (acquisition *PatchAcquisition) RequiresPreparation() bool + type PendingPublicationExecution struct + func PreparePendingPublicationExecution(ctx context.Context, checked *change.CheckedPublication) (PendingPublicationExecution, error) + func (execution PendingPublicationExecution) Close() + func (execution PendingPublicationExecution) RetainedBytes() int64 + type PendingPublicationReconciliationAcquisition struct + func (acquisition *PendingPublicationReconciliationAcquisition) Close() + func (acquisition *PendingPublicationReconciliationAcquisition) ConstructionBytes() int64 + func (acquisition *PendingPublicationReconciliationAcquisition) Finish(ctx context.Context) change.ReconciliationResult + func (acquisition *PendingPublicationReconciliationAcquisition) TakePendingCapture() (change.PendingReview, bool) + type PendingPublicationStep struct + func (step *PendingPublicationStep) Advance() error + func (step *PendingPublicationStep) Close() + func (step *PendingPublicationStep) ConstructionBytes() int64 + func (step *PendingPublicationStep) Finish(ctx context.Context) PendingPublicationStep + func (step *PendingPublicationStep) Kind() PendingPublicationStepKind + func (step *PendingPublicationStep) TakeCommit() (PublicationCommit, error) + type PendingPublicationStepKind uint8 + const PendingPublicationStepAcquired + const PendingPublicationStepContinue + const PendingPublicationStepTerminal + type PublicationCheckAcquisition struct + func (acquisition PublicationCheckAcquisition) FreshPending() (change.PendingReview, bool) + type PublicationCheckMode uint8 + const PublicationCheckNew + const PublicationCheckPendingContinuation + type PublicationCommit struct + Detail change.OperationDetail + Disposition change.PublicationDisposition + Pending *change.PendingReview + PendingPhase change.PendingPublicationPhase + PendingRefresh change.PendingRefreshAcquisition + RemoteReview uint64 + type PublicationReconciliationAcquisition struct + func (acquisition *PublicationReconciliationAcquisition) Close() error + func (acquisition *PublicationReconciliationAcquisition) Finish(ctx context.Context, runCPU CPUAdmission) change.ReconciliationResult + type PublicationTarget struct + func (target PublicationTarget) RetainedBytes() int64 + func (target PublicationTarget) SourceID() change.SourceID + type PullRequestDetails struct + Author *GitHubAuthor + BaseOID change.ObjectID + BaseRef GitReference + Draft bool + HeadOID change.ObjectID + HeadRef GitReference + Number PullRequestNumber + Repository OwnerRepository + State GitHubState + Title Title + URL GitHubURL + type PullRequestNumber uint64 + func (number PullRequestNumber) Uint64() uint64 + type PullRequestSelector struct + func NewPullRequestSelector(selector string, repository *OwnerRepository) (PullRequestSelector, error) + func (selector PullRequestSelector) Number() PullRequestNumber + func (selector PullRequestSelector) Repository() (OwnerRepository, bool) + type RepositoryPath string + func NewRepositoryPath(value string) (RepositoryPath, error) + func (path RepositoryPath) String() string + type Revision struct + func (resource *Revision) Retire() *Cleanup + type RevisionRef string + func (ref RevisionRef) String() string + type Service struct + func NewService(cwd WorkingDirectory, options ServiceOptions) (*Service, error) + func (service *Service) AcquirePatch(ctx context.Context, opened Opened, revision *Revision, ...) (PatchAcquisition, error) + func (service *Service) AcquirePendingPublication(ctx context.Context, execution PendingPublicationExecution, ...) PendingPublicationStep + func (service *Service) AcquirePendingPublicationReconciliation(ctx context.Context, request change.ReconciliationRequest, runCPU CPUAdmission) (*PendingPublicationReconciliationAcquisition, error) + func (service *Service) AcquirePublicationCheck(ctx context.Context, target PublicationTarget, ...) (PublicationCheckAcquisition, error) + func (service *Service) AcquirePublicationReconciliation(ctx context.Context, request change.ReconciliationRequest) (*PublicationReconciliationAcquisition, error) + func (service *Service) CheckPublication(ctx context.Context, target PublicationTarget, ...) (*change.CheckedPublication, error) + func (service *Service) Close(context.Context) error + func (service *Service) LoadPatch(ctx context.Context, opened Opened, revision *Revision, ...) (change.PatchResult, error) + func (service *Service) LoadSyntax(ctx context.Context, opened Opened, revision *Revision, ...) (change.SyntaxResult, error) + func (service *Service) LoadSyntaxWithCPUAdmission(ctx context.Context, opened Opened, revision *Revision, ...) (change.SyntaxResult, error) + func (service *Service) Open(ctx context.Context, request OpenRequest) (Opened, *Revision, error) + func (service *Service) Publish(ctx context.Context, checked *change.CheckedPublication) PublicationCommit + func (service *Service) ReconcilePublication(ctx context.Context, request change.ReconciliationRequest) change.ReconciliationResult + func (service *Service) Reload(ctx context.Context, opened Opened, revision *Revision, options OpenOptions, ...) (Opened, *Revision, error) + func (service *Service) RepositoryRoot(ctx context.Context) (RepositoryPath, error) + type ServiceOptions struct + GitConfigHome *GitConfigPath + GitHubToken *GitHubToken + GlobalGitConfigs []GitConfigPath + type SourceKind string + const SourceGitHubPR + const SourceLocalRange + const SourceLocalStaged + const SourceLocalWorktree + type SyntaxAcquisition struct + func (acquisition *SyntaxAcquisition) Close() + func (acquisition *SyntaxAcquisition) Finish(ctx context.Context, runCPU CPUAdmission) (*change.PreparedSyntax, error) + type Target struct + func NewPullRequestTarget(selector PullRequestSelector) (Target, error) + func NewRangeTarget(value string) (Target, error) + func StagedTarget() Target + func WorktreeTarget() Target + func (target Target) Kind() TargetKind + func (target Target) PullRequest() (PullRequestSelector, bool) + func (target Target) Range() (base, head RevisionRef, ok bool) + type TargetKind uint8 + const TargetPullRequest + const TargetRange + const TargetStaged + const TargetWorktree + type Title string + func (title Title) String() string + type WorkingDirectory string + func NewWorkingDirectory(value string) (WorkingDirectory, error) + func (directory WorkingDirectory) String() string