add author to commit name

This commit is contained in:
viktorbarzin 2021-03-16 23:35:22 +00:00
parent be6ec8ce70
commit 6894e92eeb

View file

@ -5,6 +5,7 @@ import (
"fmt"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/golang/glog"
"github.com/pkg/errors"
)
@ -74,7 +75,7 @@ func run() error {
return errors.Wrapf(err, "failed to add vpn client")
}
// commit changes
if _, err = worktree.Commit("Added new VPN client config (still testing) [CI SKIP]", &git.CommitOptions{All: true}); err != nil {
if _, err = worktree.Commit("Added new VPN client config (still testing) [CI SKIP]", &git.CommitOptions{All: true, Author: &object.Signature{Name: "Webhook Handler Bot"}}); err != nil {
return errors.Wrapf(err, "failed to commit")
}
default: