land

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package land lands a motte branch on a ref with a merge grant.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoMergeBase = errors.New("land: the branch has no merge base with the ref")

ErrNoMergeBase means that the first-parent chain of the branch never meets the first-parent chain of the target ref.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL string
	Kid string
	Key ed25519.PrivateKey
}

Config says how ward reaches motte and signs its grants.

type Request

type Request struct {
	Repo         string
	Ref          string
	Branch       string
	DeleteBranch bool
}

Request names the branch to land and where.

type Result

type Result struct {
	api.LandResponse
	BranchDeleted bool
}

Result is the answer of motte, plus whether ward deleted the branch.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service lands branches.

func New

func New(cfg Config, now func() time.Time) *Service

New returns a service. A nil now means time.Now.

func (*Service) Land

func (s *Service) Land(ctx context.Context, req Request) (Result, error)

Land lands the commits of Branch that Ref lacks. The base is the newest commit on the first-parent chain of the tip of Ref that is also on the first-parent chain of the branch.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL