Skip to content

Commit 8b3d1e6

Browse files
committed
Only set branch name in post-submit runs.
1 parent ecaeb8c commit 8b3d1e6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/measurement/MetricsReportUploader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ public static void upload(Project project, String report) {
3838
String baseCommit = System.getenv("PULL_BASE_SHA");
3939
String headCommit = System.getenv("PULL_PULL_SHA");
4040
String baseRef = System.getenv("PULL_BASE_REF");
41-
String pullRef = System.getenv("PULL_REFS");
4241
String pullRequest = System.getenv("PULL_NUMBER");
4342

4443
String commit = headCommit != null && !headCommit.isEmpty() ? headCommit : baseCommit;
45-
String branch = pullRef != null && !pullRef.isEmpty() ? pullRef : baseRef;
44+
String branch = pullRequest != null && !pullRequest.isEmpty() ? "" : baseRef;
4645

4746
post(project, report, owner, repo, commit, branch, baseCommit, pullRequest);
4847
}

0 commit comments

Comments
 (0)