Update build's default branch (#1484)

diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py
index b32fe68..fc1a0a9 100755
--- a/buildkite/bazelci.py
+++ b/buildkite/bazelci.py
@@ -788,10 +788,14 @@
         dict
             the metadata for the build
         """
+        pipeline_info = self.get_pipeline_info()
+        if not pipeline_info:
+            raise BuildkiteException(f"Cannot find pipeline info for pipeline {self._pipeline}.")
+
         url = self._NEW_BUILD_URL_TEMPLATE.format(self._org, self._pipeline)
         data = {
             "commit": commit,
-            "branch": "master",
+            "branch": pipeline_info.get("default_branch") or "master",
             "message": message if message else f"Trigger build at {commit}",
             "env": env,
             "ignore_pipeline_branch_filters": "true",