mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-02-07 02:07:04 +00:00
fix: missing git author
This commit is contained in:
parent
7585dcc858
commit
edf09585d8
2 changed files with 14 additions and 1 deletions
|
|
@ -278,7 +278,10 @@ func reconcileReleasePR(ctx context.Context, forge rp.Forge, changesets []rp.Cha
|
||||||
}
|
}
|
||||||
|
|
||||||
releaseCommitMessage := fmt.Sprintf("chore(%s): release %s", flagBranch, nextVersion)
|
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 {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to commit changes: %w", err)
|
return fmt.Errorf("failed to commit changes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
git.go
10
git.go
|
|
@ -4,9 +4,11 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/go-git/go-git/v5"
|
"github.com/go-git/go-git/v5"
|
||||||
"github.com/go-git/go-git/v5/plumbing"
|
"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"
|
"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
|
return repo, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GitSignature() *object.Signature {
|
||||||
|
return &object.Signature{
|
||||||
|
Name: "releaser-pleaser",
|
||||||
|
Email: "",
|
||||||
|
When: time.Now(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue