simulated

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	CreatedAt    *time.Time `json:"created_at"`
	LastEditedAt *time.Time `json:"last_edited_at"`
	Author       string     `json:"author"`
	Body         string     `json:"body"`
}

type Context

type Context struct {
	pull.Context
	// contains filtered or unexported fields
}

func NewContext

func NewContext(ctx context.Context, pullContext pull.Context, options Options) *Context

func (*Context) Branches

func (c *Context) Branches() (string, string)

func (*Context) Comments

func (c *Context) Comments() ([]*pull.Comment, error)

func (*Context) Reviews

func (c *Context) Reviews() ([]*pull.Review, error)

type Options

type Options struct {
	IgnoreComments *common.Actors `json:"ignore_comments"`
	IgnoreReviews  *common.Actors `json:"ignore_reviews"`
	AddComments    []Comment      `json:"add_comments"`
	AddReviews     []Review       `json:"add_reviews"`
	BaseBranch     string         `json:"base_branch"`
}

Options should contain optional data that can be used to modify the results of the methods on the simulated Context.

func NewOptionsFromRequest

func NewOptionsFromRequest(r *http.Request) (Options, error)

type Review

type Review struct {
	ID           string     `json:"-"`
	SHA          string     `json:"-"`
	CreatedAt    *time.Time `json:"created_at"`
	LastEditedAt *time.Time `json:"last_edited_at"`
	Author       string     `json:"author"`
	Body         string     `json:"body"`
	State        string     `json:"state"`
	Teams        []string   `json:"-"`
}

Jump to

Keyboard shortcuts

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