This commit is contained in:
Robert Kaussow 2024-05-06 16:43:47 +02:00
parent 4ec58f064a
commit fe9fe6c208
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 7 additions and 8 deletions

View File

@ -1,7 +1,5 @@
package git
const gitBin = "/usr/bin/git"
type Author struct {
Name string
Email string
@ -24,3 +22,5 @@ type Repository struct {
Author Author
}
const gitBin = "/usr/bin/git"

View File

@ -46,15 +46,14 @@ func (p *Plugin) run(ctx context.Context) error {
func (p *Plugin) Validate() error {
var err error
if p.Settings.Repo.WorkDir == "" {
p.Settings.Repo.WorkDir, err = os.Getwd()
}
p.Settings.Repo.Autocorrect = "never"
p.Settings.Repo.RemoteName = "origin"
if err != nil {
return fmt.Errorf("failed to get working directory: %w", err)
if p.Settings.Repo.WorkDir == "" {
p.Settings.Repo.WorkDir, err = os.Getwd()
if err != nil {
return fmt.Errorf("failed to get working directory: %w", err)
}
}
for _, actionStr := range p.Settings.Action.Value() {