workspacegithub

package
v1.0.0-rc.16 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 18 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

Index

Constants

This section is empty.

Variables

View Source
var ErrStale = errors.New("the repository or pull request has changed; refresh and review the current revision")

Functions

This section is empty.

Types

type Binding

type Binding struct {
	Remote
	ID         int64  `json:"id"`
	Credential string `json:"credential"`
}

type Comment

type Comment struct {
	ID      int64  `json:"id"`
	ReplyTo int64  `json:"replyTo,omitempty"`
	Path    string `json:"path"`
	Line    int    `json:"line,omitempty"`
	Body    string `json:"body"`
	Author  string `json:"author"`
}

type PRFile

type PRFile struct {
	Filename  string `json:"filename"`
	Status    string `json:"status"`
	Patch     string `json:"patch,omitempty"`
	Additions int    `json:"additions"`
	Deletions int    `json:"deletions"`
}

type Page

type Page[T any] struct {
	Items      []T    `json:"items"`
	NextCursor string `json:"nextCursor,omitempty"`
}

type PullRequest

type PullRequest struct {
	Number      int    `json:"number"`
	Title       string `json:"title"`
	Body        string `json:"body,omitempty"`
	AuthorLogin string `json:"authorLogin"`
	Head        string `json:"head"`
	HeadOwner   string `json:"headOwner"`
	Ref         string `json:"ref"`
	Base        string `json:"base"`
	URL         string `json:"url"`
	Draft       bool   `json:"draft"`
}

type Remote

type Remote struct {
	Name string `json:"name"`
	Repo string `json:"repo"`
}

type Service

type Service struct {
	Store       runtimetypes.Store
	Scope       func(string) string
	GrantedRoot func(string) (string, error)
	// contains filtered or unexported fields
}

func New

func New(store runtimetypes.Store, workspaceID string, roots workspaceevents.Service) Service

func (Service) AddRoutes

func (s Service) AddRoutes(mux *http.ServeMux)

func (Service) Binding

func (s Service) Binding(ctx context.Context, cwd string) (*Binding, error)

func (Service) Connect

func (s Service) Connect(ctx context.Context, root string, selected Remote, mode string) (*Binding, error)

func (Service) Read

func (s Service) Read(ctx context.Context, cwd string, id int64, kind string, number int, cursor string) (any, error)

func (Service) State

func (s Service) State(ctx context.Context, root string) (State, error)

type State

type State struct {
	Remotes []Remote `json:"remotes"`
	Branch  string   `json:"branch,omitempty"`
	Binding *Binding `json:"binding"`
}

Jump to

Keyboard shortcuts

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