Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

clone PR branch of another repo during pipeline

We have 2 bitbucket repositories, one of the repo (call it A) takes modules from another repo (B). We are developing both repositories at the same time. I want to add running unit tests for PR of project A. But I don't know how to check if there is PR in repo B. And if it exists, how to clone PR branch of repo B. 

My buggy solution is to take feature_branch if it exists, if not to take develop branch of repo B:

- b_repo_branch=${BITBUCKET_BRANCH}
- if [ -z $(git ls-remote ${B_REPO_URL} ${b_repo_branch}) ]; then b_repo_branch="develop"; fi
- git clone --branch ${b_repo_branch} ${B_REPO_URL}
- python3 -m pytest tests/

but it doesn't work when develop branches of both repos already have  some crucial changes and there are no merging conflicts (PR is possible)

Do you know how to know about pull requests of another repo during pipeline? 

1 answer

0 votes

@Ekaterina Khrabrykh hi. Thanks for your question.
For pull requests try to use Bitbucket API Pull requests 

Regards, Igor.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events