fixup deps

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2023-10-02 02:10:13 +03:00
parent 98c7b22d6b
commit 7a1d00f5de
1 changed files with 4 additions and 3 deletions

View File

@ -278,7 +278,7 @@ func giteaPullRequest(ctx context.Context, cfg *Config, mods map[string]modules.
}
logger.Infof(ctx, "worktree commit")
_, err = wtree.Commit(wTitle.String(), &git.CommitOptions{
commit, err := wtree.Commit(wTitle.String(), &git.CommitOptions{
Author: &object.Signature{
Name: "gitea-actions ",
Email: "info@unistack.org",
@ -289,9 +289,10 @@ func giteaPullRequest(ctx context.Context, cfg *Config, mods map[string]modules.
logger.Fatalf(ctx, "failed to commit: %v", err)
}
logger.Infof(ctx, "try to push %s", newref.Name().String())
refspec := gitconfig.RefSpec(commit.String() + ":" + newref.Name().String())
logger.Infof(ctx, "try to push %s", refspec)
if err = repo.Push(&git.PushOptions{
RefSpecs: []gitconfig.RefSpec{gitconfig.RefSpec(newref.Name().String() + ":" + newref.Name().String())},
RefSpecs: []gitconfig.RefSpec{refspec},
Auth: &httpauth.BasicAuth{Username: envTOKEN, Password: envTOKEN},
Force: true,
}); err != nil {