kickoff

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

cmd/factory/kickoff/kickoff.go

Index

Constants

This section is empty.

Variables

View Source
var KickoffCmd = &cobra.Command{
	Use:  "kickoff [--branch <branch-name>]",
	Args: cobra.NoArgs,
	RunE: func(cmd *cobra.Command, args []string) error {
		presenter := ui.NewPresenter(cmd.OutOrStdout(), cmd.ErrOrStderr())
		ctx := cmd.Context()

		gitClient, err := git.NewClient(ctx, ".", git.GitClientConfig{
			Logger:                globals.AppLogger,
			DefaultRemoteName:     globals.LoadedAppConfig.Git.DefaultRemote,
			DefaultMainBranchName: globals.LoadedAppConfig.Git.DefaultMainBranch,
			Executor:              globals.ExecClient.UnderlyingExecutor(),
		})
		if err != nil {
			return err
		}

		validatedBranchName, err := workflow.GetValidatedBranchName(ctx, branchNameFlag, globals.LoadedAppConfig, presenter, gitClient, globals.AssumeYes)
		if err != nil {
			return err
		}

		runner := workflow.NewRunner(presenter, globals.AssumeYes)
		return runner.Run(
			ctx,
			"Daily Development Kickoff",
			&workflow.CheckOnMainBranchStep{GitClient: gitClient, Presenter: presenter},
			&workflow.CheckAndPromptStashStep{GitClient: gitClient, Presenter: presenter, AssumeYes: globals.AssumeYes},
			&workflow.UpdateMainBranchStep{GitClient: gitClient},
			&workflow.CreateAndPushBranchStep{GitClient: gitClient, BranchName: validatedBranchName},
		)
	},
}

KickoffCmd represents the kickoff command

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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