You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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?
@Ekaterina Khrabrykh hi. Thanks for your question.
For pull requests try to use Bitbucket API Pull requests
Regards, Igor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.