Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2023-09-30 01:25:09 +03:00
parent 3988e81157
commit 8fb72df400

View File

@ -14,6 +14,7 @@ import (
"git.unistack.org/unistack-org/pkgdash/internal/modules" "git.unistack.org/unistack-org/pkgdash/internal/modules"
"github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing"
httpauth "github.com/go-git/go-git/v5/plumbing/transport/http"
yamlcodec "go.unistack.org/micro-codec-yaml/v4" yamlcodec "go.unistack.org/micro-codec-yaml/v4"
envconfig "go.unistack.org/micro-config-env/v4" envconfig "go.unistack.org/micro-config-env/v4"
fileconfig "go.unistack.org/micro-config-file/v4" fileconfig "go.unistack.org/micro-config-file/v4"
@ -219,7 +220,7 @@ func giteaPullRequest(ctx context.Context, cfg *Config, mods map[string]modules.
logger.Fatalf(ctx, "failed to create repo branch: %v", err) logger.Fatalf(ctx, "failed to create repo branch: %v", err)
} }
if err = repo.Push(&git.PushOptions{}); err != nil { if err = repo.Push(&git.PushOptions{Auth: &httpauth.TokenAuth{Token: envTOKEN}}); err != nil {
logger.Fatalf(ctx, "failed to push repo branch: %v", err) logger.Fatalf(ctx, "failed to push repo branch: %v", err)
} }