#8 delete cobra, add micro-config-flag #11

Merged
vtolstov merged 53 commits from kgorbunov/pkgdash:master into master 2024-04-02 22:54:17 +03:00
2 changed files with 3 additions and 4 deletions
Showing only changes of commit 4eaed8781b - Show all commits

View File

@ -257,6 +257,7 @@ func Execute(ctx context.Context, gitSource source.SourceControl, mvs map[string
}
}
logger.Debugf(ctx, fmt.Sprintf("Update successful for %s", path))
return
}
for _, branch := range cfg.Branches { // update all dep
for path, mod = range mvs {
@ -278,6 +279,7 @@ func Execute(ctx context.Context, gitSource source.SourceControl, mvs map[string
}
}
logger.Debugf(ctx, fmt.Sprintf("Close successful for %s", path))
return
}
for _, branch := range cfg.Branches {
logger.Info(ctx, fmt.Sprintf("Start getting pr for %s", branch))
@ -335,7 +337,6 @@ func getRepoMgmt(ctx context.Context, cfg *configcli.Config) error {
if err != nil {
logger.Fatal(ctx, fmt.Sprintf("pkgdash/main can t get info about user: %s", err))
}
n, err := netrc.Parse(filepath.Join(usr.HomeDir, ".netrc"))
if err != nil {
logger.Error(ctx, "pkgdash/main can t parse .netrc: %s", err)
@ -347,7 +348,6 @@ func getRepoMgmt(ctx context.Context, cfg *configcli.Config) error {
if cfg.Source.Token == "" {
cfg.Source.Token = n.Machine(cfg.Source.APIURL).Get("password")
}
return nil
}

View File

@ -8,7 +8,6 @@ import (
"fmt"
"io"
"net/http"
"os"
"os/exec"
"regexp"
"strings"
@ -39,7 +38,7 @@ type Gitea struct {
func NewGitea(cfg configcli.Config) *Gitea {
return &Gitea{
URL: cfg.Source.APIURL,
Token: os.Getenv("gitea_token"),
Token: cfg.Source.Token,
PRTitle: cfg.PullRequestTitle,
PRBody: cfg.PullRequestBody,
Repository: cfg.Source.Repository,