fixup deps

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2023-10-02 22:49:22 +03:00
parent 23063e665e
commit b9bd602b46

View File

@ -225,6 +225,8 @@ func giteaPullRequest(ctx context.Context, cfg *Config, branch string, mods map[
logger.Fatalf(ctx, "failed to get repo head: %v", err) logger.Fatalf(ctx, "failed to get repo head: %v", err)
} }
logger.Infof(ctx, "repo head %s", headRef)
wtree, err := repo.Worktree() wtree, err := repo.Worktree()
if err != nil { if err != nil {
logger.Fatalf(ctx, "failed to get worktree: %v", err) logger.Fatalf(ctx, "failed to get worktree: %v", err)
@ -281,10 +283,12 @@ func giteaPullRequest(ctx context.Context, cfg *Config, branch string, mods map[
logger.Fatalf(ctx, "failed to reset repo branch: %v", err) logger.Fatalf(ctx, "failed to reset repo branch: %v", err)
} }
logger.Infof(ctx, "checkout ref %s", headRef) newbranch := fmt.Sprintf("pkgdash/go_modules/%s-%s", path, mod.Version)
logger.Infof(ctx, "checkout ref %s to %s", headRef)
if err = wtree.Checkout(&git.CheckoutOptions{ if err = wtree.Checkout(&git.CheckoutOptions{
Hash: headRef.Hash(), Hash: headRef.Hash(),
Create: false, Branch: newbranch,
Create: true,
Force: true, Force: true,
}); err != nil { }); err != nil {
logger.Fatalf(ctx, "failed to get checkout tree: %v", err) logger.Fatalf(ctx, "failed to get checkout tree: %v", err)
@ -323,6 +327,7 @@ func giteaPullRequest(ctx context.Context, cfg *Config, branch string, mods map[
logger.Infof(ctx, "worktree commit") logger.Infof(ctx, "worktree commit")
commit, err := wtree.Commit(wTitle.String(), &git.CommitOptions{ commit, err := wtree.Commit(wTitle.String(), &git.CommitOptions{
Parents: []plumbing.Hash{headRef.Hash()},
Author: &object.Signature{ Author: &object.Signature{
Name: "gitea-actions", Name: "gitea-actions",
Email: "info@unistack.org", Email: "info@unistack.org",