Building forked projects

I have many repos that are all forks of one project. Is it possible to only create a single app on Bitrise for the main repo, then have Bitrise build the fork if a push is made to the fork?

So my flow would be like this:

I have Project 1 in Bitbucket. I setup Project 1 in Bitrise to build my app when I push to Project 1. I fork the Project 1 repo and now I have Project 2. I need Bitrise to build Project 2 if I push to Project 2 without setting up a new app in Bitrise.

Hi @markf,

Unfortunately it’s not possible to build forks when you push into the fork, because non of the git hosting services support that on an API / webhook level.

What’s possible, and is definitely supported today, is when someone starts a Pull Request from the fork into the main repository (which - the main repo - you registered on bitrise.io ) then bitrise.io can build the PR, even if the source is from a fork.

This way you don’t have to setup a new app for the fork, but builds will only happen when you open a PR and when you update it (push new commits to the PR’s branch).

I hope this helps, if you’d have any questions just let us know! :slight_smile:

Thanks @viktorbenei! That is something to keep in mind. Bitbucket does have a webhook for when a fork is created. Is it possible to use that hook to create a new app in bitrise?

Hi @markf,

Indeed that’s an option, although the repository have to be registered to a user; simply from the webhook we can’t determine to which bitrise.io user to register it. In addition, if the fork is private, proper access also have to be granted, and that’s not possible via a webhook.