simulated

package
v1.43.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 8 Imported by: ? 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

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