commenter

package
v0.0.0-...-05593c5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commenter

type Commenter struct {
	Config
	Dependencies
	Client *github.IssuesService
}

Commenter is a github based commenter.

func NewCommenter

func NewCommenter(cfg Config, deps Dependencies) *Commenter

NewCommenter creates a new Commenter

func (*Commenter) AddComment

func (c *Commenter) AddComment(ctx context.Context, owner string, repo string, number int, comment string) error

AddComment adds a comment to a PR to show progress of the bot.

type Config

type Config struct {
	Auth auth.Config
}

Config has the configuration options for the commenter

type Dependencies

type Dependencies struct {
	Logger    zerolog.Logger
	Converter providers.EnvironmentConverter
}

Dependencies defines the dependencies of this commenter

type PullRequestsService

type PullRequestsService interface {
	CreateComment(ctx context.Context, owner string, repo string, number int, comment *github.IssueComment) (*github.IssueComment, *github.Response, error)
}

PullRequestsService is an interface defining the Wrapper Interface needed to test the github client.

Jump to

Keyboard shortcuts

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