Documentation
¶
Index ¶
- func NewCmdRun() *cobra.Command
- type Options
- func (o *Options) GenerateSubject()
- func (o *Options) GetMessageBreakdown(ctx context.Context, messages []models.ReleaseNote) (string, error)
- func (o *Options) GetPullRequestBody(ctx context.Context) (*string, error)
- func (o *Options) HaveMessagesChanged(ctx context.Context, messages []models.ReleaseNote) (bool, string, error)
- func (o *Options) ParseEnvVars(cmd *cobra.Command) (err error)
- func (o *Options) PostErrorToPR(ctx context.Context, err error)
- func (o *Options) Run() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
FeathersUC domain.FeathersUseCase
Feathers *models.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 (*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 ¶
ParseEnvVars uses the flags passed to the command to overwrite the default environment variable keys. Then loads the environment variables.
func (*Options) PostErrorToPR ¶
PostErrorToPR posts an error to the pull request as a comment
Click to show internal directories.
Click to hide internal directories.