Merge pull request #3092 from drone/defect/bitbucket-server-build-issue

Defect/bitbucket server build issue
This commit is contained in:
TP Honey 2021-06-17 11:26:34 +01:00 committed by GitHub
commit 0ec6dd988f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,6 +79,7 @@ func (s *service) FindRef(ctx context.Context, user *core.User, repo, ref string
switch s.client.Driver {
case scm.DriverBitbucket:
case scm.DriverStash:
ref = scm.TrimRef(ref)
branch, _, err := s.client.Git.FindBranch(ctx, repo, ref) // wont work for a Tag
if err != nil {