We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6170421 commit 5bfdb0cCopy full SHA for 5bfdb0c
scripts/datadog-cireport/main.go
@@ -59,6 +59,11 @@ func main() {
59
}
60
commitParts := strings.Split(string(commitData), ",")
61
62
+ branch := os.Getenv("GITHUB_HEAD_REF")
63
+ if branch == "" {
64
+ branch = os.Getenv("GITHUB_BASE_REF")
65
+ }
66
+
67
tags := map[string]string{
68
"service": "coder",
69
"_dd.cireport_version": "2",
@@ -78,7 +83,7 @@ func main() {
78
83
"ci.provider.name": "github",
79
84
"ci.workspace_path": os.Getenv("GITHUB_WORKSPACE"),
80
85
81
- "git.branch": os.Getenv("GITHUB_REF_NAME"),
86
+ "git.branch": branch,
82
87
"git.commit.sha": githubSHA,
88
"git.repository_url": fmt.Sprintf("%s/%s.git", githubServerURL, githubRepository),
89
0 commit comments