Repository: diggerhq/digger
Pull request #231 (2023-05-10 11:58:23)

merge main into the branch


Patch:
diff --git a/cmd/digger/main.go b/cmd/digger/main.go
index f77c36e4..a8ae6791 100644
--- a/cmd/digger/main.go
+++ b/cmd/digger/main.go
@@ -6,18 +6,17 @@ import (
 	"digger/pkg/digger"
 	"digger/pkg/gcp"
 	dg_github "digger/pkg/github"
-	"digger/pkg/gitlab"
 	"digger/pkg/models"
 	"digger/pkg/utils"
 	"fmt"
-	"github.com/google/go-github/v51/github"
 	"log"
 	"os"
 	"strings"
+
+	"github.com/google/go-github/v51/github"
 )
 
-func gitHubCI(lock utils.Lock) {
-	println("Using GitHub.")
+func main() {
 	githubRepositoryOwner := os.Getenv("GITHUB_REPOSITORY_OWNER")
 	if githubRepositoryOwner != "" {
 		utils.SendUsageRecord(githubRepositoryOwner, "log", "initialize")
@@ -25,6 +24,16 @@ func gitHubCI(lock utils.Lock) {
 		utils.SendUsageRecord("", "log", "non github initialisation")
 	}
 
+	args := os.Args[1:]
+	if len(args) > 0 && args[0] == "version" {
+		fmt.Println(utils.GetVersion())
+		os.Exit(0)
+	}
+	if len(args) > 0 && args[0] == "help" {
+		utils.DisplayCommands()
+		os.Exit(0)
+	}
+
 	ghToken := os.Getenv("GITHUB_TOKEN")
 	if ghToken == "" {
 		reportErrorAndExit(githubRepositoryOwner, "GITHUB_TOKEN is not defined", 1)
@@ -49,7 +58,7 @@ func gitHubCI(lock utils.Lock) {
 	}
 	println("Digger config read successfully")
 
-	lock, err = utils.GetLock()
+	lock, err := utils.GetLock()
 	if err != nil {
 		reportErrorAndExit(githubRepositoryOwner, fmt.Sprintf("Failed to create lock provider. %s", err), 5)
 	}
@@ -101,113 +110,7 @@ func gitHubCI(lock utils.Lock) {
 			reportErrorAndExit(githubRepositoryOwner, fmt.Sprintf("Panic occurred. %s", r), 1)
 		}
 	}()
-}
-
-func gitLabCI(lock utils.Lock) {
-	println("Using GitLab.")
-	projectNamespace := os.Getenv("CI_PROJECT_NAMESPACE")
-	gitlabToken := os.Getenv("GITLAB_TOKEN")
-	if gitlabToken == "" {
-		fmt.Println("GITLAB_TOKEN is empty")
-	}
-
-	walker := configuration.FileSystemDirWalker{}
-	currentDir, err := os.Getwd()
-	if err != nil {
-		reportErrorAndExit(projectNamespace, fmt.Sprintf("Failed to get current dir. %s", err), 4)
-	}
-	fmt.Printf("main: working dir: %s \n", currentDir)
-
-	diggerConfig, err := configuration.NewDiggerConfig(currentDir, &walker)
-	if err != nil {
-		reportErrorAndExit(projectNamespace, fmt.Sprintf("Failed to read Digger config. %s", err), 4)
-	}
-	println("Digger config read successfully")
-
-	gitLabContext, err := gitlab.ParseGitLabContext()
-	if err != nil {
-		fmt.Printf("failed to parse GitLab context. %s\n", err.Error())
-		os.Exit(4)
-	}
-
-	gitlabService, err := gitlab.NewGitLabService(gitlabToken, gitLabContext)
-	if err != nil {
-		fmt.Printf("failed to initialise GitLab service, %v", err)
-		os.Exit(4)
-	}
-
-	gitlabEvent := gitlab.GitLabEvent{EventType: gitLabContext.EventType}
 
-	impactedProjects, err := gitlab.ProcessGitLabEvent(gitLabContext, diggerConfig, gitlabService)
-	if err != nil {
-		fmt.Printf("failed to process GitLab event, %v", err)
-		os.Exit(6)
-	}
-	println("GitLab event processed successfully")
-
-	commandsToRunPerProject, err := gitlab.ConvertGitLabEventToCommands(gitlabEvent, gitLabContext, impactedProjects, diggerConfig.Workflows)
-	if err != nil {
-		fmt.Printf("failed to convert event to command, %v", err)
-		os.Exit(7)
-	}
-	println("GitLab event converted to commands successfully")
-
-	for _, v := range commandsToRunPerProject {
-		fmt.Printf("command: %s", v.ProjectName)
-	}
-
-	err = gitlab.RunCommandsPerProject(commandsToRunPerProject, *gitLabContext, diggerConfig, gitlabService, lock, "")
-	if err != nil {
-		fmt.Printf("failed to execute command, %v", err)
-		os.Exit(8)
-	}
-
-	println("Commands executed successfully")
-}
-
-/*
-Exit codes:
-0 - No errors
-1 - Failed to read digger config
-2 - Failed to create lock provider
-3 - Failed to find auth token
-4 - Failed to initialise CI context
-5 -
-6 - failed to process CI event
-7 - failed to convert event to command
-8 - failed to execute command
-10 - No CI detected
-*/
-
-func main() {
-	args := os.Args[1:]
-	if len(args) > 0 && args[0] == "version" {
-		fmt.Println(utils.GetVersion())
-		os.Exit(0)
-	}
-	if len(args) > 0 && args[0] == "help" {
-		utils.DisplayCommands()
-		os.Exit(0)
-	}
-
-	lock, err := utils.GetLock()
-	if err != nil {
-		fmt.Printf("Failed to create lock provider. %s\n", err)
-		os.Exit(2)
-	}
-	println("Lock provider has been created successfully")
-
-	ci := digger.DetectCI()
-	switch ci {
-	case digger.GitHub:
-		gitHubCI(lock)
-	case digger.GitLab:
-		gitLabCI(lock)
-	case digger.BitBucket:
-	case digger.None:
-		print("No CI detected.")
-		os.Exit(10)
-	}
 }
 
 func newPlanStorage(ghToken string, repoOwner string, repositoryName string, prNumber int) utils.PlanStorage {
diff --git a/go.mod b/go.mod
index d6ed8df6..092465ee 100644
--- a/go.mod
+++ b/go.mod
@@ -8,11 +8,10 @@ require (
 	github.com/Azure/azure-sdk-for-go/sdk/data/aztables v1.0.1
 	github.com/aws/aws-sdk-go v1.44.260
 	github.com/bmatcuk/doublestar/v4 v4.6.0
-	github.com/caarlos0/env/v7 v7.1.0
 	github.com/google/go-github/v51 v51.0.0
+	github.com/google/go-github/v52 v52.0.0
 	github.com/google/uuid v1.3.0
 	github.com/stretchr/testify v1.8.2
-	github.com/xanzy/go-gitlab v0.83.0
 	gopkg.in/yaml.v3 v3.0.1
 )
 
@@ -29,13 +28,11 @@ require (
 	github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
 	github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
 	github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
-	github.com/golang/protobuf v1.5.3 // indirect
+	github.com/golang/protobuf v1.5.2 // indirect
 	github.com/google/go-cmp v0.5.9 // indirect
 	github.com/google/go-querystring v1.1.0 // indirect
 	github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
 	github.com/googleapis/gax-go/v2 v2.7.1 // indirect
-	github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
-	github.com/hashicorp/go-retryablehttp v0.7.2 // indirect
 	github.com/kr/pretty v0.1.0 // indirect
 	github.com/kylelemons/godebug v1.1.0 // indirect
 	github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
@@ -45,7 +42,6 @@ require (
 	golang.org/x/oauth2 v0.7.0 // indirect
 	golang.org/x/sys v0.7.0 // indirect
 	golang.org/x/text v0.9.0 // indirect
-	golang.org/x/time v0.3.0 // indirect
 	golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
 	google.golang.org/api v0.114.0 // indirect
 	google.golang.org/appengine v1.6.7 // indirect
diff --git a/go.sum b/go.sum
index e69fc003..acda3740 100644
--- a/go.sum
+++ b/go.sum
@@ -29,8 +29,20 @@ github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9s
 github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY=
 github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
+github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ=
 github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA=
 github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g=
+github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
+github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
+github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw=
+github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
+github.com/aws/aws-sdk-go v1.44.219 h1:YOFxTUQZvdRzgwb6XqLFRwNHxoUdKBuunITC7IFhvbc=
+github.com/aws/aws-sdk-go v1.44.219/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
+github.com/aws/aws-sdk-go v1.44.254 h1:8baW4yal2xGiM/Wm5/ZU10drS8sd+BVjMjPFjJx2ooc=
+github.com/aws/aws-sdk-go v1.44.254/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
+github.com/aws/aws-sdk-go v1.44.255 h1:tOd7OP5V6BeHhANksc7CFB/ILS2mHj3kRhTfZKFnsS0=
+github.com/aws/aws-sdk-go v1.44.255/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
 github.com/aws/aws-sdk-go v1.44.257 h1:HwelXYZZ8c34uFFhgVw3ybu2gB5fkk8KLj2idTvzZb8=
 github.com/aws/aws-sdk-go v1.44.257/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
 github.com/aws/aws-sdk-go v1.44.260 h1:78IJkDpDPXvLXvIkNAKDP/i3z8Vj+3sTAtQYw/v/2o8=
@@ -38,8 +50,6 @@ github.com/aws/aws-sdk-go v1.44.260/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8
 github.com/bmatcuk/doublestar/v4 v4.6.0 h1:HTuxyug8GyFbRkrffIpzNCSK4luc0TY3wzXvzIZhEXc=
 github.com/bmatcuk/doublestar/v4 v4.6.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
 github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
-github.com/caarlos0/env/v7 v7.1.0 h1:9lzTF5amyQeWHZzuZeKlCb5FWSUxpG1js43mhbY8ozg=
-github.com/caarlos0/env/v7 v7.1.0/go.mod h1:LPPWniDUq4JaO6Q41vtlyikhMknqymCLBw0eX4dcH1E=
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
 github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY=
@@ -48,11 +58,14 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c=
+github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
 github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
 github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
 github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
+github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34=
+github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4=
 github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c=
 github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
 github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
@@ -61,9 +74,11 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU
 github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
 github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
 github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
 github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
 github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
 github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
@@ -72,8 +87,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq
 github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
 github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
 github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
-github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
 github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
 github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
 github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@@ -84,8 +99,11 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
 github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-github/v50 v50.1.0 h1:hMUpkZjklC5GJ+c3GquSqOP/T4BNsB7XohaPhtMOzRk=
+github.com/google/go-github/v50 v50.1.0/go.mod h1:Ev4Tre8QoKiolvbpOSG3FIi4Mlon3S2Nt9W5JYqKiwA=
 github.com/google/go-github/v51 v51.0.0 h1:KCjsbgPV28VoRftdP+K2mQL16jniUsLAJknsOVKwHyU=
 github.com/google/go-github/v51 v51.0.0/go.mod h1:kZj/rn/c1lSUbr/PFWl2hhusPV7a5XNYKcwPrd5L3Us=
+github.com/google/go-github/v52 v52.0.0/go.mod h1:WJV6VEEUPuMo5pXqqa2ZCZEdbQqua4zAk2MZTIo+m+4=
 github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
 github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
 github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw=
@@ -98,22 +116,31 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5
 github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A=
 github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI=
 github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
-github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
-github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
-github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
-github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0=
-github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
+github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
+github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
+github.com/hashicorp/hc-install v0.5.0 h1:D9bl4KayIYKEeJ4vUDe9L5huqxZXczKaykSRcmQ0xY0=
+github.com/hashicorp/terraform-exec v0.18.1 h1:LAbfDvNQU1l0NOQlTuudjczVhHj061fNX5H8XZxHlH4=
+github.com/hashicorp/terraform-exec v0.18.1/go.mod h1:58wg4IeuAJ6LVsLUeD2DWZZoc/bYi6dzhLHzxM41980=
+github.com/hashicorp/terraform-json v0.15.0 h1:/gIyNtR6SFw6h5yzlbDbACyGvIhKtQi8mTsbkNd79lE=
+github.com/hashicorp/terraform-json v0.15.0/go.mod h1:+L1RNzjDU5leLFZkHTFTbJXaoqUC6TqXlFgDoOXrtvk=
+github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
+github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
 github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
 github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
 github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
 github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
+github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck=
 github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
 github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
 github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
+github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
+github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
+github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
 github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI=
 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ=
@@ -123,23 +150,34 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4=
+github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
 github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
 github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
 github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
 github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
-github.com/xanzy/go-gitlab v0.83.0 h1:37p0MpTPNbsTMKX/JnmJtY8Ch1sFiJzVF342+RvZEGw=
-github.com/xanzy/go-gitlab v0.83.0/go.mod h1:5ryv+MnpZStBH8I/77HuQBsMbBGANtVpLWC15qOjWAw=
+github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
+github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
+github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
+github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
+github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8=
+github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk=
+github.com/zclconf/go-cty v1.13.0 h1:It5dfKTTZHe9aeppbNOda3mN7Ag7sg6QkBNm6TkyFa0=
+github.com/zclconf/go-cty v1.13.0/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0=
+github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8=
 go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
 go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
+golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
 golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
 golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -147,20 +185,27 @@ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTk
 golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
 golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
 golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
+golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
+golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
 golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
 golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw=
+golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw=
 golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g=
 golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -179,6 +224,8 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
 golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -187,12 +234,13 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
 golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
+golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
 golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
 golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
-golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
-golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -208,6 +256,7 @@ google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE=
 google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg=
 google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
 google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
 google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
@@ -238,8 +287,10 @@ google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
 gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/pkg/configuration/digger_config.go b/pkg/configuration/digger_config.go
index de4d37d8..1bd608cf 100644
--- a/pkg/configuration/digger_config.go
+++ b/pkg/configuration/digger_config.go
@@ -5,7 +5,6 @@ import (
 	"fmt"
 	"github.com/bmatcuk/doublestar/v4"
 	"gopkg.in/yaml.v3"
-	"log"
 	"os"
 	"path"
 	"path/filepath"
@@ -107,6 +106,7 @@ func (p *Project) UnmarshalYAML(unmarshal func(interface{}) error) error {
 	}
 	*p = Project(raw)
 	return nil
+
 }
 
 func (w *Workflow) UnmarshalYAML(unmarshal func(interface{}) error) error {
@@ -228,7 +228,6 @@ func ConvertDiggerYamlToConfig(diggerYaml *DiggerConfigYaml, workingDir string,
 }
 
 func NewDiggerConfig(workingDir string, walker DirWalker) (*DiggerConfig, error) {
-	fmt.Println("NewDiggerConfig")
 	config := &DiggerConfigYaml{}
 	fileName, err := retrieveConfigFile(workingDir)
 	if err != nil {
@@ -238,7 +237,6 @@ func NewDiggerConfig(workingDir string, walker DirWalker) (*DiggerConfig, error)
 	}
 
 	if fileName == "" {
-		fmt.Println("No digger config found, using default one")
 		config.Projects = make([]Project, 1)
 		config.Projects[0] = defaultProject()
 		config.Workflows = make(map[string]Workflow)
@@ -330,8 +328,6 @@ func (c *DiggerConfig) GetModifiedProjects(changedFiles []string) []Project {
 		for _, file := range changedFiles {
 			absoluteFile, _ := filepath.Abs(path.Join("/", file))
 			absoluteDir, _ := filepath.Abs(path.Join("/", project.Dir))
-
-			//fmt.Printf("absoluteFile: %s, absoluteDir: %s \n", absoluteFile, absoluteDir)
 			if strings.HasPrefix(absoluteFile, absoluteDir) {
 				result = append(result, project)
 				break
@@ -393,16 +389,6 @@ func retrieveConfigFile(workingDir string) (string, error) {
 		fileName = path.Join(workingDir, fileName)
 	}
 
-	println("list dir files")
-	files, err := os.ReadDir(workingDir)
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	for _, file := range files {
-		fmt.Println(file.Name(), file.IsDir())
-	}
-
 	// Make sure we don't have more than one digger config file
 	ymlCfg := isFileExists(fileName + ".yml")
 	yamlCfg := isFileExists(fileName + ".yaml")
diff --git a/pkg/digger/digger.go b/pkg/digger/digger.go
index 970f4438..f60450b1 100644
--- a/pkg/digger/digger.go
+++ b/pkg/digger/digger.go
@@ -341,19 +341,19 @@ func parseProjectName(comment string) string {
 }
 
 type DiggerExecutor struct {
-	repoOwner         string
-	repoName          string
-	projectName       string
-	projectPath       string
-	stateEnvVars      map[string]string
-	commandEnvVars    map[string]string
-	applyStage        *configuration.Stage
-	planStage         *configuration.Stage
-	commandRunner     CommandRun
-	terraformExecutor terraform.TerraformExecutor
-	prManager         ci.CIService
-	lock              utils.ProjectLock
-	planStorage       utils.PlanStorage
+	RepoOwner         string
+	RepoName          string
+	ProjectName       string
+	ProjectPath       string
+	StateEnvVars      map[string]string
+	CommandEnvVars    map[string]string
+	ApplyStage        *configuration.Stage
+	PlanStage         *configuration.Stage
+	CommandRunner     CommandRun
+	TerraformExecutor terraform.TerraformExecutor
+	ciService         ci.CIService
+	ProjectLock       utils.ProjectLock
+	PlanStorage       utils.PlanStorage
 }
 
 type CommandRun interface {
@@ -384,19 +384,19 @@ func (c CommandRunner) Run(command string) (string, string, error) {
 }
 
 func (d DiggerExecutor) planFileName() string {
-	return d.repoName + "#" + d.projectName + ".tfplan"
+	return d.RepoName + "#" + d.ProjectName + ".tfplan"
 }
 
 func (d DiggerExecutor) localPlanFilePath() string {
-	return path.Join(d.projectPath, d.planFileName())
+	return path.Join(d.ProjectPath, d.planFileName())
 }
 
 func (d DiggerExecutor) storedPlanFilePath() string {
-	return path.Join(d.repoOwner, d.planFileName())
+	return path.Join(d.RepoOwner, d.planFileName())
 }
 
 func (d DiggerExecutor) Plan(prNumber int) error {
-	res, err := d.lock.Lock(prNumber)
+	res, err := d.ProjectLock.Lock(prNumber)
 	if err != nil {
 		return fmt.Errorf("error locking project: %v", err)
 	}
@@ -404,8 +404,8 @@ func (d DiggerExecutor) Plan(prNumber int) error {
 	if res {
 		var planSteps []configuration.Step
 
-		if d.planStage != nil {
-			planSteps = d.planStage.Steps
+		if d.PlanStage != nil {
+			planSteps = d.PlanStage.Steps
 		} else {
 			planSteps = []configuration.Step{
 				{
@@ -418,7 +418,7 @@ func (d DiggerExecutor) Plan(prNumber int) error {
 		}
 		for _, step := range planSteps {
 			if step.Action == "init" {
-				_, _, err := d.terraformExecutor.Init(step.ExtraArgs, d.stateEnvVars)
+				_, _, err := d.TerraformExecutor.Init(step.ExtraArgs, d.StateEnvVars)
 				if err != nil {
 					return fmt.Errorf("error running init: %v", err)
 				}
@@ -426,23 +426,23 @@ func (d DiggerExecutor) Plan(prNumber int) error {
 			if step.Action == "plan" {
 				planArgs := []string{"-out", d.planFileName()}
 				planArgs = append(planArgs, step.ExtraArgs...)
-				isNonEmptyPlan, stdout, stderr, err := d.terraformExecutor.Plan(planArgs, d.commandEnvVars)
+				isNonEmptyPlan, stdout, stderr, err := d.TerraformExecutor.Plan(planArgs, d.CommandEnvVars)
 				if err != nil {
 					return fmt.Errorf("error executing plan: %v", err)
 				}
-				if d.planStorage != nil {
-					err = d.planStorage.StorePlan(d.localPlanFilePath(), d.storedPlanFilePath())
+				if d.PlanStorage != nil {
+					err = d.PlanStorage.StorePlan(d.localPlanFilePath(), d.storedPlanFilePath())
 					if err != nil {
 						return fmt.Errorf("error storing plan: %v", err)
 					}
 				}
 				plan := cleanupTerraformPlan(isNonEmptyPlan, err, stdout, stderr)
-				comment := utils.GetTerraformOutputAsCollapsibleComment("Plan for **"+d.lock.LockId()+"**", plan)
-				d.prManager.PublishComment(prNumber, comment)
+				comment := utils.GetTerraformOutputAsCollapsibleComment("Plan for **"+d.ProjectLock.LockId()+"**", plan)
+				d.ciService.PublishComment(prNumber, comment)
 			}
 			if step.Action == "run" {
-				stdout, stderr, err := d.commandRunner.Run(step.Value)
-				log.Printf("Running %v for **%v**\n%v%v", step.Value, d.lock.LockId(), stdout, stderr)
+				stdout, stderr, err := d.CommandRunner.Run(step.Value)
+				log.Printf("Running %v for **%v**\n%v%v", step.Value, d.ProjectLock.LockId(), stdout, stderr)
 				if err != nil {
 					return fmt.Errorf("error running command: %v", err)
 				}
@@ -454,29 +454,29 @@ func (d DiggerExecutor) Plan(prNumber int) error {
 
 func (d DiggerExecutor) Apply(prNumber int) error {
 	var plansFilename *string
-	if d.planStorage != nil {
+	if d.PlanStorage != nil {
 		var err error
-		plansFilename, err = d.planStorage.RetrievePlan(d.localPlanFilePath(), d.storedPlanFilePath())
+		plansFilename, err = d.PlanStorage.RetrievePlan(d.localPlanFilePath(), d.storedPlanFilePath())
 		if err != nil {
 			return fmt.Errorf("error retrieving plan: %v", err)
 		}
 	}
 
-	isMergeable, _, err := d.prManager.IsMergeable(prNumber)
+	isMergeable, _, err := d.ciService.IsMergeable(prNumber)
 	if err != nil {
 		return fmt.Errorf("error validating is PR is mergeable: %v", err)
 	}
 
 	if !isMergeable {
 		comment := "Cannot perform Apply since the PR is not currently mergeable."
-		d.prManager.PublishComment(prNumber, comment)
+		d.ciService.PublishComment(prNumber, comment)
 	} else {
 
-		if res, _ := d.lock.Lock(prNumber); res {
+		if res, _ := d.ProjectLock.Lock(prNumber); res {
 			var applySteps []configuration.Step
 
-			if d.applyStage != nil {
-				applySteps = d.applyStage.Steps
+			if d.ApplyStage != nil {
+				applySteps = d.ApplyStage.Steps
 			} else {
 				applySteps = []configuration.Step{
 					{
@@ -490,24 +490,24 @@ func (d DiggerExecutor) Apply(prNumber int) error {
 
 			for _, step := range applySteps {
 				if step.Action == "init" {
-					_, _, err := d.terraformExecutor.Init(step.ExtraArgs, d.stateEnvVars)
+					_, _, err := d.TerraformExecutor.Init(step.ExtraArgs, d.StateEnvVars)
 					if err != nil {
 						return fmt.Errorf("error running init: %v", err)
 					}
 				}
 				if step.Action == "apply" {
-					stdout, stderr, err := d.terraformExecutor.Apply(step.ExtraArgs, plansFilename, d.commandEnvVars)
+					stdout, stderr, err := d.TerraformExecutor.Apply(step.ExtraArgs, plansFilename, d.CommandEnvVars)
 					applyOutput := cleanupTerraformApply(true, err, stdout, stderr)
-					comment := utils.GetTerraformOutputAsCollapsibleComment("Apply for **"+d.lock.LockId()+"**", applyOutput)
-					d.prManager.PublishComment(prNumber, comment)
+					comment := utils.GetTerraformOutputAsCollapsibleComment("Apply for **"+d.ProjectLock.LockId()+"**", applyOutput)
+					d.ciService.PublishComment(prNumber, comment)
 					if err != nil {
-						d.prManager.PublishComment(prNumber, "Error during applying.")
+						d.ciService.PublishComment(prNumber, "Error during applying.")
 						return fmt.Errorf("error executing apply: %v", err)
 					}
 				}
 				if step.Action == "run" {
-					stdout, stderr, err := d.commandRunner.Run(step.Value)
-					log.Printf("Running %v for **%v**\n%v%v", step.Value, d.lock.LockId(), stdout, stderr)
+					stdout, stderr, err := d.CommandRunner.Run(step.Value)
+					log.Printf("Running %v for **%v**\n%v%v", step.Value, d.ProjectLock.LockId(), stdout, stderr)
 					if err != nil {
 						return fmt.Errorf("error running command: %v", err)
 					}
@@ -519,11 +519,11 @@ func (d DiggerExecutor) Apply(prNumber int) error {
 }
 
 func (d DiggerExecutor) Unlock(prNumber int) error {
-	err := d.lock.ForceUnlock(prNumber)
+	err := d.ProjectLock.ForceUnlock(prNumber)
 	if err != nil {
-		return fmt.Errorf("failed to aquire lock: %s, %v", d.lock.LockId(), err)
+		return fmt.Errorf("failed to aquire lock: %s, %v", d.ProjectLock.LockId(), err)
 	}
-	err = d.planStorage.DeleteStoredPlan(d.storedPlanFilePath())
+	err = d.PlanStorage.DeleteStoredPlan(d.storedPlanFilePath())
 	if err != nil {
 		return fmt.Errorf("failed to delete stored plan file '%v':  %v", d.storedPlanFilePath(), err)
 	}
@@ -531,9 +531,9 @@ func (d DiggerExecutor) Unlock(prNumber int) error {
 }
 
 func (d DiggerExecutor) Lock(prNumber int) error {
-	_, err := d.lock.Lock(prNumber)
+	_, err := d.ProjectLock.Lock(prNumber)
 	if err != nil {
-		return fmt.Errorf("failed to aquire lock: %s, %v", d.lock.LockId(), err)
+		return fmt.Errorf("failed to aquire lock: %s, %v", d.ProjectLock.LockId(), err)
 	}
 	return nil
 }
@@ -633,35 +633,3 @@ func defaultWorkflow() *configuration.Workflow {
 		},
 	}
 }
-
-type CIName string
-
-const (
-	None      = CIName("")
-	GitHub    = CIName("github")
-	GitLab    = CIName("gitlab")
-	BitBucket = CIName("bitbucket")
-)
-
-func (ci CIName) String() string {
-	return string(ci)
-}
-
-func DetectCI() CIName {
-
-	notEmpty := func(key string) bool {
-		return os.Getenv(key) != ""
-	}
-
-	if notEmpty("GITHUB_ACTIONS") {
-		return GitHub
-	}
-	if notEmpty("GITLAB_CI") {
-		return GitLab
-	}
-	if notEmpty("BITBUCKET_BUILD_NUMBER") {
-		return BitBucket
-	}
-	return None
-
-}
diff --git a/pkg/gitlab/gitlab.go b/pkg/gitlab/gitlab.go
deleted file mode 100644
index 98adeadf..00000000
--- a/pkg/gitlab/gitlab.go
+++ /dev/null
@@ -1,401 +0,0 @@
-package gitlab
-
-import (
-	"digger/pkg/configuration"
-	"digger/pkg/digger"
-	"digger/pkg/terraform"
-	"digger/pkg/utils"
-	"fmt"
-	"github.com/caarlos0/env/v7"
-	go_gitlab "github.com/xanzy/go-gitlab"
-	"log"
-	"os"
-	"path"
-	"strings"
-)
-
-// based on https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
-
-type GitLabContext struct {
-	PipelineSource PipelineSourceType `env:"CI_PIPELINE_SOURCE"`
-
-	// this env var should be set by webhook that trigger pipeline
-	EventType          GitLabEventType `env:"MERGE_REQUEST_EVENT_NAME"`
-	PipelineId         *int            `env:"CI_PIPELINE_ID"`
-	PipelineIId        *int            `env:"CI_PIPELINE_IID"`
-	MergeRequestId     *int            `env:"CI_MERGE_REQUEST_ID"`
-	MergeRequestIId    *int            `env:"CI_MERGE_REQUEST_IID"`
-	ProjectName        string          `env:"CI_PROJECT_NAME"`
-	ProjectNamespace   string          `env:"CI_PROJECT_NAMESPACE"`
-	ProjectId          *int            `env:"CI_PROJECT_ID"`
-	ProjectNamespaceId *int            `env:"CI_PROJECT_NAMESPACE_ID"`
-	Token              string          `env:"GITLAB_TOKEN"`
-	DiggerCommand      string          `env:"DIGGER_COMMAND"`
-}
-
-type PipelineSourceType string
-
-func (t PipelineSourceType) String() string {
-	return string(t)
-}
-
-const (
-	Push                     = PipelineSourceType("push")
-	Web                      = PipelineSourceType("web")
-	Schedule                 = PipelineSourceType("schedule")
-	Api                      = PipelineSourceType("api")
-	External                 = PipelineSourceType("external")
-	Chat                     = PipelineSourceType("chat")
-	WebIDE                   = PipelineSourceType("webide")
-	ExternalPullRequestEvent = PipelineSourceType("external_pull_request_event")
-	ParentPipeline           = PipelineSourceType("parent_pipeline")
-	Trigger                  = PipelineSourceType("trigger")
-	Pipeline                 = PipelineSourceType("pipeline")
-)
-
-func ParseGitLabContext() (*GitLabContext, error) {
-	var parsedGitLabContext GitLabContext
-
-	if err := env.Parse(&parsedGitLabContext); err != nil {
-		fmt.Printf("%+v\n", err)
-	}
-
-	fmt.Printf("%+v\n", parsedGitLabContext)
-	return &parsedGitLabContext, nil
-}
-
-func NewGitLabService(token string, gitLabContext *GitLabContext) (*GitLabService, error) {
-	client, err := go_gitlab.NewClient(token)
-	if err != nil {
-		log.Fatalf("failed to create gitlab client: %v", err)
-	}
-
-	user, _, err := client.Users.CurrentUser()
-	if err != nil {
-		return nil, fmt.Errorf("failed to get current GitLab user info, %v", err)
-	}
-	fmt.Printf("current GitLab user: %s\n", user.Name)
-
-	return &GitLabService{
-		Client:  client,
-		Context: gitLabContext,
-	}, nil
-}
-
-func ProcessGitLabEvent(gitlabContext *GitLabContext, diggerConfig *configuration.DiggerConfig, service *GitLabService) ([]configuration.Project, error) {
-	var impactedProjects []configuration.Project
-
-	if gitlabContext.MergeRequestIId == nil {
-		println("Merge Request ID is not found.")
-		return nil, nil
-	}
-
-	mergeRequestId := gitlabContext.MergeRequestIId
-	changedFiles, err := service.GetChangedFiles(*mergeRequestId)
-
-	if err != nil {
-		return nil, fmt.Errorf("could not get changed files")
-	}
-
-	impactedProjects = diggerConfig.GetModifiedProjects(changedFiles)
-
-	fmt.Println("Impacted projects:")
-	for _, v := range impactedProjects {
-		fmt.Printf("%s\n", v.Name)
-	}
-
-	return impactedProjects, nil
-}
-
-type GitLabService struct {
-	Client  *go_gitlab.Client
-	Context *GitLabContext
-}
-
-func (gitlabService GitLabService) GetChangedFiles(mergeRequestId int) ([]string, error) {
-	opt := &go_gitlab.GetMergeRequestChangesOptions{}
-
-	log.Printf("projectId: %d", *gitlabService.Context.ProjectId)
-	log.Printf("mergeRequestId: %d", mergeRequestId)
-	mergeRequestChanges, _, err := gitlabService.Client.MergeRequests.GetMergeRequestChanges(*gitlabService.Context.ProjectId, mergeRequestId, opt)
-	if err != nil {
-		log.Fatalf("error getting gitlab's merge request: %v", err)
-	}
-
-	fileNames := make([]string, len(mergeRequestChanges.Changes))
-
-	for i, change := range mergeRequestChanges.Changes {
-		fileNames[i] = change.NewPath
-		//fmt.Printf("changed file: %s \n", change.NewPath)
-	}
-	return fileNames, nil
-}
-
-func (gitlabService GitLabService) PublishComment(mergeRequest int, comment string) {
-	//TODO implement me
-	//panic("implement me")
-}
-
-type CIService interface {
-	GetChangedFiles(prNumber int) ([]string, error)
-	PublishComment(prNumber int, comment string)
-}
-
-func (C CIService) SetStatus(prNumber int, status string, statusContext string) error {
-	//TODO implement me
-	panic("implement me")
-}
-
-func (C CIService) GetCombinedPullRequestStatus(prNumber int) (string, error) {
-	//TODO implement me
-	panic("implement me")
-}
-
-func (C CIService) MergePullRequest(prNumber int) error {
-	//TODO implement me
-	panic("implement me")
-}
-
-func (C CIService) IsMergeable(prNumber int) (bool, string, error) {
-	//TODO implement me
-	panic("implement me")
-}
-
-func (C CIService) IsClosed(prNumber int) (bool, error) {
-	//TODO implement me
-	panic("implement me")
-}
-
-type GitLabEvent struct {
-	EventType GitLabEventType
-}
-
-type GitLabEventType string
-
-func (e GitLabEventType) String() string {
-	return string(e)
-}
-
-const (
-	MergeRequestOpened  = GitLabEventType("merge_request_opened")
-	MergeRequestUpdated = GitLabEventType("merge_request_updated")
-	MergeRequestClosed  = GitLabEventType("merge_request_closed")
-	MergeRequestComment = GitLabEventType("merge_request_commented")
-)
-
-func ConvertGitLabEventToCommands(event GitLabEvent, gitLabContext *GitLabContext, impactedProjects []configuration.Project, workflows map[string]configuration.Workflow) ([]digger.ProjectCommand, error) {
-	commandsPerProject := make([]digger.ProjectCommand, 0)
-
-	switch event.EventType {
-	case MergeRequestOpened:
-		for _, project := range impactedProjects {
-			workflow, ok := workflows[project.Workflow]
-			if !ok {
-				workflow = workflows["default"]
-			}
-
-			commandsPerProject = append(commandsPerProject, digger.ProjectCommand{
-				ProjectName:      project.Name,
-				ProjectDir:       project.Dir,
-				ProjectWorkspace: project.Workspace,
-				Terragrunt:       project.Terragrunt,
-				Commands:         workflow.Configuration.OnPullRequestPushed,
-				ApplyStage:       workflow.Apply,
-				PlanStage:        workflow.Plan,
-			})
-		}
-		return commandsPerProject, nil
-	case MergeRequestUpdated:
-		for _, project := range impactedProjects {
-			workflow, ok := workflows[project.Workflow]
-			if !ok {
-				workflow = workflows["default"]
-			}
-
-			commandsPerProject = append(commandsPerProject, digger.ProjectCommand{
-				ProjectName:      project.Name,
-				ProjectDir:       project.Dir,
-				ProjectWorkspace: project.Workspace,
-				Terragrunt:       project.Terragrunt,
-				Commands:         workflow.Configuration.OnPullRequestPushed,
-				ApplyStage:       workflow.Apply,
-				PlanStage:        workflow.Plan,
-			})
-		}
-		return commandsPerProject, nil
-	case MergeRequestClosed:
-		for _, project := range impactedProjects {
-			workflow, ok := workflows[project.Workflow]
-			if !ok {
-				workflow = workflows["default"]
-			}
-			commandsPerProject = append(commandsPerProject, digger.ProjectCommand{
-				ProjectName:      project.Name,
-				ProjectDir:       project.Dir,
-				ProjectWorkspace: project.Workspace,
-				Terragrunt:       project.Terragrunt,
-				Commands:         workflow.Configuration.OnPullRequestClosed,
-				ApplyStage:       workflow.Apply,
-				PlanStage:        workflow.Plan,
-			})
-		}
-		return commandsPerProject, nil
-	case MergeRequestComment:
-		supportedCommands := []string{"digger plan", "digger apply", "digger unlock", "digger lock"}
-
-		for _, command := range supportedCommands {
-			if strings.Contains(gitLabContext.DiggerCommand, command) {
-				for _, project := range impactedProjects {
-					workspace := project.Workspace
-					//workspaceOverride, err := parseWorkspace(gitLabContext.DiggerCommand)
-					//if err != nil {
-					//	return []digger.ProjectCommand{}, err
-					//}
-					//if workspaceOverride != "" {
-					//	workspace = workspaceOverride
-					//}
-					commandsPerProject = append(commandsPerProject, digger.ProjectCommand{
-						ProjectName:      project.Name,
-						ProjectDir:       project.Dir,
-						ProjectWorkspace: workspace,
-						Terragrunt:       project.Terragrunt,
-						Commands:         []string{command},
-					})
-				}
-			}
-		}
-		return commandsPerProject, nil
-
-	default:
-		return []digger.ProjectCommand{}, fmt.Errorf("unsupported GitLab event type: %v", event)
-	}
-}
-
-func RunCommandsPerProject(commandsPerProject []digger.ProjectCommand, gitLabContext GitLabContext, diggerConfig *configuration.DiggerConfig, service CIService, lock utils.Lock, workingDir string) error {
-
-	allAppliesSuccess := true
-	appliesPerProject := make(map[string]bool)
-	for _, projectCommands := range commandsPerProject {
-		appliesPerProject[projectCommands.ProjectName] = false
-		for _, command := range projectCommands.Commands {
-			projectLock := &utils.ProjectLockImpl{
-				InternalLock: lock,
-				PrManager:    service,
-				ProjectName:  projectCommands.ProjectName,
-				RepoName:     repoName,
-				RepoOwner:    repoOwner,
-			}
-
-			var terraformExecutor terraform.TerraformExecutor
-
-			if projectCommands.Terragrunt {
-				terraformExecutor = terraform.Terragrunt{WorkingDir: path.Join(workingDir, projectCommands.ProjectDir)}
-			} else {
-				terraformExecutor = terraform.Terraform{WorkingDir: path.Join(workingDir, projectCommands.ProjectDir), Workspace: projectCommands.ProjectWorkspace}
-			}
-
-			commandRunner := CommandRunner{}
-
-			diggerExecutor := DiggerExecutor{
-				projectCommands.ProjectName,
-				projectCommands.ApplyStage,
-				projectCommands.PlanStage,
-				commandRunner,
-				terraformExecutor,
-				prManager,
-				projectLock,
-				planStorage,
-			}
-			switch command {
-			case "digger plan":
-				utils.SendUsageRecord(repoOwner, eventName, "plan")
-				prManager.SetStatus(prNumber, "pending", projectCommands.ProjectName+"/plan")
-				err := diggerExecutor.Plan(prNumber)
-				if err != nil {
-					log.Printf("Failed to run digger plan command. %v", err)
-					prManager.SetStatus(prNumber, "failure", projectCommands.ProjectName+"/plan")
-
-					return false, fmt.Errorf("failed to run digger plan command. %v", err)
-				} else {
-					prManager.SetStatus(prNumber, "success", projectCommands.ProjectName+"/plan")
-				}
-			case "digger apply":
-				utils.SendUsageRecord(repoName, eventName, "apply")
-				prManager.SetStatus(prNumber, "pending", projectCommands.ProjectName+"/apply")
-				err := diggerExecutor.Apply(prNumber)
-				if err != nil {
-					log.Printf("Failed to run digger apply command. %v", err)
-					prManager.SetStatus(prNumber, "failure", projectCommands.ProjectName+"/apply")
-
-					return false, fmt.Errorf("failed to run digger apply command. %v", err)
-				} else {
-					prManager.SetStatus(prNumber, "success", projectCommands.ProjectName+"/apply")
-					appliesPerProject[projectCommands.ProjectName] = true
-				}
-			case "digger unlock":
-				utils.SendUsageRecord(repoOwner, eventName, "unlock")
-				err := diggerExecutor.Unlock(prNumber)
-				if err != nil {
-					return false, fmt.Errorf("failed to unlock project. %v", err)
-				}
-			case "digger lock":
-				utils.SendUsageRecord(repoOwner, eventName, "lock")
-				err := diggerExecutor.Lock(prNumber)
-				if err != nil {
-					return false, fmt.Errorf("failed to lock project. %v", err)
-				}
-			}
-		}
-	}
-
-	for _, success := range appliesPerProject {
-		if !success {
-			allAppliesSuccess = false
-		}
-	}
-	return allAppliesSuccess, nil
-
-	lockAcquisitionSuccess := true
-	for _, projectCommands := range commandsPerProject {
-		for _, command := range projectCommands.Commands {
-			projectLock := &utils.ProjectLockImpl{
-				InternalLock: lock,
-				PrManager:    service,
-				ProjectName:  projectCommands.ProjectName,
-				RepoName:     gitLabContext.ProjectName,
-				RepoOwner:    gitLabContext.ProjectNamespace,
-			}
-			diggerExecutor := digger.DiggerExecutor{
-				workingDir,
-				projectCommands.ProjectWorkspace,
-				gitLabContext.ProjectNamespace,
-				projectCommands.ProjectName,
-				projectCommands.ProjectDir,
-				gitLabContext.ProjectName,
-				projectCommands.Terragrunt,
-				service,
-				projectLock,
-				diggerConfig,
-			}
-			switch command {
-			case "digger plan":
-				utils.SendUsageRecord(gitLabContext.ProjectNamespace, gitLabContext.EventType.String(), "plan")
-				diggerExecutor.Plan(*gitLabContext.MergeRequestIId)
-			case "digger apply":
-				utils.SendUsageRecord(gitLabContext.ProjectName, gitLabContext.EventType.String(), "apply")
-				diggerExecutor.Apply(*gitLabContext.MergeRequestIId)
-			case "digger unlock":
-				utils.SendUsageRecord(gitLabContext.ProjectNamespace, gitLabContext.EventType.String(), "unlock")
-				diggerExecutor.Unlock(*gitLabContext.MergeRequestIId)
-			case "digger lock":
-				utils.SendUsageRecord(gitLabContext.ProjectNamespace, gitLabContext.EventType.String(), "lock")
-				lockAcquisitionSuccess = diggerExecutor.Lock(*gitLabContext.MergeRequestIId)
-			}
-		}
-	}
-
-	if !lockAcquisitionSuccess {
-		os.Exit(1)
-	}
-	return nil
-}
diff --git a/pkg/utils/usage.go b/pkg/utils/usage.go
index d24e3839..0cd8a872 100644
--- a/pkg/utils/usage.go
+++ b/pkg/utils/usage.go
@@ -6,7 +6,6 @@ import (
 	"digger/pkg/configuration"
 	"encoding/hex"
 	"encoding/json"
-	"fmt"
 	"log"
 	"net/http"
 	"os"
@@ -72,12 +71,8 @@ func sendPayload(payload interface{}) error {
 }
 
 func init() {
-	currentDir, err := os.Getwd()
-	if err != nil {
-		fmt.Printf("Failed to get current dir. %s", err)
-	}
 	walker := configuration.FileSystemDirWalker{}
-	config, err := configuration.NewDiggerConfig(currentDir, &walker)
+	config, err := configuration.NewDiggerConfig("", &walker)
 	if err != nil {
 		return
 	}


Test patch:
diff --git a/pkg/digger/digger_test.go b/pkg/digger/digger_test.go
index 56451603..75ded76f 100644
--- a/pkg/digger/digger_test.go
+++ b/pkg/digger/digger_test.go
@@ -151,7 +151,7 @@ func TestCorrectCommandExecutionWhenApplying(t *testing.T) {
 	lock := &MockProjectLock{}
 	planStorage := &MockPlanStorage{}
 	executor := DiggerExecutor{
-		applyStage: &configuration.Stage{
+		ApplyStage: &configuration.Stage{
 			Steps: []configuration.Step{
 				{
 					Action:    "init",
@@ -170,12 +170,12 @@ func TestCorrectCommandExecutionWhenApplying(t *testing.T) {
 				},
 			},
 		},
-		planStage:         &configuration.Stage{},
-		commandRunner:     commandRunner,
-		terraformExecutor: terraformExecutor,
-		prManager:         prManager,
-		lock:              lock,
-		planStorage:       planStorage,
+		PlanStage:         &configuration.Stage{},
+		CommandRunner:     commandRunner,
+		TerraformExecutor: terraformExecutor,
+		ciService:         prManager,
+		ProjectLock:       lock,
+		PlanStorage:       planStorage,
 	}
 
 	executor.Apply(1)
@@ -193,8 +193,8 @@ func TestCorrectCommandExecutionWhenPlanning(t *testing.T) {
 	planStorage := &MockPlanStorage{}
 
 	executor := DiggerExecutor{
-		applyStage: &configuration.Stage{},
-		planStage: &configuration.Stage{
+		ApplyStage: &configuration.Stage{},
+		PlanStage: &configuration.Stage{
 			Steps: []configuration.Step{
 				{
 					Action:    "init",
@@ -213,11 +213,11 @@ func TestCorrectCommandExecutionWhenPlanning(t *testing.T) {
 				},
 			},
 		},
-		commandRunner:     commandRunner,
-		terraformExecutor: terraformExecutor,
-		prManager:         prManager,
-		lock:              lock,
-		planStorage:       planStorage,
+		CommandRunner:     commandRunner,
+		TerraformExecutor: terraformExecutor,
+		ciService:         prManager,
+		ProjectLock:       lock,
+		PlanStorage:       planStorage,
 	}
 
 	executor.Plan(1)
diff --git a/pkg/gitlab/gitlab_test.go b/pkg/gitlab/gitlab_test.go
deleted file mode 100644
index 90cb0d17..00000000
--- a/pkg/gitlab/gitlab_test.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package gitlab
-
-import (
-	"github.com/stretchr/testify/assert"
-	"testing"
-)
-
-func TestParseGitLabContext(t *testing.T) {
-	t.Setenv("CI_PIPELINE_SOURCE", "push")
-	t.Setenv("CI_PIPELINE_ID", "1")
-	t.Setenv("CI_PIPELINE_IID", "2")
-
-	context, err := ParseGitLabContext()
-	assert.NoError(t, err)
-	assert.NotNil(t, context)
-	assert.Equal(t, PipelineSourceType("push"), context.PipelineSource)
-	assert.Equal(t, 1, *context.PipelineId)
-	assert.Equal(t, 2, *context.PipelineIId)
-	assert.Nil(t, context.MergeRequestId)
-	assert.Nil(t, context.MergeRequestIId)
-}
-
-func TestOpenMergeRequestEvent(t *testing.T) {
-	t.Setenv("CI_PIPELINE_SOURCE", "push")
-	t.Setenv("CI_PIPELINE_ID", "1")
-	t.Setenv("CI_PIPELINE_IID", "2")
-
-	context, err := ParseGitLabContext()
-	assert.NoError(t, err)
-	assert.NotNil(t, context)
-	assert.Equal(t, PipelineSourceType("push"), context.PipelineSource)
-	assert.Equal(t, 1, *context.PipelineId)
-	assert.Equal(t, 2, *context.PipelineIId)
-	assert.Nil(t, context.MergeRequestId)
-	assert.Nil(t, context.MergeRequestIId)
-}