cli/pkg/cmdutil/factory.go
Mislav Marohnić 1ec47d8191 Improvements to gh extensions
- Extensions on Windows now enabled through the `sh.exe` interpreter
- `sh.exe` now found on Windows when git was installed via scoop
- `gh extensions list` command shows origin repo for the extension
- `gh extensions upgrade --all` is required to upgrade all extensions
- Added `gh extensions remove`
- Shell completions now include aliases and extension names
- `gh` help output now lists available extension names
- Extensions are stored to XDG_DATA_HOME
2021-06-21 16:54:08 +02:00

31 lines
683 B
Go

package cmdutil
import (
"net/http"
"github.com/cli/cli/context"
"github.com/cli/cli/internal/config"
"github.com/cli/cli/internal/ghrepo"
"github.com/cli/cli/pkg/extensions"
"github.com/cli/cli/pkg/iostreams"
)
type Browser interface {
Browse(string) error
}
type Factory struct {
IOStreams *iostreams.IOStreams
Browser Browser
HttpClient func() (*http.Client, error)
BaseRepo func() (ghrepo.Interface, error)
Remotes func() (context.Remotes, error)
Config func() (config.Config, error)
Branch func() (string, error)
ExtensionManager extensions.ExtensionManager
// Executable is the path to the currently invoked gh binary
Executable string
}