From c1a5f264c3da024508a7eb45426c2b6f4672aa92 Mon Sep 17 00:00:00 2001 From: Eoin McAfee <83226740+eoinmcafee00@users.noreply.github.com> Date: Thu, 23 Sep 2021 08:47:47 +0100 Subject: [PATCH] fixes issue where case statement for bitbucket cloud logic was never getting into (#3147) --- service/commit/commit.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/service/commit/commit.go b/service/commit/commit.go index 2f45a4ea..c313b3a5 100644 --- a/service/commit/commit.go +++ b/service/commit/commit.go @@ -16,6 +16,7 @@ package commit import ( "context" + "github.com/drone/drone/core" "github.com/drone/go-scm/scm" ) @@ -78,8 +79,8 @@ func (s *service) FindRef(ctx context.Context, user *core.User, repo, ref string }) switch s.client.Driver { - case scm.DriverBitbucket: - case scm.DriverStash: + case scm.DriverBitbucket, + scm.DriverStash: ref = scm.TrimRef(ref) branch, _, err := s.client.Git.FindBranch(ctx, repo, ref) // wont work for a Tag if err != nil {