kickoff

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package kickoff provides the command to start a new task or project.

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, _ []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 fmt.Errorf("failed to initialize git client: %w", err)
		}

		validatedBranchName, err := workflow.GetValidatedBranchName(
			ctx,
			branchNameFlag,
			globals.LoadedAppConfig,
			presenter,
			gitClient,
			globals.AssumeYes,
		)
		if err != nil {
			return fmt.Errorf("branch validation failed: %w", 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