Versions in this module Expand all Collapse all v0 v0.1.0 May 10, 2026 Changes in this version + var ErrAlreadyClosed = errors.New("pulls: already closed") + var ErrAlreadyMerged = errors.New("pulls: already merged") + var ErrBaseNotFound = errors.New("pulls: base ref not found") + var ErrConcurrentMerge = errors.New("pulls: PR is being merged by another request") + var ErrHeadNotFound = errors.New("pulls: head ref not found") + var ErrMergeBlocked = errors.New("pulls: merge blocked (mergeable_state != clean)") + var ErrMergeMethodOff = errors.New("pulls: requested merge method is disabled on this repo") + var ErrNoCommitsToMerge = errors.New("pulls: head has no commits ahead of base") + var ErrPRNotFound = errors.New("pulls: PR not found") + var ErrSameBranch = errors.New("pulls: base and head must differ") + func AllowedMethod(repo reposdb.Repo, method string) bool + func EditPR(ctx context.Context, deps Deps, prID int64, title, body string) error + func Merge(ctx context.Context, deps Deps, p MergeParams) error + func Mergeability(ctx context.Context, deps Deps, gitDir string, prID int64) error + func SetReady(ctx context.Context, deps Deps, actorUserID, prID int64) error + func SetState(ctx context.Context, deps Deps, gitDir string, actorUserID, prID int64, ...) error + func Synchronize(ctx context.Context, deps Deps, gitDir string, prID int64) error + type CreateParams struct + AuthorUserID int64 + BaseRef string + Body string + Draft bool + GitDir string + HeadRef string + RepoID int64 + Title string + type CreateResult struct + Issue issuesdb.Issue + PullRequest pullsdb.PullRequest + func Create(ctx context.Context, deps Deps, p CreateParams) (CreateResult, error) + type Deps struct + Audit *audit.Recorder + Logger *slog.Logger + Pool *pgxpool.Pool + type MergeParams struct + ActorUserID int64 + Body string + GitDir string + Method string + Now func() time.Time + PRID int64 + Subject string + WorktreesDir string