refactor: remove github.com/pkg/errors dependency (#1077)

* refactor: split out common/git

* refactor: move git options to separate func

* refactor: remove github.com/pkg/errors dependency

* fix(golangci-lint): forbid github.com/pkg/errors

* style: fix typo

* style: fix typo

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Randmergify[bot] authored and GitHub committed 2022-06-10 21:16:42 +00:00
1 parent 8a473943c3
commit 2aa0699aec
13 files changed
+134 -98

No files matched your search

+4 -2
View File
@@ -7,7 +7,9 @@ import (
"testing"
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/common/git"
"github.com/nektos/act/pkg/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"gopkg.in/yaml.v3"
@@ -123,7 +125,7 @@ func TestStepActionRemote(t *testing.T) {
clonedAction := false
origStepAtionRemoteNewCloneExecutor := stepActionRemoteNewCloneExecutor
stepActionRemoteNewCloneExecutor = func(input common.NewGitCloneExecutorInput) common.Executor {
stepActionRemoteNewCloneExecutor = func(input git.NewGitCloneExecutorInput) common.Executor {
return func(ctx context.Context) error {
clonedAction = true
return nil
@@ -208,7 +210,7 @@ func TestStepActionRemotePre(t *testing.T) {
sarm := &stepActionRemoteMocks{}
origStepAtionRemoteNewCloneExecutor := stepActionRemoteNewCloneExecutor
stepActionRemoteNewCloneExecutor = func(input common.NewGitCloneExecutorInput) common.Executor {
stepActionRemoteNewCloneExecutor = func(input git.NewGitCloneExecutorInput) common.Executor {
return func(ctx context.Context) error {
clonedAction = true
return nil