list

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package list provides the command to list project boards.

Index

Constants

This section is empty.

Variables

View Source
var ListCmd = &cobra.Command{
	Use:     "list",
	Short:   "Lists available project boards.",
	Aliases: []string{"ls"},
	RunE: func(cmd *cobra.Command, _ []string) error {
		presenter := ui.NewPresenter(cmd.OutOrStdout(), cmd.ErrOrStderr())
		ctx := cmd.Context()

		ghClient, err := newGHClient(ctx, globals.AppLogger, globals.LoadedAppConfig)
		if err != nil {
			presenter.Error("Failed to initialize GitHub client: %v", err)

			return err
		}

		presenter.Summary("Fetching project boards...")
		projects, err := ghClient.ListProjects(ctx)
		if err != nil {
			presenter.Error("Failed to fetch project boards: %v", err)
			presenter.Advice("Please ensure your GITHUB_TOKEN has the 'read:project' scope.")

			return fmt.Errorf("failed to list projects: %w", err)
		}

		if len(projects) == 0 {
			presenter.Info("No project boards found for this repository's owner.")

			return nil
		}

		presenter.Header("--- Available Project Boards ---")
		for _, project := range projects {
			presenter.Step("#%d: %s", project.Number, project.Title)
			presenter.Detail(project.URL)
		}

		return nil
	},
}

ListCmd represents the project board list 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