fixup deps
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
23063e665e
commit
b9bd602b46
@ -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.Infof(ctx, "repo head %s", headRef)
|
||||
|
||||
wtree, err := repo.Worktree()
|
||||
if err != nil {
|
||||
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.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{
|
||||
Hash: headRef.Hash(),
|
||||
Create: false,
|
||||
Branch: newbranch,
|
||||
Create: true,
|
||||
Force: true,
|
||||
}); err != nil {
|
||||
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")
|
||||
commit, err := wtree.Commit(wTitle.String(), &git.CommitOptions{
|
||||
Parents: []plumbing.Hash{headRef.Hash()},
|
||||
Author: &object.Signature{
|
||||
Name: "gitea-actions",
|
||||
Email: "info@unistack.org",
|
||||
|
Loading…
Reference in New Issue
Block a user