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:
R
2022-06-10 23:16:42 +02:00
committed by GitHub
parent 8a473943c3
commit 2aa0699aec
13 changed files with 134 additions and 98 deletions

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