From 5f94691a2220bafcf1e7b5a7a6ac9c8d91a21c86 Mon Sep 17 00:00:00 2001 From: Kevin McDermott Date: Thu, 20 Feb 2020 13:35:15 +0000 Subject: [PATCH] feat: Move internal/hmac to pkg/ This makes the hmac implementation used by go-scm public for use in other projects. --- {scm/driver/internal => pkg}/hmac/hmac.go | 0 {scm/driver/internal => pkg}/hmac/hmac_test.go | 0 scm/driver/gitea/webhook.go | 2 +- scm/driver/github/webhook.go | 2 +- scm/driver/gogs/webhook.go | 2 +- scm/driver/stash/webhook.go | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) rename {scm/driver/internal => pkg}/hmac/hmac.go (100%) rename {scm/driver/internal => pkg}/hmac/hmac_test.go (100%) diff --git a/scm/driver/internal/hmac/hmac.go b/pkg/hmac/hmac.go similarity index 100% rename from scm/driver/internal/hmac/hmac.go rename to pkg/hmac/hmac.go diff --git a/scm/driver/internal/hmac/hmac_test.go b/pkg/hmac/hmac_test.go similarity index 100% rename from scm/driver/internal/hmac/hmac_test.go rename to pkg/hmac/hmac_test.go diff --git a/scm/driver/gitea/webhook.go b/scm/driver/gitea/webhook.go index adaaa85e1..c2d6dbe48 100644 --- a/scm/driver/gitea/webhook.go +++ b/scm/driver/gitea/webhook.go @@ -12,8 +12,8 @@ import ( "io/ioutil" "net/http" + "github.com/jenkins-x/go-scm/pkg/hmac" "github.com/jenkins-x/go-scm/scm" - "github.com/jenkins-x/go-scm/scm/driver/internal/hmac" ) type webhookService struct { diff --git a/scm/driver/github/webhook.go b/scm/driver/github/webhook.go index a565dea94..ee3a09028 100644 --- a/scm/driver/github/webhook.go +++ b/scm/driver/github/webhook.go @@ -14,8 +14,8 @@ import ( "regexp" "time" + "github.com/jenkins-x/go-scm/pkg/hmac" "github.com/jenkins-x/go-scm/scm" - "github.com/jenkins-x/go-scm/scm/driver/internal/hmac" "github.com/jenkins-x/go-scm/scm/driver/internal/null" "github.com/sirupsen/logrus" ) diff --git a/scm/driver/gogs/webhook.go b/scm/driver/gogs/webhook.go index d9c9617ae..f73bec522 100644 --- a/scm/driver/gogs/webhook.go +++ b/scm/driver/gogs/webhook.go @@ -12,8 +12,8 @@ import ( "io/ioutil" "net/http" + "github.com/jenkins-x/go-scm/pkg/hmac" "github.com/jenkins-x/go-scm/scm" - "github.com/jenkins-x/go-scm/scm/driver/internal/hmac" ) type webhookService struct { diff --git a/scm/driver/stash/webhook.go b/scm/driver/stash/webhook.go index e013c5781..13578b203 100644 --- a/scm/driver/stash/webhook.go +++ b/scm/driver/stash/webhook.go @@ -12,8 +12,8 @@ import ( "net/http" "time" + "github.com/jenkins-x/go-scm/pkg/hmac" "github.com/jenkins-x/go-scm/scm" - "github.com/jenkins-x/go-scm/scm/driver/internal/hmac" ) // TODO(bradrydzewski) push hook does not include commit message