fix wrong type for git branch
context: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20beta%20customer_testing/146/overview
Change-Id: Ib067131656208d199c8c20b860f6061abd241992
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/28800
Reviewed-by: Keyong Han <keyonghan@google.com>
Reviewed-by: Casey Hillers <chillers@google.com>
Commit-Queue: Casey Hillers <chillers@google.com>
diff --git a/recipe_modules/repo_util/api.py b/recipe_modules/repo_util/api.py
index 329cbf6..1499983 100644
--- a/recipe_modules/repo_util/api.py
+++ b/recipe_modules/repo_util/api.py
@@ -185,11 +185,11 @@
# "--contains",
# ""
# This manifests that what the test train is seeking is only code coverage, and it has no interest in performing
- # the exact logic and properly setting up the variables.
+ # the exact logic and properly setting up the variables.
# Now that we know tests are placeholders and only line nubmer based coverage is checked, we are left with two options:
# Either set some sort of api property and pass in to this function for override (which
- # is not reasonable), or squeeze the if check into a one-liner.
- return branches if len(branches) > 0 else self.m.properties.get('git_branch', '')
+ # is not reasonable), or squeeze the if check into a one-liner.
+ return branches[0] if len(branches) > 0 else self.m.properties.get('git_branch', '')
return self.m.properties.get('git_branch', '')