Compare commits
7 Commits
19c9fa0f76
...
v0.1.0
Author | SHA1 | Date | |
---|---|---|---|
5f9cc58ef7 | |||
c78c41f567 | |||
9dd38317b8 | |||
ea10b3c7dd | |||
4fca4a5e3e | |||
06511f5690 | |||
f862973c44 |
76
.gitea/workflows/ci.yml
Normal file
76
.gitea/workflows/ci.yml
Normal file
@ -0,0 +1,76 @@
|
||||
name: Build and Publish
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
|
||||
env:
|
||||
PACKAGE_NAME: git-project-manager
|
||||
BINARY_PATH: bin
|
||||
BINARY_NAME: git-project-manager
|
||||
GO_MOD_PATH: gitea.libretechconsulting.com/rmcguire/git-project-manager
|
||||
GO_GIT_HOST: gitea.libretechconsulting.com
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go Environment
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Build Binary
|
||||
run: make all
|
||||
|
||||
- name: Upload Binary to Generic Registry
|
||||
env:
|
||||
API_TOKEN: ${{ secrets.API_TOKEN }}
|
||||
run: |
|
||||
echo "Pushing ./$BINARY_PATH/$BINARY_NAME to ${GITHUB_SERVER_URL} packages for ${GITHUB_REPOSITORY_OWNER} as ${PACKAGE_NAME}@${{ github.ref_name }}"
|
||||
if [ -f ./${BINARY_PATH}/${BINARY_NAME} ]; then
|
||||
curl -X PUT \
|
||||
-H "Authorization: token ${API_TOKEN}" \
|
||||
--upload-file ./${BINARY_PATH}/${BINARY_NAME} \
|
||||
"${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/generic/${PACKAGE_NAME}/${{ github.ref_name }}/${BINARY_NAME}"
|
||||
else
|
||||
echo "Error: Binary ./${BINARY_PATH}/${BINARY_NAME} not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Generate and Upload Package to Go Registry
|
||||
env:
|
||||
GOPRIVATE: gitea.libretechconsulting.com/*
|
||||
API_TOKEN: ${{ secrets.API_TOKEN }} # Replace with a Gitea token stored in repository secrets
|
||||
run: |
|
||||
# Set up netrc for Gitea
|
||||
echo "machine ${GO_GIT_HOST} login ${GITHUB_REPOSITORY_OWNER} password ${API_TOKEN}" > ~/.netrc
|
||||
chmod 0600 ~/.netrc
|
||||
|
||||
# Package and get mod info
|
||||
go mod download -x --json ${GO_MOD_PATH}@${{ github.ref_name }} | tee package.json
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Failed to generage go package archive for ${GO_MOD_PATH}@${{ github.ref_name }}"
|
||||
exit 1
|
||||
fi
|
||||
ZIPFILE=$( jq .Zip < package.json | tr -d '"' )
|
||||
|
||||
# Upload to Gitea go registry
|
||||
echo "Uploading go package ${ZIPFILE}"
|
||||
curl -X PUT \
|
||||
-H "Authorization: token ${API_TOKEN}" \
|
||||
--upload-file ${ZIPFILE} \
|
||||
"${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/go/upload"
|
||||
|
||||
- name: Run Go List
|
||||
env:
|
||||
TAG_NAME: ${{ github.ref_name }} # Use the pushed tag name
|
||||
run: |
|
||||
if [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
GOPROXY=proxy.golang.org go list -m gitea.libretechconsulting.com/${GITHUB_REPOSITORY}@$TAG_NAME
|
||||
else
|
||||
echo "Error: Invalid tag format '$TAG_NAME'. Expected 'vX.X.X'."
|
||||
exit 1
|
||||
fi
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
gitlab-project-manager
|
||||
bin/*
|
||||
|
10
.vscode/launch.json
vendored
10
.vscode/launch.json
vendored
@ -13,6 +13,16 @@
|
||||
"--remote",
|
||||
"https://gitea.libretechconsulting.com"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Generate Docs",
|
||||
"type": "delve",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}",
|
||||
"args": [
|
||||
"docs",
|
||||
"md"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
20
Makefile
Normal file
20
Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
CMD_NAME := git-project-manager
|
||||
|
||||
.PHONY: all test build install docs clean
|
||||
|
||||
all: test build install docs
|
||||
|
||||
test:
|
||||
go test -v ./...
|
||||
|
||||
build: test
|
||||
go build -o bin/${CMD_NAME}
|
||||
|
||||
install:
|
||||
go install -v .
|
||||
|
||||
docs:
|
||||
bin/${CMD_NAME} docs md
|
||||
|
||||
clean:
|
||||
rm -rf bin/${CMD_NAME}
|
38
README.md
38
README.md
@ -1,11 +1,17 @@
|
||||
# GitLab Project Manager
|
||||
# Git Project Manager
|
||||
|
||||
## Purpose
|
||||
|
||||
The goal of this utility is to provide a fuzzy-find method of locating, cloning,
|
||||
and using GitLab projects -- along with your preferred aliases, autocompletion,
|
||||
and using Git projects -- along with your preferred aliases, autocompletion,
|
||||
and shortcuts.
|
||||
|
||||
This supports GitHub, GitLab, and Gitea remotes.
|
||||
|
||||
## Documentation
|
||||
|
||||
[Full documentation is available in docs/](./docs/git-project-manager.md)
|
||||
|
||||
## Functionality
|
||||
|
||||
This program will try like hell to help you fuzzily find a project,
|
||||
@ -40,8 +46,8 @@ The basic workflow looks like this:
|
||||
1. Copy `contrib/gpm_func_omz.zsh` into your `~/.oh-my-zsh/custom/` path, or just source from your bashrc/zshrc
|
||||
1. Generate config file: `gpm config gen --write`
|
||||
1. You can run this any time to update settings
|
||||
1. It will only add one GitLab, so update the file for multiple
|
||||
1. Run `gpm cache load` (if aliases is in-place, otherwise `gitlab-project-manager cache load`)
|
||||
1. It will only add one Git remote, so update the file for multiple
|
||||
1. Run `gpm cache load` (if aliases is in-place, otherwise `git-project-manager cache load`)
|
||||
|
||||
### Config Sample
|
||||
```yaml
|
||||
@ -77,34 +83,34 @@ Basic usage to prepare your cache, add a project alias (or aliases), and use a p
|
||||
### Cache Management
|
||||
|
||||
```shell
|
||||
% gitlab-project-manager cache -h
|
||||
% git-project-manager cache -h
|
||||
Contains sub-commands for managing project cache.
|
||||
The project cache keeps this speedy, without smashing against the GitLab
|
||||
The project cache keeps this speedy, without smashing against the Git remote's
|
||||
API every time a new project is added / searched for
|
||||
|
||||
Usage:
|
||||
gitlab-project-manager cache [command]
|
||||
git-project-manager cache [command]
|
||||
|
||||
Aliases:
|
||||
cache, a, ln
|
||||
|
||||
Available Commands:
|
||||
clear Clear GitLab Project Cache
|
||||
dump Dump GitLab project cache
|
||||
load Load GitLab Project Cache
|
||||
unlock unlock GitLab project cache
|
||||
clear Clear Git Project Cache
|
||||
dump Dump Git project cache
|
||||
load Load Git Project Cache
|
||||
unlock unlock Git project cache
|
||||
|
||||
Flags:
|
||||
-h, --help help for cache
|
||||
--ttl duration Duration before cache is re-built in go time.Duration format (default 48h0m0s)
|
||||
|
||||
Global Flags:
|
||||
--config string config file (default is ~/.config/gitlab-project-manager.yaml)
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
|
||||
Use "gitlab-project-manager cache [command] --help" for more information about a command.
|
||||
Use "git-project-manager cache [command] --help" for more information about a command.
|
||||
```
|
||||
|
||||
- To update your cache, run `gpm cache load`. You can also specify one or more remotes
|
||||
@ -115,8 +121,8 @@ Use "gitlab-project-manager cache [command] --help" for more information about a
|
||||
## TODO
|
||||
|
||||
- [x] Don't check remote up unless necessary (project list shouldn't require it)
|
||||
- [ ] Rename to git-project-manager
|
||||
- [ ] Move module from gitlab.sweetwater.com to github.com/rdmcguire
|
||||
- [x] Rename to git-project-manager
|
||||
- [x] Move module to github.com/rdmcguire
|
||||
- [ ] Add flag for clone timeout for large repos
|
||||
- [ ] Add `gpm cache prune` command
|
||||
- [ ] Fix NPE when cache is reset or project for whatever reason leaves an orphaned alias
|
||||
@ -124,7 +130,7 @@ Use "gitlab-project-manager cache [command] --help" for more information about a
|
||||
- [ ] Update README for shell completion, aliases, usage
|
||||
- [ ] Make a Makefile
|
||||
- [ ] Add git repo status to project go (up-to-date, pending commits, etc..)
|
||||
- [ ] Build pipeline, and link to gitlab registry for a release binary
|
||||
- [ ] Build pipeline, and link to registry for a release binary
|
||||
- [ ] Add GitHub remote
|
||||
- [ ] Package for homebrew
|
||||
- [x] Make generic, this is any git remote, not just GitLab
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/cache"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/cache"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
)
|
||||
|
||||
var aliasAddCmd = &cobra.Command{
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
)
|
||||
|
||||
var aliasDeleteCmd = &cobra.Command{
|
||||
|
@ -5,7 +5,8 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/cache"
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/cache"
|
||||
)
|
||||
|
||||
var projectCache *cache.Cache
|
||||
@ -13,7 +14,7 @@ var projectCache *cache.Cache
|
||||
var cacheCmd = &cobra.Command{
|
||||
Use: "cache",
|
||||
Aliases: []string{"a", "ln"},
|
||||
Short: "Manage GitLab project cache",
|
||||
Short: "Manage Git project cache",
|
||||
Long: cacheCmdLong,
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ If --clearAliases is provided, will also reset aliases. Use with caution.`
|
||||
|
||||
var clearCmd = &cobra.Command{
|
||||
Use: "clear",
|
||||
Short: "Clear GitLab Project Cache",
|
||||
Short: "Clear Git Project Cache",
|
||||
PreRun: runCacheCmd,
|
||||
PostRun: postCacheCmd,
|
||||
Long: longDesc,
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
|
||||
var dumpCmd = &cobra.Command{
|
||||
Use: "dump",
|
||||
Short: "Dump GitLab project cache",
|
||||
Short: "Dump Git project cache",
|
||||
Long: `Dumps cache to display`,
|
||||
PreRun: runCacheCmd,
|
||||
PostRun: postCacheCmd,
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
|
||||
var loadCmd = &cobra.Command{
|
||||
Use: "load",
|
||||
Short: "Load GitLab Project Cache",
|
||||
Long: `Used to initialize or update a new GitLab cache. With thousands
|
||||
Short: "Load Git Project Cache",
|
||||
Long: `Used to initialize or update a new Git cache. With thousands
|
||||
of projects, it would be too much work to hit the API every time a user
|
||||
wants to find a new project.`,
|
||||
PreRun: runCacheCmd,
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
|
||||
var unlockCmd = &cobra.Command{
|
||||
Use: "unlock",
|
||||
Short: "unlock GitLab project cache",
|
||||
Short: "unlock Git project cache",
|
||||
Long: `unlocks cache to display`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
initProjectCache(cmd, args)
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
var configCmd = &cobra.Command{
|
||||
Use: "config",
|
||||
Short: "GitLab Project Manager Configuration",
|
||||
Short: "Git Project Manager Configuration",
|
||||
Aliases: []string{"conf"},
|
||||
Long: configCmdLong,
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/config"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/info"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/config"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/info"
|
||||
)
|
||||
|
||||
var configGenerateCmd = &cobra.Command{
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
|
||||
var configShowCmd = &cobra.Command{
|
||||
Use: "show",
|
||||
Short: "Show GitLab Project Manager Configuration",
|
||||
Short: "Show Git Project Manager Configuration",
|
||||
Aliases: []string{"s", "dump", "cat", "ls"},
|
||||
Run: runConfigShowCmd,
|
||||
}
|
||||
|
60
cmd/docs.go
Normal file
60
cmd/docs.go
Normal file
@ -0,0 +1,60 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/cobra/doc"
|
||||
)
|
||||
|
||||
var docsCmd = &cobra.Command{
|
||||
Use: "docs",
|
||||
Aliases: []string{"documentation"},
|
||||
Short: "Generate documentation for git-project-manager",
|
||||
Args: cobra.RangeArgs(1, 1),
|
||||
ValidArgs: []string{"md", "man", "yaml"},
|
||||
Run: runDocsCmd,
|
||||
}
|
||||
|
||||
func runDocsCmd(cmd *cobra.Command, args []string) {
|
||||
outDir, err := cmd.Flags().GetString(FlagDocsPath)
|
||||
if err != nil {
|
||||
plog.Error("missing docs path")
|
||||
}
|
||||
|
||||
prepareDocsDir(cmd, outDir)
|
||||
|
||||
switch args[0] {
|
||||
case "md":
|
||||
err = doc.GenMarkdownTree(cmd.Root(), outDir)
|
||||
case "man":
|
||||
err = doc.GenManTree(cmd.Root(), &doc.GenManHeader{
|
||||
Title: "EIA Client",
|
||||
Section: "1",
|
||||
}, outDir)
|
||||
case "yaml":
|
||||
err = doc.GenYamlTree(cmd.Root(), outDir)
|
||||
default:
|
||||
plog.Error("invalid docs type", plog.Args("type", args[0]))
|
||||
}
|
||||
|
||||
plog.Info("docs generation complete", plog.Args(
|
||||
"type", args[0], "docsDir", outDir, "err", err))
|
||||
}
|
||||
|
||||
func prepareDocsDir(_ *cobra.Command, outDir string) {
|
||||
_, err := os.Stat(outDir)
|
||||
if err != nil {
|
||||
err = os.Mkdir(outDir, 0o755)
|
||||
if err != nil {
|
||||
plog.Error("failed to create docs path", plog.Args(
|
||||
"error", err.Error(), "docsDir", outDir))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
docsCmd.PersistentFlags().StringP(FlagDocsPath, "d", "./docs", "specify output directory for documentation")
|
||||
|
||||
rootCmd.AddCommand(docsCmd)
|
||||
}
|
@ -4,13 +4,13 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/cache"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/cache"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
)
|
||||
|
||||
var projectCmd = &cobra.Command{
|
||||
Use: "project [fuzzy alias search]",
|
||||
Short: "Use a GitLab project",
|
||||
Short: "Use a Git project",
|
||||
Aliases: []string{"proj", "projects", "p"},
|
||||
Args: cobra.MaximumNArgs(1),
|
||||
ArgAliases: []string{"alias"},
|
||||
@ -60,7 +60,7 @@ func init() {
|
||||
rootCmd.AddCommand(projectCmd)
|
||||
}
|
||||
|
||||
func mustHaveProjects(cmd *cobra.Command, args []string) {
|
||||
func mustHaveProjects(cmd *cobra.Command, _ []string) {
|
||||
if len(projectCache.Projects) == 0 {
|
||||
plog.Fatal("No projects to " + cmd.Name() + ", try running cache load")
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
var projectAddCmd = &cobra.Command{
|
||||
Use: "add",
|
||||
Short: "Add a new GitLab project",
|
||||
Short: "Add a new Git project",
|
||||
Aliases: []string{"a", "alias"},
|
||||
Long: projAddCmdLong,
|
||||
Run: projectAddCmdRun,
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
|
||||
var projectGoCmd = &cobra.Command{
|
||||
Use: "go [fuzzy alias search]",
|
||||
Short: "Go to a GitLab project",
|
||||
Short: "Go to a Git project",
|
||||
Aliases: []string{"goto", "cd"},
|
||||
Args: cobra.MaximumNArgs(1),
|
||||
ArgAliases: []string{"project"},
|
||||
@ -45,7 +45,7 @@ func projectGoCmdRun(cmd *cobra.Command, args []string) {
|
||||
fmt.Fprintln(os.Stderr, project.GetGitInfo())
|
||||
|
||||
// This should be read by any source command, for instance
|
||||
// `cd "$(gitlab-project-manager projects cd somealias)"`
|
||||
// `cd "$(git-project-manager projects cd somealias)"`
|
||||
fmt.Println(projectCache.GetProjectPath(project))
|
||||
exec.Command("cd", projectCache.GetProjectPath(project)).Run()
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
|
||||
var projectListCmd = &cobra.Command{
|
||||
Use: "list",
|
||||
Short: "List GitLab Projects",
|
||||
Short: "List Git Projects",
|
||||
Aliases: []string{"ls", "l"},
|
||||
Long: projListCmdLong,
|
||||
Run: projectListCmdRun,
|
||||
|
@ -152,7 +152,7 @@ func getEditor(editor string) (string, error) {
|
||||
path, err := getEditorPath(editor)
|
||||
if path != "" && err == nil {
|
||||
if !isEditorExecutable(path) {
|
||||
err = errors.New("Editor is not executable")
|
||||
err = errors.New("editor is not executable")
|
||||
}
|
||||
}
|
||||
return path, err
|
||||
|
@ -32,7 +32,7 @@ func projectRunCmdRun(cmd *cobra.Command, args []string) {
|
||||
lang := project.GetLanguage()
|
||||
|
||||
if lang == nil {
|
||||
plog.Fatal("GitLab isn't sure what language this project is... can't run.")
|
||||
plog.Fatal("Git remote isn't sure what language this project is... can't run.")
|
||||
}
|
||||
|
||||
plog.Debug(fmt.Sprintf("Project is written in %s, %.2f%% coverage", lang.Name, lang.Percentage))
|
||||
|
@ -8,12 +8,12 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
)
|
||||
|
||||
var projectShowCmd = &cobra.Command{
|
||||
Use: "show [fuzzy alias search]",
|
||||
Short: "Show detail for a GitLab project",
|
||||
Short: "Show detail for a Git project",
|
||||
Aliases: []string{"cat", "s"},
|
||||
Args: cobra.ArbitraryArgs,
|
||||
Long: projShowCmdLong,
|
||||
|
23
cmd/root.go
23
cmd/root.go
@ -4,13 +4,15 @@ import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/config"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/config"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -19,13 +21,15 @@ var (
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "gitlab-project-manager",
|
||||
Use: "git-project-manager",
|
||||
Aliases: []string{"gpm"},
|
||||
Short: "Find and use GitLab projects locally",
|
||||
Short: "Find and use Git projects locally",
|
||||
Long: rootCmdLong,
|
||||
PersistentPreRun: initRootCmd,
|
||||
}
|
||||
|
||||
var configExemptCommands = regexp.MustCompile(`^(doc|conf)`)
|
||||
|
||||
// Hook traversal is enabled, so this will be run for all
|
||||
// sub-commands regardless of their registered pre-hooks
|
||||
func initRootCmd(cmd *cobra.Command, args []string) {
|
||||
@ -40,7 +44,7 @@ func Execute() {
|
||||
|
||||
err := rootCmd.ExecuteContext(ctx)
|
||||
if err != nil {
|
||||
pterm.Error.Printfln(pterm.LightYellow("Command failed, " + err.Error()))
|
||||
pterm.Error.Printfln("%s", pterm.LightYellow("Command failed, "+err.Error()))
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
@ -77,10 +81,11 @@ func initConfig() {
|
||||
home, err := os.UserHomeDir()
|
||||
cobra.CheckErr(err)
|
||||
|
||||
// Search config in home directory with name ".gitlab-project-manager" (without extension).
|
||||
viper.AddConfigPath(home + "/.config")
|
||||
// Search config in home directory with name ".git-project-manager" (without extension).
|
||||
configPath := filepath.Join(home, ".config")
|
||||
viper.AddConfigPath(configPath)
|
||||
viper.SetConfigType("yaml")
|
||||
viper.SetConfigName("gitlab-project-manager")
|
||||
viper.SetConfigName(getConfigName(configPath))
|
||||
}
|
||||
|
||||
viper.AutomaticEnv()
|
||||
@ -100,13 +105,13 @@ func initConfig() {
|
||||
plog.Error("Failed loading config", plog.Args("err", err))
|
||||
}
|
||||
|
||||
if len(os.Args) > 0 && strings.HasPrefix(os.Args[1], "conf") {
|
||||
if len(os.Args) > 0 && configExemptCommands.Match([]byte(os.Args[1])) {
|
||||
plog.Debug("Permitting missing config for config sub-command")
|
||||
return
|
||||
} else if conf.ProjectPath == "" {
|
||||
plog.Fatal("Minimal configuration missing, must have projectPath", plog.Args(
|
||||
"do",
|
||||
"Try running `gitlab-project-manager config default > "+defConfigPath,
|
||||
"Try running `git-project-manager config default > "+defConfigPath,
|
||||
))
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ const (
|
||||
FlagPrompt = "prompt"
|
||||
FlagWrite = "write"
|
||||
FlagSensitive = "sensitive"
|
||||
FlagDocsPath = "docsPath"
|
||||
|
||||
// Viper config bindings
|
||||
ViperAliasAddPID = "alias.add.projectID"
|
||||
@ -24,9 +25,11 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
defGitlabHost = "https://gitlab.com"
|
||||
defLogLevel = "info"
|
||||
defConfigPath = "~/.config/gitlab-project-manager.yaml"
|
||||
defGitlabHost = "https://gitlab.com"
|
||||
defLogLevel = "info"
|
||||
defConfigPath = "~/.config/git-project-manager.yaml"
|
||||
configName = "git-project-manager"
|
||||
legacyConfigName = "gitlab-project-manager"
|
||||
)
|
||||
|
||||
const aliasCmdLong = `Manages project aliases, with options for
|
||||
@ -41,14 +44,14 @@ const aliasDeleteCmdLong = `Deletes aliases from projects
|
||||
project ID can be provided, or will otherwise use fuzzy find`
|
||||
|
||||
const cacheCmdLong = `Contains sub-commands for managing project cache.
|
||||
The project cache keeps this speedy, without smashing against the GitLab
|
||||
The project cache keeps this speedy, without smashing against the Git
|
||||
API every time a new project is added / searched for`
|
||||
|
||||
const rootCmdLong = `Finds GitLab projects using fuzzy-find, remembering
|
||||
const rootCmdLong = `Finds Git projects using fuzzy-find, remembering
|
||||
your chosen term for the project as an alias, and offers helpful
|
||||
shortcuts for moving around in projects and opening your code`
|
||||
|
||||
const projCmdLong = `Switches to a GitLab project by name or alias
|
||||
const projCmdLong = `Switches to a Git project by name or alias
|
||||
If not found, will enter fzf mode. If not cloned, will clone
|
||||
the project locally.`
|
||||
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
fzf "github.com/ktr0731/go-fuzzyfinder"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/cache"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/cache"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
)
|
||||
|
||||
type fzfProjectOpts struct {
|
||||
|
@ -1,28 +1,30 @@
|
||||
// This file contains init methods that may be used by
|
||||
// multiple sub-commands. For instance, the cach and projects
|
||||
// sub-commands both depend on a cache and may both call the initProjectCache
|
||||
// func from their PersistentPreRun commands
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/spf13/cobra"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/cache"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/config"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes"
|
||||
gitearemote "gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/gitea"
|
||||
githubremote "gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/github"
|
||||
gitlabremote "gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/gitlab"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/cache"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/config"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes"
|
||||
gitearemote "gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/gitea"
|
||||
githubremote "gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/github"
|
||||
gitlabremote "gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/gitlab"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/remote"
|
||||
)
|
||||
|
||||
// This file contains init methods that may be used by
|
||||
// multiple sub-commands. For instance, the cach and projects
|
||||
// sub-commands both depend on a cache and may both call the initProjectCache
|
||||
// func from their PersistentPreRun commands
|
||||
|
||||
func initProjectCache(cmd *cobra.Command, args []string) {
|
||||
func initProjectCache(cmd *cobra.Command, _ []string) {
|
||||
var err error
|
||||
plog.Debug("Running pre-run for cacheCmd")
|
||||
conf.Cache.File = conf.ProjectPath + "/.cache.yaml"
|
||||
@ -80,11 +82,11 @@ func getRemotes(cmd *cobra.Command) *remotes.Remotes {
|
||||
return gitRemotes
|
||||
}
|
||||
|
||||
func postProjectCache(cmd *cobra.Command, args []string) {
|
||||
func postProjectCache(_ *cobra.Command, _ []string) {
|
||||
projectCache.Write()
|
||||
}
|
||||
|
||||
func initProjectPath(cmd *cobra.Command, args []string) {
|
||||
func initProjectPath(_ *cobra.Command, _ []string) {
|
||||
plog.Debug("Running persistent pre-run for rootCmd")
|
||||
var err error
|
||||
if conf.ProjectPath == "" {
|
||||
@ -98,7 +100,7 @@ func initProjectPath(cmd *cobra.Command, args []string) {
|
||||
_, err = os.Stat(conf.ProjectPath)
|
||||
if err != nil {
|
||||
plog.Error("Failed to stat project path, trying to create", plog.Args("error", err))
|
||||
if err := os.MkdirAll(conf.ProjectPath, 0750); err != nil {
|
||||
if err = os.MkdirAll(conf.ProjectPath, 0o750); err != nil {
|
||||
plog.Error("Failed to create project path", plog.Args("error", err))
|
||||
os.Exit(1)
|
||||
}
|
||||
@ -120,3 +122,22 @@ func resolvePath(path string) (string, error) {
|
||||
}
|
||||
return filepath.Abs(path)
|
||||
}
|
||||
|
||||
func getConfigName(configPath string) string {
|
||||
// Check existing config
|
||||
for _, ext := range []string{"yml", "yaml"} {
|
||||
configFile := fmt.Sprintf("%s/%s.%s", configPath, configName, ext)
|
||||
legacyConfigFile := fmt.Sprintf("%s/%s.%s", configPath, legacyConfigName, ext)
|
||||
|
||||
if _, err := os.Stat(configFile); err == nil {
|
||||
return configName
|
||||
} else if _, err := os.Stat(legacyConfigFile); err == nil {
|
||||
pterm.DefaultLogger.WithWriter(os.Stderr).
|
||||
Warn(fmt.Sprintf("using legacy config path, suggest using %s/%s.yaml", configPath, configName))
|
||||
return legacyConfigName
|
||||
}
|
||||
}
|
||||
|
||||
// Nothing found, do what we want
|
||||
return configName
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
# Completion
|
||||
source <(gitlab-project-manager completion zsh)
|
||||
source <(git-project-manager completion zsh)
|
||||
|
||||
alias gpm="gitlab-project-manager"
|
||||
alias gpm="git-project-manager"
|
||||
|
||||
# Go to a project, specify a fzf filter or filter
|
||||
# through them all
|
||||
pgo () {
|
||||
project=` gitlab-project-manager project cd $1 `
|
||||
project=` git-project-manager project cd $1 `
|
||||
if [ $? -eq 0 ]; then
|
||||
cd $project
|
||||
fi
|
||||
@ -14,20 +14,20 @@ pgo () {
|
||||
|
||||
# Add a new project to your local projects path
|
||||
padd () {
|
||||
gitlab-project-manager project add
|
||||
git-project-manager project add
|
||||
}
|
||||
|
||||
plist () {
|
||||
gitlab-project-manager alias list
|
||||
git-project-manager alias list
|
||||
}
|
||||
|
||||
pshow () {
|
||||
gitlab-project-manager project show --current
|
||||
git-project-manager project show --current
|
||||
}
|
||||
|
||||
popen () {
|
||||
gitlab-project-manager project open $1
|
||||
git-project-manager project open $1
|
||||
reset 2>&1 > /dev/null
|
||||
}
|
||||
|
||||
alias prun="gitlab-project-manager project run"
|
||||
alias prun="git-project-manager project run"
|
||||
|
30
docs/git-project-manager.md
Normal file
30
docs/git-project-manager.md
Normal file
@ -0,0 +1,30 @@
|
||||
## git-project-manager
|
||||
|
||||
Find and use Git projects locally
|
||||
|
||||
### Synopsis
|
||||
|
||||
Finds Git projects using fuzzy-find, remembering
|
||||
your chosen term for the project as an alias, and offers helpful
|
||||
shortcuts for moving around in projects and opening your code
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
-h, --help help for git-project-manager
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager alias](git-project-manager_alias.md) - Manage project aliases
|
||||
* [git-project-manager cache](git-project-manager_cache.md) - Manage Git project cache
|
||||
* [git-project-manager completion](git-project-manager_completion.md) - Generate the autocompletion script for the specified shell
|
||||
* [git-project-manager config](git-project-manager_config.md) - Git Project Manager Configuration
|
||||
* [git-project-manager docs](git-project-manager_docs.md) - Generate documentation for git-project-manager
|
||||
* [git-project-manager project](git-project-manager_project.md) - Use a Git project
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
32
docs/git-project-manager_alias.md
Normal file
32
docs/git-project-manager_alias.md
Normal file
@ -0,0 +1,32 @@
|
||||
## git-project-manager alias
|
||||
|
||||
Manage project aliases
|
||||
|
||||
### Synopsis
|
||||
|
||||
Manages project aliases, with options for
|
||||
listing, adding, and deleting.
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for alias
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager](git-project-manager.md) - Find and use Git projects locally
|
||||
* [git-project-manager alias add](git-project-manager_alias_add.md) - Add a project alias
|
||||
* [git-project-manager alias delete](git-project-manager_alias_delete.md) - Delete a project alias
|
||||
* [git-project-manager alias list](git-project-manager_alias_list.md) - List Aliases
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
34
docs/git-project-manager_alias_add.md
Normal file
34
docs/git-project-manager_alias_add.md
Normal file
@ -0,0 +1,34 @@
|
||||
## git-project-manager alias add
|
||||
|
||||
Add a project alias
|
||||
|
||||
### Synopsis
|
||||
|
||||
Adds a project alias to a project
|
||||
project ID can be provided, or will otherwise use fuzzy find
|
||||
|
||||
```
|
||||
git-project-manager alias add [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for add
|
||||
--projectID int Specify a project by ID
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager alias](git-project-manager_alias.md) - Manage project aliases
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
34
docs/git-project-manager_alias_delete.md
Normal file
34
docs/git-project-manager_alias_delete.md
Normal file
@ -0,0 +1,34 @@
|
||||
## git-project-manager alias delete
|
||||
|
||||
Delete a project alias
|
||||
|
||||
### Synopsis
|
||||
|
||||
Deletes aliases from projects
|
||||
project ID can be provided, or will otherwise use fuzzy find
|
||||
|
||||
```
|
||||
git-project-manager alias delete [fuzzy project or alias] [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for delete
|
||||
--projectID int Specify a project by ID
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager alias](git-project-manager_alias.md) - Manage project aliases
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
32
docs/git-project-manager_alias_list.md
Normal file
32
docs/git-project-manager_alias_list.md
Normal file
@ -0,0 +1,32 @@
|
||||
## git-project-manager alias list
|
||||
|
||||
List Aliases
|
||||
|
||||
### Synopsis
|
||||
|
||||
Lists all aliases by project
|
||||
|
||||
```
|
||||
git-project-manager alias list [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for list
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager alias](git-project-manager_alias.md) - Manage project aliases
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
35
docs/git-project-manager_cache.md
Normal file
35
docs/git-project-manager_cache.md
Normal file
@ -0,0 +1,35 @@
|
||||
## git-project-manager cache
|
||||
|
||||
Manage Git project cache
|
||||
|
||||
### Synopsis
|
||||
|
||||
Contains sub-commands for managing project cache.
|
||||
The project cache keeps this speedy, without smashing against the Git
|
||||
API every time a new project is added / searched for
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for cache
|
||||
--ttl duration Duration before cache is re-built in go time.Duration format (default 48h0m0s)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager](git-project-manager.md) - Find and use Git projects locally
|
||||
* [git-project-manager cache clear](git-project-manager_cache_clear.md) - Clear Git Project Cache
|
||||
* [git-project-manager cache dump](git-project-manager_cache_dump.md) - Dump Git project cache
|
||||
* [git-project-manager cache load](git-project-manager_cache_load.md) - Load Git Project Cache
|
||||
* [git-project-manager cache unlock](git-project-manager_cache_unlock.md) - unlock Git project cache
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
36
docs/git-project-manager_cache_clear.md
Normal file
36
docs/git-project-manager_cache_clear.md
Normal file
@ -0,0 +1,36 @@
|
||||
## git-project-manager cache clear
|
||||
|
||||
Clear Git Project Cache
|
||||
|
||||
### Synopsis
|
||||
|
||||
Used to reset a project cache, forcing it to be rebuilt.
|
||||
|
||||
If --clearAliases is provided, will also reset aliases. Use with caution.
|
||||
|
||||
```
|
||||
git-project-manager cache clear [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--clearAliases Will also clear aliases from the cache, use with caution
|
||||
-h, --help help for clear
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
--ttl duration Duration before cache is re-built in go time.Duration format (default 48h0m0s)
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager cache](git-project-manager_cache.md) - Manage Git project cache
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
34
docs/git-project-manager_cache_dump.md
Normal file
34
docs/git-project-manager_cache_dump.md
Normal file
@ -0,0 +1,34 @@
|
||||
## git-project-manager cache dump
|
||||
|
||||
Dump Git project cache
|
||||
|
||||
### Synopsis
|
||||
|
||||
Dumps cache to display
|
||||
|
||||
```
|
||||
git-project-manager cache dump [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-f, --full Dumps entire cache
|
||||
-h, --help help for dump
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
--ttl duration Duration before cache is re-built in go time.Duration format (default 48h0m0s)
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager cache](git-project-manager_cache.md) - Manage Git project cache
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
36
docs/git-project-manager_cache_load.md
Normal file
36
docs/git-project-manager_cache_load.md
Normal file
@ -0,0 +1,36 @@
|
||||
## git-project-manager cache load
|
||||
|
||||
Load Git Project Cache
|
||||
|
||||
### Synopsis
|
||||
|
||||
Used to initialize or update a new Git cache. With thousands
|
||||
of projects, it would be too much work to hit the API every time a user
|
||||
wants to find a new project.
|
||||
|
||||
```
|
||||
git-project-manager cache load [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for load
|
||||
--ownerOnly Only load projects that you are owner of (default true)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
--ttl duration Duration before cache is re-built in go time.Duration format (default 48h0m0s)
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager cache](git-project-manager_cache.md) - Manage Git project cache
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
34
docs/git-project-manager_cache_unlock.md
Normal file
34
docs/git-project-manager_cache_unlock.md
Normal file
@ -0,0 +1,34 @@
|
||||
## git-project-manager cache unlock
|
||||
|
||||
unlock Git project cache
|
||||
|
||||
### Synopsis
|
||||
|
||||
unlocks cache to display
|
||||
|
||||
```
|
||||
git-project-manager cache unlock [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-f, --force force unlocks cache (don't ask)
|
||||
-h, --help help for unlock
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
--ttl duration Duration before cache is re-built in go time.Duration format (default 48h0m0s)
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager cache](git-project-manager_cache.md) - Manage Git project cache
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
34
docs/git-project-manager_completion.md
Normal file
34
docs/git-project-manager_completion.md
Normal file
@ -0,0 +1,34 @@
|
||||
## git-project-manager completion
|
||||
|
||||
Generate the autocompletion script for the specified shell
|
||||
|
||||
### Synopsis
|
||||
|
||||
Generate the autocompletion script for git-project-manager for the specified shell.
|
||||
See each sub-command's help for details on how to use the generated script.
|
||||
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for completion
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager](git-project-manager.md) - Find and use Git projects locally
|
||||
* [git-project-manager completion bash](git-project-manager_completion_bash.md) - Generate the autocompletion script for bash
|
||||
* [git-project-manager completion fish](git-project-manager_completion_fish.md) - Generate the autocompletion script for fish
|
||||
* [git-project-manager completion powershell](git-project-manager_completion_powershell.md) - Generate the autocompletion script for powershell
|
||||
* [git-project-manager completion zsh](git-project-manager_completion_zsh.md) - Generate the autocompletion script for zsh
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
53
docs/git-project-manager_completion_bash.md
Normal file
53
docs/git-project-manager_completion_bash.md
Normal file
@ -0,0 +1,53 @@
|
||||
## git-project-manager completion bash
|
||||
|
||||
Generate the autocompletion script for bash
|
||||
|
||||
### Synopsis
|
||||
|
||||
Generate the autocompletion script for the bash shell.
|
||||
|
||||
This script depends on the 'bash-completion' package.
|
||||
If it is not installed already, you can install it via your OS's package manager.
|
||||
|
||||
To load completions in your current shell session:
|
||||
|
||||
source <(git-project-manager completion bash)
|
||||
|
||||
To load completions for every new session, execute once:
|
||||
|
||||
#### Linux:
|
||||
|
||||
git-project-manager completion bash > /etc/bash_completion.d/git-project-manager
|
||||
|
||||
#### macOS:
|
||||
|
||||
git-project-manager completion bash > $(brew --prefix)/etc/bash_completion.d/git-project-manager
|
||||
|
||||
You will need to start a new shell for this setup to take effect.
|
||||
|
||||
|
||||
```
|
||||
git-project-manager completion bash
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for bash
|
||||
--no-descriptions disable completion descriptions
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager completion](git-project-manager_completion.md) - Generate the autocompletion script for the specified shell
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
44
docs/git-project-manager_completion_fish.md
Normal file
44
docs/git-project-manager_completion_fish.md
Normal file
@ -0,0 +1,44 @@
|
||||
## git-project-manager completion fish
|
||||
|
||||
Generate the autocompletion script for fish
|
||||
|
||||
### Synopsis
|
||||
|
||||
Generate the autocompletion script for the fish shell.
|
||||
|
||||
To load completions in your current shell session:
|
||||
|
||||
git-project-manager completion fish | source
|
||||
|
||||
To load completions for every new session, execute once:
|
||||
|
||||
git-project-manager completion fish > ~/.config/fish/completions/git-project-manager.fish
|
||||
|
||||
You will need to start a new shell for this setup to take effect.
|
||||
|
||||
|
||||
```
|
||||
git-project-manager completion fish [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for fish
|
||||
--no-descriptions disable completion descriptions
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager completion](git-project-manager_completion.md) - Generate the autocompletion script for the specified shell
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
41
docs/git-project-manager_completion_powershell.md
Normal file
41
docs/git-project-manager_completion_powershell.md
Normal file
@ -0,0 +1,41 @@
|
||||
## git-project-manager completion powershell
|
||||
|
||||
Generate the autocompletion script for powershell
|
||||
|
||||
### Synopsis
|
||||
|
||||
Generate the autocompletion script for powershell.
|
||||
|
||||
To load completions in your current shell session:
|
||||
|
||||
git-project-manager completion powershell | Out-String | Invoke-Expression
|
||||
|
||||
To load completions for every new session, add the output of the above command
|
||||
to your powershell profile.
|
||||
|
||||
|
||||
```
|
||||
git-project-manager completion powershell [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for powershell
|
||||
--no-descriptions disable completion descriptions
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager completion](git-project-manager_completion.md) - Generate the autocompletion script for the specified shell
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
55
docs/git-project-manager_completion_zsh.md
Normal file
55
docs/git-project-manager_completion_zsh.md
Normal file
@ -0,0 +1,55 @@
|
||||
## git-project-manager completion zsh
|
||||
|
||||
Generate the autocompletion script for zsh
|
||||
|
||||
### Synopsis
|
||||
|
||||
Generate the autocompletion script for the zsh shell.
|
||||
|
||||
If shell completion is not already enabled in your environment you will need
|
||||
to enable it. You can execute the following once:
|
||||
|
||||
echo "autoload -U compinit; compinit" >> ~/.zshrc
|
||||
|
||||
To load completions in your current shell session:
|
||||
|
||||
source <(git-project-manager completion zsh)
|
||||
|
||||
To load completions for every new session, execute once:
|
||||
|
||||
#### Linux:
|
||||
|
||||
git-project-manager completion zsh > "${fpath[1]}/_git-project-manager"
|
||||
|
||||
#### macOS:
|
||||
|
||||
git-project-manager completion zsh > $(brew --prefix)/share/zsh/site-functions/_git-project-manager
|
||||
|
||||
You will need to start a new shell for this setup to take effect.
|
||||
|
||||
|
||||
```
|
||||
git-project-manager completion zsh [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for zsh
|
||||
--no-descriptions disable completion descriptions
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager completion](git-project-manager_completion.md) - Generate the autocompletion script for the specified shell
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
31
docs/git-project-manager_config.md
Normal file
31
docs/git-project-manager_config.md
Normal file
@ -0,0 +1,31 @@
|
||||
## git-project-manager config
|
||||
|
||||
Git Project Manager Configuration
|
||||
|
||||
### Synopsis
|
||||
|
||||
Commands for managing configuration, particulary
|
||||
useful for seeding a new config file
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for config
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager](git-project-manager.md) - Find and use Git projects locally
|
||||
* [git-project-manager config generate](git-project-manager_config_generate.md) - Generate a default configuration
|
||||
* [git-project-manager config show](git-project-manager_config_show.md) - Show Git Project Manager Configuration
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
35
docs/git-project-manager_config_generate.md
Normal file
35
docs/git-project-manager_config_generate.md
Normal file
@ -0,0 +1,35 @@
|
||||
## git-project-manager config generate
|
||||
|
||||
Generate a default configuration
|
||||
|
||||
### Synopsis
|
||||
|
||||
Produces yaml to stdout that can be used
|
||||
to seed the configuration file
|
||||
|
||||
```
|
||||
git-project-manager config generate [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for generate
|
||||
--prompt Prompt for settings
|
||||
--write Write config to file
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager config](git-project-manager_config.md) - Git Project Manager Configuration
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
29
docs/git-project-manager_config_show.md
Normal file
29
docs/git-project-manager_config_show.md
Normal file
@ -0,0 +1,29 @@
|
||||
## git-project-manager config show
|
||||
|
||||
Show Git Project Manager Configuration
|
||||
|
||||
```
|
||||
git-project-manager config show [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for show
|
||||
-s, --sensitive Set to show sensitive fields
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager config](git-project-manager_config.md) - Git Project Manager Configuration
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
29
docs/git-project-manager_docs.md
Normal file
29
docs/git-project-manager_docs.md
Normal file
@ -0,0 +1,29 @@
|
||||
## git-project-manager docs
|
||||
|
||||
Generate documentation for git-project-manager
|
||||
|
||||
```
|
||||
git-project-manager docs [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-d, --docsPath string specify output directory for documentation (default "./docs")
|
||||
-h, --help help for docs
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager](git-project-manager.md) - Find and use Git projects locally
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
36
docs/git-project-manager_project.md
Normal file
36
docs/git-project-manager_project.md
Normal file
@ -0,0 +1,36 @@
|
||||
## git-project-manager project
|
||||
|
||||
Use a Git project
|
||||
|
||||
### Synopsis
|
||||
|
||||
Switches to a Git project by name or alias
|
||||
If not found, will enter fzf mode. If not cloned, will clone
|
||||
the project locally.
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for project
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager](git-project-manager.md) - Find and use Git projects locally
|
||||
* [git-project-manager project add](git-project-manager_project_add.md) - Add a new Git project
|
||||
* [git-project-manager project go](git-project-manager_project_go.md) - Go to a Git project
|
||||
* [git-project-manager project list](git-project-manager_project_list.md) - List Git Projects
|
||||
* [git-project-manager project open](git-project-manager_project_open.md) - Open project in your IDE
|
||||
* [git-project-manager project run](git-project-manager_project_run.md) - Run the project (e.g. go run .)
|
||||
* [git-project-manager project show](git-project-manager_project_show.md) - Show detail for a Git project
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
33
docs/git-project-manager_project_add.md
Normal file
33
docs/git-project-manager_project_add.md
Normal file
@ -0,0 +1,33 @@
|
||||
## git-project-manager project add
|
||||
|
||||
Add a new Git project
|
||||
|
||||
### Synopsis
|
||||
|
||||
Adds a new project to the local project path
|
||||
uses fuzzy find to locate the project
|
||||
|
||||
```
|
||||
git-project-manager project add [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for add
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager project](git-project-manager_project.md) - Use a Git project
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
36
docs/git-project-manager_project_go.md
Normal file
36
docs/git-project-manager_project_go.md
Normal file
@ -0,0 +1,36 @@
|
||||
## git-project-manager project go
|
||||
|
||||
Go to a Git project
|
||||
|
||||
### Synopsis
|
||||
|
||||
Go to a project, searching by alias
|
||||
If project is not already cloned, its path will be built and it
|
||||
will be cloned from source control.
|
||||
|
||||
If conf.projects.alwaysPull, a git pull will be ran automatically
|
||||
|
||||
```
|
||||
git-project-manager project go [fuzzy alias search] [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for go
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager project](git-project-manager_project.md) - Use a Git project
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
34
docs/git-project-manager_project_list.md
Normal file
34
docs/git-project-manager_project_list.md
Normal file
@ -0,0 +1,34 @@
|
||||
## git-project-manager project list
|
||||
|
||||
List Git Projects
|
||||
|
||||
### Synopsis
|
||||
|
||||
List locally cloned projects. Optionally
|
||||
lists all projects in project cache
|
||||
|
||||
```
|
||||
git-project-manager project list [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--all List all, not just cloned locally
|
||||
-h, --help help for list
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager project](git-project-manager_project.md) - Use a Git project
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
39
docs/git-project-manager_project_open.md
Normal file
39
docs/git-project-manager_project_open.md
Normal file
@ -0,0 +1,39 @@
|
||||
## git-project-manager project open
|
||||
|
||||
Open project in your IDE
|
||||
|
||||
### Synopsis
|
||||
|
||||
Opens the given project directory in the editor
|
||||
of your choice. Will find certain well-known entrypoints (e.g. main.go).
|
||||
|
||||
If your editor is set in your config file, it will be used, otherwise
|
||||
one will be found in your path from a list of known defaults.
|
||||
|
||||
```
|
||||
git-project-manager project open [fuzzy alias search] [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--binary string Path to editor binary
|
||||
--displayName string Set display name of editor (meant for config file)
|
||||
-h, --help help for open
|
||||
--openFlags string Optional flags when opening project (e.g. --reuse-window)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager project](git-project-manager_project.md) - Use a Git project
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
33
docs/git-project-manager_project_run.md
Normal file
33
docs/git-project-manager_project_run.md
Normal file
@ -0,0 +1,33 @@
|
||||
## git-project-manager project run
|
||||
|
||||
Run the project (e.g. go run .)
|
||||
|
||||
### Synopsis
|
||||
|
||||
Runs the current project. Tries to detect
|
||||
the language and runs accordingly (e.g. go run .)
|
||||
|
||||
```
|
||||
git-project-manager project run [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for run
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager project](git-project-manager_project.md) - Use a Git project
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
34
docs/git-project-manager_project_show.md
Normal file
34
docs/git-project-manager_project_show.md
Normal file
@ -0,0 +1,34 @@
|
||||
## git-project-manager project show
|
||||
|
||||
Show detail for a Git project
|
||||
|
||||
### Synopsis
|
||||
|
||||
Shows detail for a particular project
|
||||
Will always fuzzy find
|
||||
|
||||
```
|
||||
git-project-manager project show [fuzzy alias search] [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--current Use project in CWD rather than fuzzy find
|
||||
-h, --help help for show
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--config string config file (default is ~/.config/git-project-manager.yaml)
|
||||
--logLevel string Default log level -- info, warn, error, debug (default "info")
|
||||
--projectPath string Sets a path for local clones of projects
|
||||
--remote strings Specify remotes by host for any sub-command. Provide multiple times or comma delimited.
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [git-project-manager project](git-project-manager_project.md) - Use a Git project
|
||||
|
||||
###### Auto generated by spf13/cobra on 27-Dec-2024
|
7
go.mod
7
go.mod
@ -1,4 +1,4 @@
|
||||
module gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager
|
||||
module gitea.libretechconsulting.com/rmcguire/git-project-manager
|
||||
|
||||
go 1.23.4
|
||||
|
||||
@ -16,6 +16,11 @@ require (
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
atomicgo.dev/cursor v0.2.0 // indirect
|
||||
atomicgo.dev/keyboard v0.2.9 // indirect
|
||||
|
139
go.sum
139
go.sum
@ -6,12 +6,8 @@ atomicgo.dev/keyboard v0.2.9 h1:tOsIid3nlPLZ3lwgG8KZMp/SFmr7P0ssEN5JUsm78K8=
|
||||
atomicgo.dev/keyboard v0.2.9/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ=
|
||||
atomicgo.dev/schedule v0.1.0 h1:nTthAbhZS5YZmgYbb2+DH8uQIZcTlIrd4eYr3UQxEjs=
|
||||
atomicgo.dev/schedule v0.1.0/go.mod h1:xeUa3oAkiuHYh8bKiQBRojqAMq3PXXbJujjb0hw8pEU=
|
||||
code.gitea.io/sdk/gitea v0.18.0 h1:+zZrwVmujIrgobt6wVBWCqITz6bn1aBjnCUHmpZrerI=
|
||||
code.gitea.io/sdk/gitea v0.18.0/go.mod h1:IG9xZJoltDNeDSW0qiF2Vqx5orMWa7OhVWrjvrd5NpI=
|
||||
code.gitea.io/sdk/gitea v0.19.0 h1:8I6s1s4RHgzxiPHhOQdgim1RWIRcr0LVMbHBjBFXq4Y=
|
||||
code.gitea.io/sdk/gitea v0.19.0/go.mod h1:IG9xZJoltDNeDSW0qiF2Vqx5orMWa7OhVWrjvrd5NpI=
|
||||
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
|
||||
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
||||
dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
|
||||
dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
||||
github.com/MarvinJWendt/testza v0.1.0/go.mod h1:7AxNvlfeHP7Z/hDQ5JtE3OKYT3XFUeLCDE2DQninSqs=
|
||||
@ -26,10 +22,6 @@ github.com/MarvinJWendt/testza v0.5.2/go.mod h1:xu53QFE5sCdjtMCKk8YMQ2MnymimEctc
|
||||
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
|
||||
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
||||
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
||||
github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78=
|
||||
github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
|
||||
github.com/ProtonMail/go-crypto v1.1.2 h1:A7JbD57ThNqh7XjmHE+PXpQ3Dqt3BrSAC0AL0Go3KS0=
|
||||
github.com/ProtonMail/go-crypto v1.1.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
|
||||
github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk=
|
||||
github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
|
||||
@ -37,27 +29,15 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuW
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/atomicgo/cursor v0.0.1/go.mod h1:cBON2QmmrysudxNBFthvMtN32r3jxVRIvzkUiF/RuIk=
|
||||
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
|
||||
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
|
||||
github.com/cloudflare/circl v1.3.8 h1:j+V8jJt09PoeMFIu2uh5JUyEaIHTXVOHslFoLNAKqwI=
|
||||
github.com/cloudflare/circl v1.3.8/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU=
|
||||
github.com/cloudflare/circl v1.4.0 h1:BV7h5MgrktNzytKmWjpOtdYrf0lkkbF8YMlBGPhJQrY=
|
||||
github.com/cloudflare/circl v1.4.0/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU=
|
||||
github.com/cloudflare/circl v1.5.0 h1:hxIWksrX6XN5a1L2TI/h53AGPhNHoUBo+TD1ms9+pys=
|
||||
github.com/cloudflare/circl v1.5.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
|
||||
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
|
||||
github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn4ro=
|
||||
github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo=
|
||||
github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
|
||||
github.com/cyphar/filepath-securejoin v0.3.2 h1:QhZu5AxQ+o1XZH0Ye05YzvJ0kAdK6VQc0z9NNMek7gc=
|
||||
github.com/cyphar/filepath-securejoin v0.3.2/go.mod h1:F7i41x/9cBF7lzCrVsYs9fuzwRZm4NQsGTBdpp6mETc=
|
||||
github.com/cyphar/filepath-securejoin v0.3.3 h1:lofZkCEVFIBe0KcdQOzFs8Soy9oaHOWl4gGtPI+gCFc=
|
||||
github.com/cyphar/filepath-securejoin v0.3.3/go.mod h1:8s/MCNJREmFK0H02MF6Ihv1nakJe4L/w3WZLHNkvlYM=
|
||||
github.com/cyphar/filepath-securejoin v0.3.4 h1:VBWugsJh2ZxJmLFSM06/0qzQyiQX2Qs0ViKrUAcqdZ8=
|
||||
github.com/cyphar/filepath-securejoin v0.3.4/go.mod h1:8s/MCNJREmFK0H02MF6Ihv1nakJe4L/w3WZLHNkvlYM=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
||||
github.com/cyphar/filepath-securejoin v0.3.6 h1:4d9N5ykBnSp5Xn2JkhocYDkOpURL/18CYMpo6xB9uWM=
|
||||
github.com/cyphar/filepath-securejoin v0.3.6/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@ -70,12 +50,10 @@ github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcej
|
||||
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
|
||||
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
|
||||
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
|
||||
github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w=
|
||||
github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
|
||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
|
||||
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
|
||||
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
|
||||
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
||||
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
|
||||
@ -90,16 +68,12 @@ github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI=
|
||||
github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
|
||||
github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=
|
||||
github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow=
|
||||
github.com/go-git/go-billy/v5 v5.6.0 h1:w2hPNtoehvJIxR00Vb4xX94qHQi/ApZfX+nBE2Cjio8=
|
||||
github.com/go-git/go-billy/v5 v5.6.0/go.mod h1:sFDq7xD3fn3E0GOwUSZqHo9lrkmx8xJhA0ZrfvjBRGM=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
|
||||
github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys=
|
||||
github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ=
|
||||
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw=
|
||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
@ -117,15 +91,10 @@ github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0=
|
||||
github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||
github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=
|
||||
github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
|
||||
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
|
||||
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
|
||||
github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
|
||||
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
|
||||
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
@ -156,18 +125,15 @@ github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8
|
||||
github.com/lithammer/fuzzysearch v1.1.8/go.mod h1:IdqeyBClc3FFqSzYq/MXESsS4S0FsZ5ajtkr5xPLts4=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
|
||||
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||
github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM=
|
||||
github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
|
||||
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
|
||||
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
@ -175,11 +141,8 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/nsf/termbox-go v1.1.1 h1:nksUPLCb73Q++DwbYUBEglYBRPZyoXJdrj5L+TkjyZY=
|
||||
github.com/nsf/termbox-go v1.1.1/go.mod h1:T0cTdVuOwf7pHQNtfhnEbzHbcNyCEcVU4YPpouCbVxo=
|
||||
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
|
||||
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
|
||||
github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
|
||||
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
|
||||
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
|
||||
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
|
||||
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
|
||||
@ -196,8 +159,6 @@ github.com/pterm/pterm v0.12.31/go.mod h1:32ZAWZVXD7ZfG0s8qqHXePte42kdz8ECtRyEej
|
||||
github.com/pterm/pterm v0.12.33/go.mod h1:x+h2uL+n7CP/rel9+bImHD5lF3nM9vJj80k9ybiiTTE=
|
||||
github.com/pterm/pterm v0.12.36/go.mod h1:NjiL09hFhT/vWjQHSj1athJpx6H8cjpHXNAK5bUw8T8=
|
||||
github.com/pterm/pterm v0.12.40/go.mod h1:ffwPLwlbXxP+rxT0GsgDTzS3y3rmpAO1NMjUkGTYf8s=
|
||||
github.com/pterm/pterm v0.12.79 h1:lH3yrYMhdpeqX9y5Ep1u7DejyHy7NSQg9qrBjF9dFT4=
|
||||
github.com/pterm/pterm v0.12.79/go.mod h1:1v/gzOF1N0FsjbgTHZ1wVycRkKiatFvJSJC4IGaQAAo=
|
||||
github.com/pterm/pterm v0.12.80 h1:mM55B+GnKUnLMUSqhdINe4s6tOuVQIetQ3my8JGyAIg=
|
||||
github.com/pterm/pterm v0.12.80/go.mod h1:c6DeF9bSnOSeFPZlfs4ZRAFcf5SCoTwvwQ5xaKGQlHo=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
@ -206,9 +167,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
|
||||
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
|
||||
github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
|
||||
github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3N51bwOk=
|
||||
github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0=
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
|
||||
@ -217,53 +177,31 @@ github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX
|
||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
|
||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A=
|
||||
github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=
|
||||
github.com/skeema/knownhosts v1.3.0 h1:AM+y0rI04VksttfwjkSTNQorvGqmwATnvnAHpSgc0LY=
|
||||
github.com/skeema/knownhosts v1.3.0/go.mod h1:sPINvnADmT/qYH1kfv+ePMmOBTH6Tbl7b5LvTDjFK7M=
|
||||
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
|
||||
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
|
||||
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
|
||||
github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=
|
||||
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
|
||||
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
|
||||
github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w=
|
||||
github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
|
||||
github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
|
||||
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
|
||||
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
|
||||
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
|
||||
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
|
||||
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ=
|
||||
github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk=
|
||||
github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
|
||||
github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
|
||||
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
|
||||
github.com/whilp/git-urls v1.0.0 h1:95f6UMWN5FKW71ECsXRUd3FVYiXdrE7aX4NZKcPmIjU=
|
||||
github.com/whilp/git-urls v1.0.0/go.mod h1:J16SAmobsqc3Qcy98brfl5f5+e0clUvg1krgwk/qCfE=
|
||||
github.com/xanzy/go-gitlab v0.104.1 h1:g/liXIPJH0jsTwVuzTAUMiKdTf6Qup3u2XZq5Rp90Wc=
|
||||
github.com/xanzy/go-gitlab v0.104.1/go.mod h1:ETg8tcj4OhrB84UEgeE8dSuV/0h4BBL1uOV/qK0vlyI=
|
||||
github.com/xanzy/go-gitlab v0.109.0 h1:RcRme5w8VpLXTSTTMZdVoQWY37qTJWg+gwdQl4aAttE=
|
||||
github.com/xanzy/go-gitlab v0.109.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY=
|
||||
github.com/xanzy/go-gitlab v0.113.0 h1:v5O4R+YZbJGxKqa9iIZxjMyeKkMKBN8P6sZsNl+YckM=
|
||||
github.com/xanzy/go-gitlab v0.113.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY=
|
||||
github.com/xanzy/go-gitlab v0.115.0 h1:6DmtItNcVe+At/liXSgfE/DZNZrGfalQmBRmOcJjOn8=
|
||||
github.com/xanzy/go-gitlab v0.115.0/go.mod h1:5XCDtM7AM6WMKmfDdOiEpyRWUqui2iS9ILfvCZ2gJ5M=
|
||||
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
|
||||
@ -279,22 +217,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
|
||||
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
|
||||
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
|
||||
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
|
||||
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
|
||||
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
|
||||
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
||||
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM=
|
||||
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
|
||||
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
|
||||
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
|
||||
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f h1:XdNn9LlyWAhLVp6P/i8QYBW+hlyhrhei9uErw2B5GJo=
|
||||
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:D5SMRVC3C2/4+F/DB1wZsLRnSNimn2Sp/NPsCrsv8ak=
|
||||
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/gXhegadRdwBIXEFWDo=
|
||||
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
@ -304,21 +228,9 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
|
||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
|
||||
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
|
||||
golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo=
|
||||
golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM=
|
||||
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
|
||||
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
|
||||
golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo=
|
||||
golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
|
||||
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE=
|
||||
golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@ -338,56 +250,27 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
|
||||
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
|
||||
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
|
||||
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
|
||||
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
||||
golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM=
|
||||
golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8=
|
||||
golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU=
|
||||
golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E=
|
||||
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
|
||||
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
|
||||
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||
golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
|
||||
golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=
|
||||
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
|
||||
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U=
|
||||
golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg=
|
||||
golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
|
17
internal/cache/cache.go
vendored
17
internal/cache/cache.go
vendored
@ -7,10 +7,11 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/config"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/config"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
)
|
||||
|
||||
type Cache struct {
|
||||
@ -65,7 +66,7 @@ func (c *Cache) LockCache() {
|
||||
c.log.Info("Attempting to lock cache")
|
||||
c.checkLock()
|
||||
|
||||
file, err := os.OpenFile(c.file+".lock", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0640)
|
||||
file, err := os.OpenFile(c.file+".lock", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o640)
|
||||
defer file.Close()
|
||||
|
||||
if err != nil {
|
||||
@ -81,7 +82,7 @@ func (c *Cache) checkLock() {
|
||||
|
||||
// Saves the current state of the cache to disk
|
||||
func (c *Cache) write() {
|
||||
file, err := os.OpenFile(c.file, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0640)
|
||||
file, err := os.OpenFile(c.file, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o640)
|
||||
if err != nil {
|
||||
c.log.Error("Failed to write cache to disk", c.log.Args("error", err))
|
||||
}
|
||||
@ -92,6 +93,7 @@ func (c *Cache) write() {
|
||||
c.log.Debug("Cache saved to disk")
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Cache) Write() {
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
@ -132,6 +134,7 @@ func (c *Cache) clear(clearAliases bool) {
|
||||
}
|
||||
c.setUpdated()
|
||||
}
|
||||
|
||||
func (c *Cache) Clear(clearAliases bool) {
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
@ -148,7 +151,7 @@ func (c *Cache) refresh(remotes ...string) {
|
||||
c.LoadRemotes(remotes...)
|
||||
}
|
||||
|
||||
// Iterates through all GitLab projects the user has access to, updating
|
||||
// Iterates through all Git projects the user has access to, updating
|
||||
// the project cache where necessary
|
||||
func (c *Cache) Refresh(remotes ...string) {
|
||||
c.lock.Lock()
|
||||
@ -210,5 +213,5 @@ func NewProjectCache(opts *CacheOpts) (*Cache, error) {
|
||||
}
|
||||
|
||||
func createProjectCache(path string) error {
|
||||
return os.WriteFile(path, nil, 0640)
|
||||
return os.WriteFile(path, nil, 0o640)
|
||||
}
|
||||
|
2
internal/cache/cache_aliases.go
vendored
2
internal/cache/cache_aliases.go
vendored
@ -3,7 +3,7 @@ package cache
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
|
6
internal/cache/cache_load.go
vendored
6
internal/cache/cache_load.go
vendored
@ -5,9 +5,9 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/load"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/load"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/remote"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
|
2
internal/cache/cache_projects.go
vendored
2
internal/cache/cache_projects.go
vendored
@ -4,7 +4,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
|
2
internal/cache/fuzz.go
vendored
2
internal/cache/fuzz.go
vendored
@ -6,7 +6,7 @@ import (
|
||||
"github.com/lithammer/fuzzysearch/fuzzy"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
)
|
||||
|
||||
// Performs a fuzzy find on the input string, returning the closest
|
||||
|
2
internal/cache/projects.go
vendored
2
internal/cache/projects.go
vendored
@ -4,7 +4,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
|
2
internal/cache/projects_alias.go
vendored
2
internal/cache/projects_alias.go
vendored
@ -7,7 +7,7 @@ import (
|
||||
"text/tabwriter"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
|
2
internal/cache/projects_fs.go
vendored
2
internal/cache/projects_fs.go
vendored
@ -6,7 +6,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
)
|
||||
|
||||
func (c *Cache) GoTo(project *projects.Project) {
|
||||
|
2
internal/cache/projects_git.go
vendored
2
internal/cache/projects_git.go
vendored
@ -5,7 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
git "github.com/go-git/go-git/v5"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
)
|
||||
|
||||
const gitCloneTimeoutSecs = 60
|
||||
|
@ -3,7 +3,7 @@ package config
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/info"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/info"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"net/url"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/info"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/info"
|
||||
)
|
||||
|
||||
type GiteaRemote struct {
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/remote"
|
||||
)
|
||||
|
||||
func (r *GiteaRemote) ReposToProjects(repos []*gitea.Repository) []*projects.Project {
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"errors"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/load"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/load"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/remote"
|
||||
)
|
||||
|
||||
const giteaReposPerPage = 20
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/google/go-github/v58/github"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/info"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/info"
|
||||
)
|
||||
|
||||
type GithubRemote struct {
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"math"
|
||||
|
||||
"github.com/google/go-github/v58/github"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/remote"
|
||||
)
|
||||
|
||||
func (r *GithubRemote) GetNumProjects(opts *remote.RemoteQueryOpts) int {
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"errors"
|
||||
|
||||
"github.com/google/go-github/v58/github"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/load"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/load"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/remote"
|
||||
)
|
||||
|
||||
const githubReposPerPage = 20
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/xanzy/go-gitlab"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/info"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/info"
|
||||
)
|
||||
|
||||
type GitlabRemote struct {
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/xanzy/go-gitlab"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/info"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/info"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/remote"
|
||||
)
|
||||
|
||||
var DefaultListOpts = &gitlab.ListProjectsOptions{
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/xanzy/go-gitlab"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/load"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/load"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/remote"
|
||||
)
|
||||
|
||||
// Will determine number of total projects,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package load
|
||||
|
||||
import "gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
import "gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
|
||||
// This package provides structs that serve
|
||||
// as the interface between remotes, and any code
|
||||
|
@ -23,7 +23,7 @@ func (p *Project) GetGitInfo() string {
|
||||
commit, _ := repo.CommitObject(head.Hash())
|
||||
str += "\n" + commit.String()
|
||||
|
||||
str += pterm.LightMagenta("GitLab: ") + pterm.Bold.Sprint(p.HTTPURLToRepo) + "\n"
|
||||
str += pterm.LightMagenta("Git: ") + pterm.Bold.Sprint(p.HTTPURLToRepo) + "\n"
|
||||
|
||||
if remotes, _ := repo.Remotes(); len(remotes) > 0 {
|
||||
str += pterm.LightBlue("Remote: ") + pterm.Bold.Sprint(remotes[0].Config().URLs[0])
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/info"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/load"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/info"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/load"
|
||||
)
|
||||
|
||||
const defNetDialTimeoutSecs = 3
|
||||
|
@ -3,9 +3,9 @@ package remotes
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/load"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/load"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/projects"
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/internal/remotes/remote"
|
||||
)
|
||||
|
||||
// Will determine number of total projects,
|
||||
|
Reference in New Issue
Block a user