Fix branch logic for bwc tests in the same major version (#25134)
Fix branch logic for bwc tests in the same major version (#25134)

When testing against the previous 5.x release, the bwc project incorrectly would checkout the 5.x
branch instead of the 5.5 branch as it still had the logic that applies for major versions bwc. This change adds
a check to compare the major version when making the decision on the branch to use.

ThiagoGarciaAlves/elasticsearch,gfyoung/elasticsearch,strapdata/elassandra,wenpos/elasticsearch,pozhidaevak/elasticsearch,brandonkearby/elasticsearch,markwalkom/elasticsearch,Stacey-Gammon/elasticsearch,mohit/elasticsearch,robin13/elasticsearch,fred84/elasticsearch,jimczi/elasticsearch,fred84/elasticsearch,kalimatas/elasticsearch,masaruh/elasticsearch,gfyoung/elasticsearch,naveenhooda2000/elasticsearch,markwalkom/elasticsearch,HonzaKral/elasticsearch,brandonkearby/elasticsearch,jimczi/elasticsearch,mohit/elasticsearch,jimczi/elasticsearch,wangtuo/elasticsearch,wangtuo/elasticsearch,kalimatas/elasticsearch,kalimatas/elasticsearch,maddin2016/elasticsearch,gingerwizard/elasticsearch,coding0011/elasticsearch,gfyoung/elasticsearch,s1monw/elasticsearch,naveenhooda2000/elasticsearch,GlenRSmith/elasticsearch,maddin2016/elasticsearch,nezirus/elasticsearch,coding0011/elasticsearch,Stacey-Gammon/elasticsearch,maddin2016/elasticsearch,rajanm/elasticsearch,mjason3/elasticsearch,uschindler/elasticsearch,markwalkom/elasticsearch,sneivandt/elasticsearch,scorpionvicky/elasticsearch,ThiagoGarciaAlves/elasticsearch,robin13/elasticsearch,coding0011/elasticsearch,qwerty4030/elasticsearch,coding0011/elasticsearch,s1monw/elasticsearch,markwalkom/elasticsearch,strapdata/elassandra,s1monw/elasticsearch,gfyoung/elasticsearch,uschindler/elasticsearch,masaruh/elasticsearch,gingerwizard/elasticsearch,masaruh/elasticsearch,kalimatas/elasticsearch,sneivandt/elasticsearch,nezirus/elasticsearch,mjason3/elasticsearch,nezirus/elasticsearch,masaruh/elasticsearch,robin13/elasticsearch,umeshdangat/elasticsearch,strapdata/elassandra,naveenhooda2000/elasticsearch,scottsom/elasticsearch,strapdata/elassandra,rajanm/elasticsearch,scottsom/elasticsearch,scorpionvicky/elasticsearch,wenpos/elasticsearch,vroyer/elassandra,markwalkom/elasticsearch,Stacey-Gammon/elasticsearch,fred84/elasticsearch,lks21c/elasticsearch,nknize/elasticsearch,LeoYao/elasticsearch,s1monw/elasticsearch,wangtuo/elasticsearch,fred84/elasticsearch,scorpionvicky/elasticsearch,wangtuo/elasticsearch,gingerwizard/elasticsearch,sneivandt/elasticsearch,brandonkearby/elasticsearch,umeshdangat/elasticsearch,LeoYao/elasticsearch,pozhidaevak/elasticsearch,vroyer/elasticassandra,shreejay/elasticsearch,uschindler/elasticsearch,coding0011/elasticsearch,strapdata/elassandra,rajanm/elasticsearch,brandonkearby/elasticsearch,LeoYao/elasticsearch,qwerty4030/elasticsearch,nknize/elasticsearch,gingerwizard/elasticsearch,shreejay/elasticsearch,maddin2016/elasticsearch,shreejay/elasticsearch,vroyer/elassandra,qwerty4030/elasticsearch,nezirus/elasticsearch,lks21c/elasticsearch,jimczi/elasticsearch,Stacey-Gammon/elasticsearch,s1monw/elasticsearch,mohit/elasticsearch,scorpionvicky/elasticsearch,ThiagoGarciaAlves/elasticsearch,scottsom/elasticsearch,scorpionvicky/elasticsearch,sneivandt/elasticsearch,mohit/elasticsearch,masaruh/elasticsearch,umeshdangat/elasticsearch,vroyer/elassandra,vroyer/elasticassandra,markwalkom/elasticsearch,scottsom/elasticsearch,naveenhooda2000/elasticsearch,GlenRSmith/elasticsearch,mjason3/elasticsearch,lks21c/elasticsearch,pozhidaevak/elasticsearch,rajanm/elasticsearch,robin13/elasticsearch,uschindler/elasticsearch,HonzaKral/elasticsearch,ThiagoGarciaAlves/elasticsearch,gingerwizard/elasticsearch,robin13/elasticsearch,nknize/elasticsearch,naveenhooda2000/elasticsearch,LeoYao/elasticsearch,lks21c/elasticsearch,uschindler/elasticsearch,maddin2016/elasticsearch,LeoYao/elasticsearch,brandonkearby/elasticsearch,wenpos/elasticsearch,HonzaKral/elasticsearch,mjason3/elasticsearch,wangtuo/elasticsearch,LeoYao/elasticsearch,wenpos/elasticsearch,nknize/elasticsearch,qwerty4030/elasticsearch,fred84/elasticsearch,qwerty4030/elasticsearch,gingerwizard/elasticsearch,Stacey-Gammon/elasticsearch,jimczi/elasticsearch,wenpos/elasticsearch,GlenRSmith/elasticsearch,nknize/elasticsearch,GlenRSmith/elasticsearch,gfyoung/elasticsearch,umeshdangat/elasticsearch,nezirus/elasticsearch,pozhidaevak/elasticsearch,shreejay/elasticsearch,rajanm/elasticsearch,sneivandt/elasticsearch,lks21c/elasticsearch,gingerwizard/elasticsearch,shreejay/elasticsearch,umeshdangat/elasticsearch,LeoYao/elasticsearch,mohit/elasticsearch,HonzaKral/elasticsearch,rajanm/elasticsearch,vroyer/elasticassandra,ThiagoGarciaAlves/elasticsearch,pozhidaevak/elasticsearch,scottsom/elasticsearch,GlenRSmith/elasticsearch,kalimatas/elasticsearch,mjason3/elasticsearch,ThiagoGarciaAlves/elasticsearch