We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d9147fb + 6a6fa10 commit 4bcbe7bCopy full SHA for 4bcbe7b
scm/driver/azure/content.go
@@ -9,6 +9,7 @@ import (
9
"encoding/base64"
10
"fmt"
11
"net/url"
12
+ "strings"
13
14
"github.com/drone/go-scm/scm"
15
)
@@ -207,6 +208,8 @@ func generateURIFromRef(ref string) (uri string) {
207
208
if ref != "" {
209
if len(ref) == 40 {
210
return fmt.Sprintf("&versionDescriptor.versionType=commit&versionDescriptor.version=%s", ref)
211
+ } else if strings.HasPrefix(ref, "refs/tags/") {
212
+ return fmt.Sprintf("&versionDescriptor.versionType=tag&versionDescriptor.version=%s", scm.TrimRef(ref))
213
} else {
214
return fmt.Sprintf("&versionDescriptor.versionType=branch&versionDescriptor.version=%s", ref)
215
}
0 commit comments