cleanup
This commit is contained in:
parent
4ec58f064a
commit
fe9fe6c208
|
@ -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"
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue