#8 delete cobra, add micro-config-flag #11
@ -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))
|
logger.Debugf(ctx, fmt.Sprintf("Update successful for %s", path))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
for _, branch := range cfg.Branches { // update all dep
|
for _, branch := range cfg.Branches { // update all dep
|
||||||
for path, mod = range mvs {
|
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))
|
logger.Debugf(ctx, fmt.Sprintf("Close successful for %s", path))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
for _, branch := range cfg.Branches {
|
for _, branch := range cfg.Branches {
|
||||||
logger.Info(ctx, fmt.Sprintf("Start getting pr for %s", branch))
|
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 {
|
if err != nil {
|
||||||
logger.Fatal(ctx, fmt.Sprintf("pkgdash/main can t get info about user: %s", err))
|
logger.Fatal(ctx, fmt.Sprintf("pkgdash/main can t get info about user: %s", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
n, err := netrc.Parse(filepath.Join(usr.HomeDir, ".netrc"))
|
n, err := netrc.Parse(filepath.Join(usr.HomeDir, ".netrc"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error(ctx, "pkgdash/main can t parse .netrc: %s", err)
|
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 == "" {
|
if cfg.Source.Token == "" {
|
||||||
cfg.Source.Token = n.Machine(cfg.Source.APIURL).Get("password")
|
cfg.Source.Token = n.Machine(cfg.Source.APIURL).Get("password")
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
@ -39,7 +38,7 @@ type Gitea struct {
|
|||||||
func NewGitea(cfg configcli.Config) *Gitea {
|
func NewGitea(cfg configcli.Config) *Gitea {
|
||||||
return &Gitea{
|
return &Gitea{
|
||||||
URL: cfg.Source.APIURL,
|
URL: cfg.Source.APIURL,
|
||||||
Token: os.Getenv("gitea_token"),
|
Token: cfg.Source.Token,
|
||||||
PRTitle: cfg.PullRequestTitle,
|
PRTitle: cfg.PullRequestTitle,
|
||||||
PRBody: cfg.PullRequestBody,
|
PRBody: cfg.PullRequestBody,
|
||||||
Repository: cfg.Source.Repository,
|
Repository: cfg.Source.Repository,
|
||||||
|
Loading…
Reference in New Issue
Block a user