fixes issue where case statement for bitbucket cloud logic was never getting into (#3147)
This commit is contained in:
parent
97ff309f4a
commit
c1a5f264c3
1 changed files with 3 additions and 2 deletions
|
@ -16,6 +16,7 @@ package commit
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/drone/drone/core"
|
"github.com/drone/drone/core"
|
||||||
"github.com/drone/go-scm/scm"
|
"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 {
|
switch s.client.Driver {
|
||||||
case scm.DriverBitbucket:
|
case scm.DriverBitbucket,
|
||||||
case scm.DriverStash:
|
scm.DriverStash:
|
||||||
ref = scm.TrimRef(ref)
|
ref = scm.TrimRef(ref)
|
||||||
branch, _, err := s.client.Git.FindBranch(ctx, repo, ref) // wont work for a Tag
|
branch, _, err := s.client.Git.FindBranch(ctx, repo, ref) // wont work for a Tag
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue