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) }