run

package
v1.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdRun

func NewCmdRun() *cobra.Command

Types

type Options

type Options struct {
	PRNumber     int
	GitServerURL string
	GitHubToken  string
	GitUser      string
	RepoOwner    string
	RepoName     string

	SlackToken string

	WebhookURL    string
	WebhookToken  string
	WebhookSecret string

	DryRun            bool
	CommentValidation bool
	Subject           string

	GitServerClient domain.SCM
	Git             domain.Git
	NotesUC         domain.ReleaseNotesUseCase
	Feathers        *feathers.Feathers
}

Options for the run command

func (*Options) GenerateSubject

func (o *Options) GenerateSubject()

func (*Options) GetMessageBreakdown added in v0.13.0

func (o *Options) GetMessageBreakdown(ctx context.Context, messages []models.ReleaseNote) (string, error)

GetMessageBreakdown creates a breakdown of the messages found in the pr description if the messages have changed since the last run

func (*Options) GetPullRequestBody added in v0.10.3

func (o *Options) GetPullRequestBody(ctx context.Context) (*string, error)

func (*Options) HaveMessagesChanged added in v0.13.0

func (o *Options) HaveMessagesChanged(ctx context.Context, messages []models.ReleaseNote) (bool, string, error)

HaveMessagesChanged checks if the messages have changed since the last time the breakdown was posted to the PR

func (*Options) ParseEnvVars

func (o *Options) ParseEnvVars(cmd *cobra.Command) (err error)

ParseEnvVars uses the flags passed to the command to overwrite the default environment variable keys. Then loads the environment variables.

func (*Options) PostErrorToPR

func (o *Options) PostErrorToPR(ctx context.Context, err error)

PostErrorToPR posts an error to the pull request as a comment

func (*Options) Run

func (o *Options) Run() error

Jump to

Keyboard shortcuts

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