From e74cfad61dd333d2f5b4fa897505f8eb9b0aab4d Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Tue, 3 Oct 2023 00:26:33 +0300 Subject: [PATCH] update workflow Signed-off-by: Vasiliy Tolstov --- cmd/pkgdashcli/main.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cmd/pkgdashcli/main.go b/cmd/pkgdashcli/main.go index fb18c61..80c3309 100644 --- a/cmd/pkgdashcli/main.go +++ b/cmd/pkgdashcli/main.go @@ -287,11 +287,14 @@ func giteaPullRequest(ctx context.Context, cfg *Config, branch string, mods map[ logger.Fatalf(ctx, "failed to reset repo branch: %v", err) } - /* - if err = wtree.PullContext(ctx, &git.PullOptions{Force: true, RemoteName: "origin"}); err != nil { - logger.Fatalf(ctx, "failed to pull repo: %v", err) - } - */ + if err = wtree.PullContext(ctx, &git.PullOptions{ + Auth: &httpauth.BasicAuth{Username: envTOKEN, Password: envTOKEN}, + Depth: 1, + RemoteURL : + Force: true, + RemoteName: "origin"}); err != nil { + logger.Fatalf(ctx, "failed to pull repo: %v", err) + } logger.Infof(ctx, "checkout ref %s", headRef) if err = wtree.Checkout(&git.CheckoutOptions{