pr

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindTerraCIComment

func FindTerraCIComment(comments []*gh.IssueComment) *gh.IssueComment

func GetPRNumberFromEvent

func GetPRNumberFromEvent() int

func ParseRepository

func ParseRepository(repository string) (owner, repo string)

Types

type Client

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

func NewClient

func NewClient(token, repository string) *Client

func NewClientFromEnv

func NewClientFromEnv() *Client

func (*Client) CreateIssueComment

func (c *Client) CreateIssueComment(ctx context.Context, prNumber int, body string) (*gh.IssueComment, error)

func (*Client) HasToken

func (c *Client) HasToken() bool

func (*Client) ListIssueComments

func (c *Client) ListIssueComments(ctx context.Context, prNumber int) ([]*gh.IssueComment, error)

func (*Client) UpdateIssueComment

func (c *Client) UpdateIssueComment(ctx context.Context, commentID int64, body string) (*gh.IssueComment, error)

type Context

type Context struct {
	Owner        string
	Repo         string
	PRNumber     int
	SourceBranch string
	TargetBranch string
	RunID        string
	CommitSHA    string
	InPR         bool
}

func DetectContext

func DetectContext() *Context

type Service

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

func NewService

func NewService(cfg *configpkg.PRConfig, client issueCommentClient, ctx *Context) *Service

func NewServiceFromEnv

func NewServiceFromEnv(cfg *configpkg.PRConfig) *Service

func (*Service) IsEnabled

func (s *Service) IsEnabled() bool

func (*Service) UpsertComment

func (s *Service) UpsertComment(ctx context.Context, body string) error

Jump to

Keyboard shortcuts

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