diff --git a/cmd/rp/cmd/run.go b/cmd/rp/cmd/run.go index 5d0bedb..7ba1467 100644 --- a/cmd/rp/cmd/run.go +++ b/cmd/rp/cmd/run.go @@ -278,7 +278,10 @@ func reconcileReleasePR(ctx context.Context, forge rp.Forge, changesets []rp.Cha } releaseCommitMessage := fmt.Sprintf("chore(%s): release %s", flagBranch, nextVersion) - releaseCommitHash, err := worktree.Commit(releaseCommitMessage, &git.CommitOptions{}) + releaseCommitHash, err := worktree.Commit(releaseCommitMessage, &git.CommitOptions{ + Author: rp.GitSignature(), + Committer: rp.GitSignature(), + }) if err != nil { return fmt.Errorf("failed to commit changes: %w", err) } diff --git a/git.go b/git.go index 71d45c2..7df742c 100644 --- a/git.go +++ b/git.go @@ -4,9 +4,11 @@ import ( "context" "fmt" "os" + "time" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" + "github.com/go-git/go-git/v5/plumbing/object" "github.com/go-git/go-git/v5/plumbing/transport" ) @@ -46,3 +48,11 @@ func CloneRepo(ctx context.Context, cloneURL, branch string, auth transport.Auth return repo, nil } + +func GitSignature() *object.Signature { + return &object.Signature{ + Name: "releaser-pleaser", + Email: "", + When: time.Now(), + } +}