From 8d41ea035cc88078d822dc210af940d77a2d46f3 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sun, 1 Oct 2023 16:54:00 +0300 Subject: [PATCH] fixup Signed-off-by: Vasiliy Tolstov --- cmd/pkgdashcli/main.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmd/pkgdashcli/main.go b/cmd/pkgdashcli/main.go index 51ae90b..f38ab52 100644 --- a/cmd/pkgdashcli/main.go +++ b/cmd/pkgdashcli/main.go @@ -12,8 +12,10 @@ import ( "os/exec" "path/filepath" "text/template" + "time" "git.unistack.org/unistack-org/pkgdash/internal/modules" + "github.com/go-git/go-git/plumbing/object" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" httpauth "github.com/go-git/go-git/v5/plumbing/transport/http" @@ -256,6 +258,17 @@ func giteaPullRequest(ctx context.Context, cfg *Config, mods map[string]modules. logger.Fatalf(ctx, "failed to add file: %v", err) } + _, err = wtree.Commit(wTitle.String(), &git.CommitOptions{ + Author: &object.Signature{ + Name: "pkgdash", + Email: "info@unistack.org", + When: time.Now(), + }, + }) + if err != nil { + logger.Fatalf(ctx, "failed to commit: %v", err) + } + if err = repo.Push(&git.PushOptions{Auth: &httpauth.BasicAuth{Username: envTOKEN, Password: envTOKEN}}); err != nil { logger.Fatalf(ctx, "failed to push repo branch: %v", err) }