diff options
Diffstat (limited to 'tools/buildsteps/defaultenv')
-rw-r--r-- | tools/buildsteps/defaultenv | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/buildsteps/defaultenv b/tools/buildsteps/defaultenv index 0d14e16a89..d709f986a1 100644 --- a/tools/buildsteps/defaultenv +++ b/tools/buildsteps/defaultenv @@ -139,7 +139,8 @@ function getBranchName () else #if we are in detached head state #fetch the first non-pullrequest branch we can find with HEAD - git branch -r --contains HEAD | sed "/origin\/pr\//d" | head -n1 | awk '{gsub(".*/","");print $1}' + #also only grep in remotes that match current GITHUB_REPO + git branch -r --contains HEAD | sed "/origin\/pr\//d" | grep $GITHUB_REPO | head -n1 | awk '{gsub(".*/","");print $1}' fi } |