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

@@ -3,7 +3,8 @@ package model
import (
"fmt"
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/common/git"
log "github.com/sirupsen/logrus"
)
@@ -85,8 +86,8 @@ func withDefaultBranch(b string, event map[string]interface{}) map[string]interf
return event
}
var findGitRef = common.FindGitRef
var findGitRevision = common.FindGitRevision
var findGitRef = git.FindGitRef
var findGitRevision = git.FindGitRevision
func (ghc *GithubContext) SetRefAndSha(defaultBranch string, repoPath string) {
// https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows